Bug #5471

Webhook integration failing: need more than 3 values to unpack

Added by Michael Davis over 4 years ago. Updated over 4 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
Commit Number:
Affected Version:


After updating from 4.11.5 to 4.12.2, our webhook integrations seem to be failing somewhere before RhodeCode actually makes the web request.

I couldn't find anything in any of the log files explaining what was happening, but the rhodecode_celery.log file indicated that the webhooks were going through celery. I was able to get the following error log by running profile/bin/celery events --app rhodecode.lib.celerylib.loader --ini ./rhodecode.ini -d from the ~/.rccontrol/enterprise-1 directory while triggering a webhook (sensitive details have been edited):

celery@rhodecode [2018-05-31 22:48:03.376921] task failed: rhodecode.integrations.types.webhook.post_to_webhook(c89cc6e8-e065-44ea-9d35-52c1e6ae3216) args=([('http://our.webhook.url/', {...}, {...})], {'password': '', 'custom_header_val': '', 'events': ['pullrequest-merge', 'pullrequest-create', 'repo-push', 'pullrequest-close', 'repo-create', 'pullrequest-review', 'pullrequest-comment', 'pullrequest-update'], 'url': 'http://our.webhook.url/', 'secret_token': '', 'method_type': 'post', 'custom_header_key': '', 'username': ''}) kwargs={} clock=8026579, exception=ValueError('need more than 3 values to unpack',), local_received=1527806883.38, pid=7057, traceback=Traceback (most recent call last):
  File "/opt/rhodecode/store/xbrm874sqm0iqz8cww1vy98l7br2bh7b-python2.7-celery-4.1.0/lib/python2.7/site-packages/celery/app/", line 374, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/opt/rhodecode/store/hrv1v1186rjwls7qbb8c3h45dv9n1frd-python2.7-rhodecode-enterprise-ce-4.11.5/lib/python2.7/site-packages/rhodecode/lib/celerylib/", line 294, in __call__
    return super(RequestContextTask, self).__call__(*args, **kwargs)
  File "/opt/rhodecode/store/xbrm874sqm0iqz8cww1vy98l7br2bh7b-python2.7-celery-4.1.0/lib/python2.7/site-packages/celery/app/", line 629, in __protected_call__
    return*args, **kwargs)
  File "/opt/rhodecode/store/hrv1v1186rjwls7qbb8c3h45dv9n1frd-python2.7-rhodecode-enterprise-ce-4.11.5/lib/python2.7/site-packages/rhodecode/integrations/types/", line 373, in post_to_webhook
    for url, token, headers, data in url_calls:
ValueError: need more than 3 values to unpack
, utcoffset=5


Updated by Marcin Kuzminski [CTO] over 4 years ago

webhook sligtly changed since 4.11 series, and what it seems from the logs you posted, maybe celery wasn't restarted correctly ? It would like some processes left over loaded the old 4.11 code, and it fails executing it.

Please try to restart celery so it loads new 4.12 webhooks code.


Updated by Michael Davis over 4 years ago

That seems to have been the case; it looks like things are working again after restarting everything. Sorry for the trouble, and thanks!

Also available in: Atom PDF