Invalid call. Nonexistent function 'handle_gravity' in base 'Nil'

You have gravity_component assigned in the Editor Inspector right?