Sentry 10 Bitbucket integration

I’ve run into an issue getting bitbucket integration working with Sentry 10 (10.1.0.dev0 12d55dc). I’ve got the general installation completed, and tested sending reports to the server. This is all working great. When I attempt to add the Bitbucket Integration I’m getting an error. I saw this post Setup Bitbucket Integration but am not getting the same issue. Here’s what I’ve got:

  • clean installation not an upgrade.
  • using the getsenty/onpremise repo for running Sentry via docker-compose.
  • nginx handling SSL termination and proxying 127.0.0.1:9000.
  • BITBUCKET_CONSUMER_KEY & BITBUCKET_CONSUMER_SECRET set in sentry.conf.py
  • Permissions in Bitbucket set. (Note: this is Bitbucket Cloud)

When the request is initiated, I’m presented with the expected modal:

The modal’s url is https://bitbucket.org/site/addons/authorize?descriptor_uri=https://sentry.***********/extensions/bitbucket/descriptor/

When grant access is pressed, I can see two requests occur in the logs:

GET /extensions/bitbucket/descriptor/ 200
POST /extensions/bitbucket/uninstalled/ 400

On the client side, the POST request to https://bitbucket.org/site/addons/approve results in a 500 error and a Bitbucket “Something went wrong” screen.

The POST back to sentry at /extensions/bitbucket/uninstalled resulting in a 400 has me wondering if I’ve got something misconfigured or if there’s been a change on Bitbucket’s side. I’ve also opened a request with Atlassian to see if I can get some debug info.

Any help is greatly appreciated!

I think, without the logs from that 400 response, we won’t be able to diagnose the issue. You can follow https://develop.sentry.dev/config/#logging to increase the logging level.

Can you also check if your nginx.conf file has this line in it: https://github.com/getsentry/onpremise/blob/adda25ee23b65314cc691d3a11548dbbbe64eef5/nginx/nginx.conf#L38

Thanks for the fast reply!

I’ll increase the logging level and see what I get. Nginx config has the line you provided, so that good.

I just got a response from Atlassian:

Thanks for reaching out to us and reporting the issue.

We are aware about this and our Dev team is currently working on fixing it. I will update you as soon as the issue is fixed. Please allow 24-48 hrs to respond.

Thanks for your patience while we are working on the fix.

I’m going to continue with increasing the log level on Sentry, but this is interesting from Atlassian.

1 Like

I turned up the logging to DEBUG by setting the env var in docker-compose.yml. That resulted in tons of info from the worker, but nothing about the post data. Also, nothing was logged internally by sentry.

I ended up capturing the post data via nginx. Here’s a pastebin of the post data for /extensions/bitbucket/uninstalled/ with some redactions: https://pastebin.com/zwtn92yf

I’ve received notification from Atlassian that they have resolved the issue. I have confirmed the integration is working again. @BYK thanks for taking the time to look into this.

1 Like