On this page, you find common errors when using the app and how to resolve them.
1. Sonar issue information not found
Problem: In the pull request, you get the following error:
Resolution: Verify that you have configured a webhook for the Sonar for Bitbucket app and that the last delivery status is OK (green). If it is red like in the following screen shot, check our Webhook troubleshooting guide:
2. Failed to get Sonar statistics: Component key not found
Problem: In the pull request, you get the following error:
Resolution: The app requires that you analyze the branch of your pull requests with SonarQube. Check that you have a SonarQube project with that key:
If you are sure that there is a project in SonarQube with such a key in SonarQube, check the status of the following option in the repository settings of the Sonar for Bitbucket app:
If you use a community edition, the option has to be disabled.
If you use a commercial edition (like developer), this option needs to be enabled.
3. No annotations for SonarQube issues within a pull request
Problem: No annotations for SonarQube issues are shown in a pull request, although you expect some:
Resolution: Verify that you have configured a webhook in SonnarQube for the Sonar for Bitbucket app and that the last delivery status is OK (green). If it is red like in the following screen shot or if you don’t see a webhook entry for this app, check our Webhook troubleshooting guide:
4. Receiving the error message of “The ‘component’ parameter is missing”.
Problem: Receiving the error message of “The ‘component’ parameter is missing”.
Resolution: is caused by having an incompatible app version for their SonarQube version. They need to upgrade the app to the latest version, that should resolve the issue.
5. Webhook set up failed
Check if you have a webhook configuration in SonarQube Admin -> Configuration -> Webhooks with the name ch.mibex.bitbucket.sonar:
If there is no webhook configuration for Bitbucket, please check the Bitbucket Server log for any errors. Also, check that your network/firewall configurations allow communication between SonarQube and Bitbucket.
If you have a webhook configuration, you should see Sonar annotations in your pull requests, after a new analysis has been run.
If no annotations are shown, please check the webhook delivery status in SonarQube under SonarQube Admin -> Configuration -> Webhooks. If you see a 502 Server Unreachable error, then it could be either that
you are using localhost or a wildcard address for Bitbucket which is not supported because SonarQube does not allow these. Please use the real Bitbucket hostname instead.
you do not have a valid HTTPS certificate for Bitbucket configured in SonarQube's JVM or you have proxy settings that prevent SonarQube from connecting Bitbucket. Please see this community article for more information.