Planets and stars have liquid layers that can support internal gravity waves and inertial waves respectively restored by the buoyancy and Coriolis forces. Both types of waves are excited by tides, leading to resonantly amplified dissipation. We review the theoretical formalism to compute these resonances and present some challenges and methods to overcome them.