Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message send from WhatsApp to frappe whatsapp is not rendering in the chat UI #110

Open
Abilash-Ravichandran opened this issue Nov 20, 2024 · 1 comment

Comments

@Abilash-Ravichandran
Copy link

Abilash-Ravichandran commented Nov 20, 2024

Issue:

I am trying to integrate frappe_whatsapp with Frappe CRM, which I have running on Windows using Docker. When I send a message from Frappe CRM to WhatsApp, the message is sent successfully and displayed in the UI. However, when a user sends a message to the Frappe-integrated WhatsApp number, I only receive a notification about the message, but it is not displayed in the chat interface.

Additional observations:

  • The message sent from Frappe CRM to WhatsApp is received successfully in WhatsApp.
  • When a message is sent from a mobile phone to the Frappe-integrated WhatsApp number, I observe the following log in the console:

Error:

2024-11-20 12:17:03 06:47:03 web.1      | Traceback (most recent call last):
2024-11-20 12:17:03 06:47:03 web.1      |   File "apps/frappe/frappe/app.py", line 118, in application
2024-11-20 12:17:03 06:47:03 web.1      |     response = frappe.api.handle(request)
2024-11-20 12:17:03 06:47:03 web.1      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-11-20 12:17:03 06:47:03 web.1      |   File "apps/frappe/frappe/api/__init__.py", line 49, in handle
2024-11-20 12:17:03 06:47:03 web.1      |     data = endpoint(**arguments)
2024-11-20 12:17:03 06:47:03 web.1      |            ^^^^^^^^^^^^^^^^^^^^^
2024-11-20 12:17:03 06:47:03 web.1      |   File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
2024-11-20 12:17:03 06:47:03 web.1      |     return frappe.handler.handle()
2024-11-20 12:17:03 06:47:03 web.1      |            ^^^^^^^^^^^^^^^^^^^^^^^
2024-11-20 12:17:03 06:47:03 web.1      |   File "apps/frappe/frappe/handler.py", line 49, in handle
2024-11-20 12:17:03 06:47:03 web.1      |     data = execute_cmd(cmd)
2024-11-20 12:17:03 06:47:03 web.1      |            ^^^^^^^^^^^^^^^^
2024-11-20 12:17:03 06:47:03 web.1      |   File "apps/frappe/frappe/handler.py", line 85, in execute_cmd
2024-11-20 12:17:03 06:47:03 web.1      |     return frappe.call(method, **frappe.form_dict)
2024-11-20 12:17:03 06:47:03 web.1      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-11-20 12:17:03 06:47:03 web.1      |   File "apps/frappe/frappe/__init__.py", line 1807, in call
2024-11-20 12:17:03 06:47:03 web.1      |     return fn(*args, **newargs)
2024-11-20 12:17:03 06:47:03 web.1      |            ^^^^^^^^^^^^^^^^^^^^
2024-11-20 12:17:03 06:47:03 web.1      |   File "apps/frappe/frappe/utils/typing_validations.py", line 32, in wrapper
2024-11-20 12:17:03 06:47:03 web.1      |     return func(*args, **kwargs)
2024-11-20 12:17:03 06:47:03 web.1      |            ^^^^^^^^^^^^^^^^^^^^^
2024-11-20 12:17:03 06:47:03 web.1      |   File "apps/frappe_whatsapp/frappe_whatsapp/utils/webhook.py", line 15, in webhook
2024-11-20 12:17:03 06:47:03 web.1      |     return post()
2024-11-20 12:17:03 06:47:03 web.1      |            ^^^^^^
2024-11-20 12:17:03 06:47:03 web.1      |   File "apps/frappe_whatsapp/frappe_whatsapp/utils/webhook.py", line 149, in post
2024-11-20 12:17:03 06:47:03 web.1      |     "message": message[message_type].get(message_type),
2024-11-20 12:17:03 06:47:03 web.1      |                ~~~~~~~^^^^^^^^^^^^^^
2024-11-20 12:17:03 06:47:03 web.1      | KeyError: 'unsupported'
2024-11-20 12:17:03 06:47:03 web.1      | 
2024-11-20 12:17:03 06:47:03 web.1      | 172.18.0.1 - - [20/Nov/2024 06:47:03] "POST /api/method/frappe_whatsapp.utils.webhook.webhook HTTP/1.1" 500 -```
@Abilash-Ravichandran Abilash-Ravichandran changed the title Message send from WhatsApp to frappe whatsapp is rendering in the chat UI Message send from WhatsApp to frappe whatsapp is not rendering in the chat UI Nov 20, 2024
@moizsami
Copy link

moizsami commented Dec 5, 2024

Even I am facing the same issue, is there any solution for this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants