frappe / twilio-integration

Twilio integration for ERPNext
Other
57 stars 74 forks source link

No outgoing whatsApp notification/message from ERPnext #40

Closed deepakc21 closed 1 year ago

deepakc21 commented 1 year ago

Issue: No outgoing whatsApp notification/message from ERPnext

Steps to reproduce the bug:

  1. Click on 'Purchase Invoice' in the "Buying" module.
  2. Click on 'Add Purchase invoice'.
  3. Enter details and Submit the invoice.

Actual result: The purchase invoice is submitted but no whatsapp message is sent to the "supplier" phone number.

**Note: 1) Twilio account configured and whatsapp templates approved. wp 2) Twilio settings and communication channel configured in EPRnext system. wp3 wp4 3) Notification created in EPRnext. wp2 wp1

deepakc21 commented 1 year ago

Error log info Title: Failed to send notification Error: Traceback (most recent call last): File "apps/twilio_integration/twilio_integration/twilio_integration/doctype/whatsapp_message/whatsapp_message.py", line 19, in send response = client.messages.create(**message_dict) File "env/lib/python3.10/site-packages/twilio/rest/api/v2010/account/message/init.py", line 89, in create payload = self._version.create(method='POST', uri=self._uri, data=data, ) File "env/lib/python3.10/site-packages/twilio/base/version.py", line 204, in create raise self.exception(method, uri, response, 'Unable to create record') twilio.base.exceptions.TwilioRestException: HTTP 400 error: Unable to create record: The 'To' number whatsapp:None is not a valid phone number.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "apps/twilio_integration/twilio_integration/overrides/notification.py", line 26, in send self.send_whatsapp_msg(doc, context) File "apps/twilio_integration/twilio_integration/overrides/notification.py", line 33, in send_whatsapp_msg WhatsAppMessage.send_whatsapp_message( File "apps/twilio_integration/twilio_integration/twilio_integration/doctype/whatsapp_message/whatsapp_message.py", line 51, in send_whatsapp_message message.send() File "apps/twilio_integration/twilio_integration/twilio_integration/doctype/whatsapp_message/whatsapp_message.py", line 28, in send frappe.logerror(e, title = ('Twilio WhatsApp Message Error')) TypeError: log_error() got multiple values for argument 'title'

deepakc21 commented 1 year ago

The field “To whatsApp number” is not taking any value. 1

deepakc21 commented 1 year ago

Hello, Please, can anyone help with the issue here.

deepakc21 commented 1 year ago

Hello, Please help with the issue here.

deepakc21 commented 1 year ago

Hello, Please anyone can look into this issue.

DataSoft2022 commented 1 year ago

Dears any help here

deepakc21 commented 1 year ago

Closing this bug as the solution has been provided on EPRnext forum. Link - https://discuss.erpnext.com/t/no-outgoing-whatsapp-notification-message-from-erpnext/95064/13