Github integration problem

Just to remind you that you can always use sentry.io if you need support, or dive into the code and help us fix the issue if you have the time.

1 Like

Hello, faced the same issue here, but for gitlab.

Setup details:
Gitlab on-prem v13.9
Sentry on-prem v21.4.0.dev0

I do not think mine is a time setting issue as both servers have the same date and time.

On the first try, I faced a ConnectionError /extensions/provider/{provider_id}/setup/
I figured this could be because my gitlab instance url needs to be resolved using my DNS server, which the docker containers did not have access to. Thus, I added the extra_hosts option in my docker.compose.yml. On subsequent attempts to integrate Gitlab, this was no longer an issue.

However, I still face the pipeline error on the next few attempts. I’ve set the sentry logs level to debug and this was what was shown:

Apr 01 10:31:55 localhost.localdomain docker-compose[78160]: clickhouse_1                                | 2021.04.01 02:31:55.864182 [ 100 ] {} <Information> HTTPHandler: Done processing query
Apr 01 10:31:55 localhost.localdomain docker-compose[78160]: snuba-sessions-consumer_1                   | 2021-04-01 02:31:55,876 Completed processing <Batch: 1 message, open for 1.03 seconds>.
Apr 01 10:31:56 localhost.localdomain docker-compose[78160]: web_1                                       | 02:31:56 [INFO] sentry.superuser: superuser.request (url='http://sentry.xxx.com/extensions/gitlab/setup/?completed_installation_guide' method='GET' ip_address='172.22.0.1' user_id=1)
Apr 01 10:31:56 localhost.localdomain docker-compose[78160]: nginx_1                                     | 172.22.0.1 - - [01/Apr/2021:02:31:56 +0000] "GET /extensions/gitlab/setup/?completed_installation_guide HTTP/1.1" 200 10970 "http://sentry.xxx.com/organizations/sentry/integrations/gitlab/setup/?" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36" "-"
Apr 01 10:31:56 localhost.localdomain docker-compose[78160]: nginx_1                                     | 172.22.0.1 - - [01/Apr/2021:02:31:56 +0000] "POST /api/1/envelope/?sentry_key=xxxxxxxxxxxxxxxxxxxxxxxxxx&sentry_version=7 HTTP/1.1" 200 2 "http://sentry.xxx.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36" "-"
Apr 01 10:31:57 localhost.localdomain docker-compose[78160]: clickhouse_1                                | 2021.04.01 02:31:57.239782 [ 100 ] {ef046f0a-a6d9-4f66-99b5-0337b0b75725} <Information> executeQuery: Read 1 rows, 185.00 B in 0.012 sec., 86 rows/sec., 15.61 KiB/sec.
Apr 01 10:31:57 localhost.localdomain docker-compose[78160]: clickhouse_1                                | 2021.04.01 02:31:57.240156 [ 100 ] {} <Information> HTTPHandler: Done processing query
Apr 01 10:31:57 localhost.localdomain docker-compose[78160]: snuba-sessions-consumer_1                   | 2021-04-01 02:31:57,242 Completed processing <Batch: 1 message, open for 1.02 seconds>.
Apr 01 10:32:18 localhost.localdomain docker-compose[78160]: web_1                                       | 02:32:18 [INFO] sentry.superuser: superuser.request (url='http://sentry.xxx.com/extensions/gitlab/setup/?completed_installation_guide' method='POST' ip_address='172.22.0.1' user_id=1)
Apr 01 10:32:18 localhost.localdomain docker-compose[78160]: web_1                                       | 02:32:18 [INFO] sentry.integration.gitlab: gitlab.setup.installation-config-view.success (base_url='http://gitlab.xxx.com' client_id='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' verify_ssl=False)
Apr 01 10:32:18 localhost.localdomain docker-compose[78160]: web_1                                       | 02:32:18 [INFO] sentry.identity: identity.token-exchange-error (error='invalid_state' pipeline_state='b64fe006d3c44fc29b7aa1e84238cbf5')

Would appreciate any help, thanks in advance!