Failed to create Bitbucket Server Quality Report - HTTP 400 - annotations required

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
    ** SonarScanner for MSBuild 4.6, Using the .NET Core version of the Scanner for MSBuild
    ** SonarQube Scanner 3.3.0.1492
    ** run on Jenkins, windows agent
    ** Java 1.8.0_161 Oracle Corporation (64-bit)
    ** SonarQube server 7.7.0

  • error observed:

Unable to contact Bitbucket server: 400 {"errors":[{"context":"annotations","message":"The field 'annotations' must be present and have at least 1 annotation","exceptionName":null}]}

It seems that it may have gotten at least one report through, but nothing newer has been posted

Here are logs from bitbucket server (over multiple runs):

<sonarqube server ip>,0:0:0:0:0:0:0:1 | https | <data> | - | 2019-03-25 13:14:18,165 | "PUT /rest/insights/1.0/projects/<key>/repos/<slug>/commits/<id>/reports/com.sonarsource.sonarqube HTTP/1.1" | "" "okhttp/3.14.0" | - | - | - | - | - | - |
<sonarqube server ip>,0:0:0:0:0:0:0:1 | https | <data> | <service account> | 2019-03-25 13:14:18,348 | "PUT /rest/insights/1.0/projects/<key>/repos/<slug>/commits/<id>/reports/com.sonarsource.sonarqube HTTP/1.1" | "" "okhttp/3.14.0" | 200 | 724 | 756 | access-token:id:<service account token id> | 183 | 18kb86g |
<sonarqube server ip>,0:0:0:0:0:0:0:1 | https | <data> | - | 2019-03-25 13:14:18,359 | "DELETE /rest/insights/1.0/projects/<key>/repos/<slug>/commits/<id>/reports/com.sonarsource.sonarqube/annotations HTTP/1.1" | "" "okhttp/3.14.0" | - | - | - | - | - | - |
<sonarqube server ip>,0:0:0:0:0:0:0:1 | https | <data> | <service account> | 2019-03-25 13:14:18,441 | "DELETE /rest/insights/1.0/projects/<key>/repos/<slug>/commits/<id>/reports/com.sonarsource.sonarqube/annotations HTTP/1.1" | "" "okhttp/3.14.0" | 204 | 0 | 0 | access-token:id:<service account token id> | 82 | 1kycyzk |
<sonarqube server ip>,0:0:0:0:0:0:0:1 | https | <data> | - | 2019-03-25 13:14:18,459 | "POST /rest/insights/1.0/projects/<key>/repos/<slug>/commits/<id>/reports/com.sonarsource.sonarqube/annotations HTTP/1.1" | "" "okhttp/3.14.0" | - | - | - | - | - | - |
<sonarqube server ip>,0:0:0:0:0:0:0:1 | https | <data> | <service account> | 2019-03-25 13:14:18,640 | "POST /rest/insights/1.0/projects/<key>/repos/<slug>/commits/<id>/reports/com.sonarsource.sonarqube/annotations HTTP/1.1" | "" "okhttp/3.14.0" | 400 | 18 | 142 | access-token:id:<service account token id> | 181 | 1cdkar |
<sonarqube server ip>,0:0:0:0:0:0:0:1 | https | <data> | - | 2019-03-25 13:19:00,345 | "PUT /rest/insights/1.0/projects/<key>/repos/<slug>/commits/<id>/reports/com.sonarsource.sonarqube HTTP/1.1" | "" "okhttp/3.14.0" | - | - | - | - | - | - |
<sonarqube server ip>,0:0:0:0:0:0:0:1 | https | <data> | <service account> | 2019-03-25 13:19:00,466 | "PUT /rest/insights/1.0/projects/<key>/repos/<slug>/commits/<id>/reports/com.sonarsource.sonarqube HTTP/1.1" | "" "okhttp/3.14.0" | 200 | 724 | 756 | access-token:id:<service account token id> | 121 | imsf4f |
<sonarqube server ip>,0:0:0:0:0:0:0:1 | https | <data> | - | 2019-03-25 13:19:00,473 | "DELETE /rest/insights/1.0/projects/<key>/repos/<slug>/commits/<id>/reports/com.sonarsource.sonarqube/annotations HTTP/1.1" | "" "okhttp/3.14.0" | - | - | - | - | - | - |
<sonarqube server ip>,0:0:0:0:0:0:0:1 | https | <data> | <service account> | 2019-03-25 13:19:00,543 | "DELETE /rest/insights/1.0/projects/<key>/repos/<slug>/commits/<id>/reports/com.sonarsource.sonarqube/annotations HTTP/1.1" | "" "okhttp/3.14.0" | 204 | 0 | 0 | access-token:id:<service account token id> | 69 | 19lilxj |
<sonarqube server ip>,0:0:0:0:0:0:0:1 | https | <data> | - | 2019-03-25 13:19:00,549 | "POST /rest/insights/1.0/projects/<key>/repos/<slug>/commits/<id>/reports/com.sonarsource.sonarqube/annotations HTTP/1.1" | "" "okhttp/3.14.0" | - | - | - | - | - | - |
<sonarqube server ip>,0:0:0:0:0:0:0:1 | https | o<data> | <service account> | 2019-03-25 13:19:00,622 | "POST /rest/insights/1.0/projects/<key>/repos/<slug>/commits/<id>/reports/com.sonarsource.sonarqube/annotations HTTP/1.1" | "" "okhttp/3.14.0" | 400 | 18 | 142 | access-token:id:<service account token id> | 72 | 1hykej5 |
  • steps to reproduce: analysis on a branch without issues found

Hi Josiah,
Thank you for reporting, this is a bug. The warning is harmless (PR decoration did actually happen) but it should not appear. I opened a ticket to fix the problem: https://jira.sonarsource.com/browse/SONAR-11877.

2 Likes