Webhook Not Triggering on Row Creation

Please fill in the questionnaire below.

Self-Hosted Installation and Setup Questions

Delete this section if you are using Baserow.io.

How have you self-hosted Baserow.

Elestio

What are the specs of the service or server you are using to host Baserow.

4 VCPU s - 8 GB RAM - 160 GB storage

Which version of Baserow are you using.

1.24.2

Describe the problem

I have webhook set up to trigger when new row gets created in table. That was fully functional until it suddendly stopped working. No changes to server or baserow configs have been made

Please attach full logs from all of Baserow’s services

Note: Webhook url is censored

May 31 08:03:00 xxxx-u14453 3854d2714a21[887]: #033[36m [EXPORT_WORKER][2024-05-31 08:03:00] Arguments: {‘hostname’: ‘export-worker@4655b3fba1a0’, ‘id’: ‘867ca34b-40a2-46b6-8cbd-4e614ae74537’, ‘name’: ‘baserow.contrib.database.webhooks.tasks.call_webhook’, ‘exc’: “TypeError(‘Object of type UUID is not JSON serializable’)”, ‘traceback’: ‘Traceback (most recent call last):\n File “/baserow/venv/lib/python3.11/site-packages/celery/app/trace.py”, line 451, in trace_task\n R = retval = fun(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^\n File “/baserow/venv/lib/python3.11/site-packages/celery/app/trace.py”, line 734, in protected_call\n return self.run(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n File “/baserow/backend/src/baserow/contrib/database/webhooks/tasks.py”, line 65, in call_webhook\n request, response = handler.make_request(method, url, headers, payload)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File “/baserow/backend/src/baserow/contrib/database/webhooks/handler.py”, line 339, in make_request\n response = request(\n ^^^^^^^^\n File “/baserow/venv/lib/python3.11/site-packages/advocate/api.py”, line 251, in wrapped_func\n return fun(*args, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^\n File “/baserow/venv/lib/python3.11/site-packages/advocate/api.py”, line 94, in request\n response = sess.request(method=method, url=url, **kwargs)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File “/baserow/venv/lib/python3.11/site-packages/requests/sessions.py”, line 575, in request\n prep = self.prepare_request(req)\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n File “/baserow/venv/lib/python3.11/site-packages/requests/sessions.py”, line 486, in prepare_request\n p.prepare(\n File “/baserow/venv/lib/python3.11/site-packages/requests/models.py”, line 371, in prepare\n self.prepare_body(data, files, json)\n File “/baserow/venv/lib/python3.11/site-packages/requests/models.py”, line 511, in prepare_body\n body = complexjson.dumps(json, allow_nan=False)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File “/usr/lib/python3.11/json/init.py”, line 238, in dumps\n **kw).encode(obj)\n ^^^^^^^^^^^\n File “/usr/lib/python3.11/json/encoder.py”, line 200, in encode\n chunks = self.iterencode(o, _one_shot=True)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File “/usr/lib/python3.11/json/encoder.py”, line 258, in iterencode\n return _iterencode(o, 0)\n ^^^^^^^^^^^^^^^^^\n File “/usr/lib/python3.11/json/encoder.py”, line 180, in default\n raise TypeError(f'Object of type {o.class.name} '\nTypeError: Object of type UUID is not JSON serializable\n’, ‘args’: ‘’, ‘kwargs’: “{‘webhook_id’: 10, ‘event_id’: UUID(‘078da7a7-26a9-47b4-b0d1-0854f30e9afc’), ‘event_type’: ‘rows.created’, ‘method’: ‘GET’, ‘url’: ‘https://xxxxxx.com/webhook/xxxx’, ‘headers’: {‘Content-type’: ‘application/json’, ‘X-Baserow-Event’: ‘rows.created’, ‘X-Baserow-Delivery’: ‘078da7a7-26a9-47b4-b0d1-0854f30e9afc’}, ‘payload’: {‘table_id’: 557, ‘database_id’: 22, ‘workspace_id’: 22, ‘event_id’: UUID(‘078da7a7-26a9-47b4-b0d1-0854f30e9afc’), ‘event_type’: ‘rows.created’, ‘items’: [{‘id’: 5470, ‘order’: ‘3773.00000000000000000000’, ‘Name’: ‘Account Type Test’, ‘Parent Tags (Categories)’: [{‘id’: 50, ‘value’: ‘Account Type’}], ‘Tag Digit’: None, ‘Tag Value’: ‘Account Type Test’, ‘Tag Status’: None, ‘Tag Storage’: , ‘Parent Tag ID’: [{‘id’: 50, ‘value’: ‘tag_415578’}], ‘Parent Tag Type’: [{‘id’: 50, ‘value’: {‘id’: 2634, ‘value’: ‘Context’, ‘color’: ‘light-brown’}}], ‘Tag ID (from Front)’: None, ‘Created on’: ‘2024-05-31’}]}}”, ‘description’: ‘raised unexpected’, ‘internal’: False} #033(B#033[m

Hi @davidok, we’ve actually encountered this problem in our production environment at the beginning of the week. We realized it happened after upgrading the Python version from 3.9 to 3.11.

You mentioned that you’re running version 1.24.2, but with our official Docker image, it was still on 3.9, so I’m not really sure how you can end up with Python 3.9 on Baserow 1.24.2. How are you self-hosting specifically? You mentioned Elestio, but do they have a different Python version?

Anyway, because released Baserow 1.25.1 earlier this week. This our images now officially includes Python 3.11, and we’ve resolved this problem as well. So updating to that version should work for you.

I upgraded Baserow instance to latest one and that resolved the issue.