Unable to integrate with bitbucket

Template for a good new topic, formatted with Markdown:

  • ALM used Bitbucket Cloud
  • CI system used Bitbucket Cloud
  • Steps to reproduce: Go to any repository in bitbucket → Repository settings → Sonarcloud settings → Unable to bind the repo to the sonarcloud project

We are receiving the following login page in bitbucket:

Login with bitbucket button takes you to the following page:

The widgets for the already binded projects are working fine. However, when we go to the settings, we recieve the same “Login with bitbucket” button.

We tried to troubleshoot with another admin account, other browsers(edge, firefox, chrome) without any success.

Edge developer tool errors list of the bitbucket page:

An interesting error notification is:

However, opening sonarcloud.io/api/projects/search_my_projects?ps=500 on another tab lists all of our projects without any issue:

Hey there.

This also happens to me (Chrome-based browser), so I am going to flag this as an issue.

In the meantime, assuming you have a bound organization, you should still be able to bind projects from the SonarCloud-side, either by creating a new bound project:

Or adjusting the binding in the Project Administration > General Settings > Project Binding

1 Like

Hi Team

i am also facing the same issue in my environment, can someone please provide the solution. i am also trying to do the same with chrome browser

Hi, thanks for the alternate solution.

However, not sure if this will work for us as we have two sonarcloud instances for the same bitbucket.

Is there any expected resolution time for the actual issue?

Hi @Faheem_Husain ,

I am taking a look into what is causing this issue. I have been able to recreate the problem and am currently investigating the cause of this. I will update here when I have some more useful information.

Shane

@Faheem_Husain & @masroora ,

I brought this subject up internally and was informed that unfortunately due to incompatibility with this functionality, we will be decommissioning the support of binding directly through bitbucket. Therefore bindings would need to be handled either by through importing the project directly in Sonarcloud or by using the method of binding the project mentioned above by @Colin.

You mentioned that you have 2 instances of Sonarcloud, is there any reason for this?

Shane

Therefore bindings would need to be handled either by through importing the project directly in Sonarcloud

Do you have a link for this? I am assuming, this won’t still display widget on bitbucket.

You mentioned that you have 2 instances of Sonarcloud, is there any reason for this?

Mainly for segregation of repo among our 2 internal teams.

Hey @Faheem_Husain

You’ll still get the widget, but as Shane mentioned it will ultimately require a bound organization and bound projects.

We suggest using permissions to segregate repos among internal teams (which is probably what you’ve done on the Bitbucket side) rather than creating two separate unbound organizations.

The best (and really, only) migration path here is to choose the organization you want to move forward with, bind it to Bitbucket, bind your projects and then migrate projects from the other org into the original org.