KeyError: 'messaging' on FB Handover Protocol

Hello everyone

I am trying to implemente the handover Protocol in my bot on facebook, as soon as the user requests to talk to a human, the bot is supposed to pause << ConversationPaused() >> and facebook handover protocol is supposed to move the conversation from DONE to Inbox, so a human can chat with the user .

The conversation does stop, and its moved to the inbox, however, as soon as a human interacts with the user I get the following error :confused: :

KeyError: ‘messaging’ [2020-05-03 19:43:09 +0100] [4900] [ERROR] Exception occurred while handling uri: ‘http://49adb6e9.ngrok.io/webhooks/facebook/webhook’ Traceback (most recent call last): File “/Users/edenconstantino/opt/anaconda3/envs/rasa/lib/python3.6/site-packages/sanic/app.py”, line 942, in handle_request response = await response File “/Users/edenconstantino/opt/anaconda3/envs/rasa/lib/python3.6/site-packages/rasa/core/channels/facebook.py”, line 337, in webhook await messenger.handle(request.json, metadata) File “/Users/edenconstantino/opt/anaconda3/envs/rasa/lib/python3.6/site-packages/rasa/core/channels/facebook.py”, line 70, in handle for message in entry[“messaging”]: KeyError: ‘messaging’

here is an example of what I am doing :

class handoff(Action):

    def name(self):
        return 'action_check_for_human'

    def run(self, dispatcher, tracker, domain):

        user = User()
        user_id = user.get_sender_id(dispatcher,tracker,domain)
        user_name = user.get_user_name(dispatcher,tracker,domain, user_id)

        facebook_conversation = FacebookConversation()
        facebook_conversation.move_to_inbox(user_id) # move the conversation to INBOX


        return[ConversationPaused()]

Solved by implementing this instead