I am trying to enable github webhook for a repo that the bot has read access and its throwing out
"Sorry. There was an error on the server."
FYI, some of the repos that the bot has access to has the webhook enabled.
ASAP as this is blocking the github issues sync
Metadata Update from @phsmoura: - Issue priority set to: Waiting on Assignee (was: Needs Review) - Issue tagged with: medium-gain, medium-trouble, ops
Also, I have tried forget/reauth thing as suggested in this ticket
I found this error in the logs that seems to be related:
[Thu May 09 13:19:34.854022 2024] [:error] [pid 28609] 2024-05-09 13:19:34,853 INFO [urllib3.connectionpool][MainThread] Starting new HTTPS connection (1): api.github.com [Thu May 09 13:19:35.010838 2024] [:error] [pid 28609] [remote 192.168.1.14:152] mod_wsgi (pid=28609): Exception occurred processing WSGI script '/usr/share/github2fedmsg/github2fedmsg.wsgi'. [Thu May 09 13:19:35.010912 2024] [:error] [pid 28609] [remote 192.168.1.14:152] Traceback (most recent call last): [Thu May 09 13:19:35.010932 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/tw2/core/middleware.py", line 204, in __call__ [Thu May 09 13:19:35.010973 2024] [:error] [pid 28609] [remote 192.168.1.14:152] resp = req.get_response(self.app, catch_exc_info=True) [Thu May 09 13:19:35.010980 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/WebOb-1.4.1-py2.7.egg/webob/request.py", line 1313, in send [Thu May 09 13:19:35.011003 2024] [:error] [pid 28609] [remote 192.168.1.14:152] application, catch_exc_info=True) [Thu May 09 13:19:35.011008 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/WebOb-1.4.1-py2.7.egg/webob/request.py", line 1281, in call_application [Thu May 09 13:19:35.011021 2024] [:error] [pid 28609] [remote 192.168.1.14:152] app_iter = application(self.environ, start_response) [Thu May 09 13:19:35.011026 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/paste/deploy/config.py", line 291, in __call__ [Thu May 09 13:19:35.011044 2024] [:error] [pid 28609] [remote 192.168.1.14:152] return self.app(environ, start_response) [Thu May 09 13:19:35.011049 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/pyramid/router.py", line 242, in __call__ [Thu May 09 13:19:35.011065 2024] [:error] [pid 28609] [remote 192.168.1.14:152] response = self.invoke_subrequest(request, use_tweens=True) [Thu May 09 13:19:35.011084 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/pyramid/router.py", line 217, in invoke_subrequest [Thu May 09 13:19:35.011098 2024] [:error] [pid 28609] [remote 192.168.1.14:152] response = handle_request(request) [Thu May 09 13:19:35.011118 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/pyramid/tweens.py", line 21, in excview_tween [Thu May 09 13:19:35.011131 2024] [:error] [pid 28609] [remote 192.168.1.14:152] response = handler(request) [Thu May 09 13:19:35.011136 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/pyramid_tm/__init__.py", line 99, in tm_tween [Thu May 09 13:19:35.011146 2024] [:error] [pid 28609] [remote 192.168.1.14:152] reraise(*exc_info) [Thu May 09 13:19:35.011150 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/pyramid_tm/__init__.py", line 80, in tm_tween [Thu May 09 13:19:35.011157 2024] [:error] [pid 28609] [remote 192.168.1.14:152] response = handler(request) [Thu May 09 13:19:35.011162 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/pyramid/router.py", line 163, in handle_request [Thu May 09 13:19:35.011172 2024] [:error] [pid 28609] [remote 192.168.1.14:152] response = view_callable(context, request) [Thu May 09 13:19:35.011178 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/pyramid/config/views.py", line 355, in rendered_view [Thu May 09 13:19:35.011192 2024] [:error] [pid 28609] [remote 192.168.1.14:152] result = view(context, request) [Thu May 09 13:19:35.011197 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/pyramid/config/views.py", line 501, in _requestonly_view [Thu May 09 13:19:35.011205 2024] [:error] [pid 28609] [remote 192.168.1.14:152] response = view(request) [Thu May 09 13:19:35.011210 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/github2fedmsg/views/webhooks.py", line 234, in repo_toggle_enabled [Thu May 09 13:19:35.011229 2024] [:error] [pid 28609] [remote 192.168.1.14:152] toggle_webhook_directly(request, repo, token) [Thu May 09 13:19:35.011234 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/github2fedmsg/views/webhooks.py", line 267, in toggle_webhook_directly [Thu May 09 13:19:35.011242 2024] [:error] [pid 28609] [remote 192.168.1.14:152] actually_enabled = _get_webhook_status_directly(request, repo, token) [Thu May 09 13:19:35.011247 2024] [:error] [pid 28609] [remote 192.168.1.14:152] File "/usr/lib/python2.7/site-packages/github2fedmsg/views/webhooks.py", line 292, in _get_webhook_status_directly [Thu May 09 13:19:35.011255 2024] [:error] [pid 28609] [remote 192.168.1.14:152] raise IOError(d) [Thu May 09 13:19:35.011285 2024] [:error] [pid 28609] [remote 192.168.1.14:152] IOError: {u'documentation_url': u'https://docs.github.com/rest/repos/webhooks#list-repository-webhooks', u'message': u'Not Found', 'status_code': 404}
It seems that it's trying to reach something that returns 404.
We found the issue with the access settings, for anyone who faces this issue, when enabling the webhook, the user should have admin access to the repo and once the webhook is enabled, they can revert it back to read if they chose to.
Closing this ticket.
Metadata Update from @mohanboddu: - Issue close_status updated to: Fixed with Explanation - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.