ERPNext Webhook Error

Hi, everybody!

Thank you for your hard work with ERPNext, we are ready to get started using it in our company. We ran into a little trouble using Integration → Webhooks.

We have setup the webhook and while trying to work with the other server, we did not experience any troubles when sending the information to the other server. But now that we are making trials with several users, sometimes the webhook information is not received on the other server.

I’m attaching an image of the error we are getting, any help will be greatly appreciated.


1 Like

Looks like your endpoint answers with the HTTP error code 500 when ERPNext tries to send a newly submitted Sales Invoice.

500 indicates that your “server encountered an unexpected condition that prevented it from fulfilling the request.”

So I would look for errors on your server, not in ERPNext.


Thank you for replying so quickly.

We did check with the logs on our server, and realized that the 500 error is being sent back because the server is not receiving any information. Since the function requires the information to execute, PHP is displaying the error and returning it to ERPNext.

The weird thing is that some Sales Invoices data gets sent, but some don’t. For example: We did receive the data for Sales Invoice 0001, 0002, 0003 but not 0004. We then received 0005, but not 0006 and 0007.

We thought we had the latest version of ERPNext when we installed it, but apparently we were still on version 10. We just upgraded and hopefully, that will help us with this error.

Any other idea of what might be causing this? Could it be due to session expiration?


We started testing again this morning with the updated ERPNext install and we are still getting the error.

Any ideas?

{‘event’: None, ‘retry’: 0, ‘log’: <function log at 0x7f6e53c68578>, ‘site’: u’site1.local’, ‘job_name’: u’frappe.integrations.doctype.webhook.webhook.enqueue_webhook’, ‘method_name’: u’frappe.integrations.doctype.webhook.webhook.enqueue_webhook’, ‘method’: <function enqueue_webhook at 0x7f6e53a800c8>, ‘user’: u’’, ‘kwargs’: {‘doc’: <erpnext.accounts.doctype.sales_invoice.sales_invoice.SalesInvoice object at 0x7f6e53e5d1d0>, ‘webhook’: {u’webhook_doctype’: u’Sales Invoice’, u’webhook_docevent’: u’on_submit’, u’name’: u’Sales Invoice-on_submit’}}, ‘is_async’: True}
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/”, line 103, in execute_job
File “/home/frappe/frappe-bench/apps/frappe/frappe/integrations/doctype/webhook/”, line 73, in enqueue_webhook
raise e
ReadTimeout: HTTPSConnectionPool(host=‘’, port=443): Read timed out. (read timeout=5)

Now it says that ERPNext didn’t receive any response from your server within five seconds after sending the data.


We have not yet been able to solve the issue, but with your advice were able to figure out that the PHP script is exiting in the middle of the process and thus returning a 500 error to ERPNext and everything on the ERPnext side is working as intended.

Thank you for your help, now we know where to go from here. :smiley:


Ola y beinvenidos a ERPNext sonyvec

Tropicalrambler is active here in your corner of the world

Just a suggestion you may wish to connect with him

have fun


Thank you for the suggestion!

I will contact them is anything else comes up. We have been working on solving the issue from our end, our server is having some issues, which are causing the 500 server response.