Last analysis has failed b462340c-103a-4366-9be8-4805852da94e

Morning,

We have received the following error: The last analysis has failed - ID b462340c-103a-4366-9be8-4805852da94e. We’re unable to see any logs or other information regarding the problem. Please can you advise what the issue is?

Many thanks,

Vic

Errors only occur on merge to main branch. PRs successfully scan.

  • ALM used (GitHub)
  • CI system used (GHA)

Error message:

Project or branch in report (projectKey) does not match the project or branch under which it was submitted (projectKey:BRANCH:main)

Analysis ID: 55c64375-4b17-4b5a-b14d-785aa8fa2535

Can you provide any more information?

Many thanks,

Mungo

Hi all,

Welcome to the community and thanks for these reports!

I’ve combined your threads because under the covers you’re getting the same error - nothing you had anything to do with and nothing you can do anything about - and we’ve declared an incident.

I’ll update you when we know more.

 
Ann

Thanks for the update

Thanks for the update! :folded_hands:

Hi,

Could y’all provide your main branch names in SonarQube Cloud. I.e. when you look at your project in the UI, is it labeled master or main?

 
Thx,
Ann

Main :slight_smile:

Also main.

Hi again,

Thanks for your initial answers. We’re still working on reproducing this reliably. Have the main branches for these projects ever been renamed in GitHub? (Are you both using GitHub?)

And when you look in SonarQube Cloud at the branches list, is there only a main or is there also a master?

 
Thx,
Ann

We only have main - it’s the only long lived branch and has only ever been called main. We use GitHub and there has never been a master branch in that repo

main only. Also on Github.

The default branch was renamed from master to main on 7 July 2020. I’m confident that we were not using Sonar at that time.

Hi,

It looks like your projects have gotten into a bad state in the DB. We’re still working on how/why. In the meantime, can you try this workaround:

  • Go to Administration → Update key
  • Change the project key
  • Try a new analysis with the updated key. I.e. make sure you change your sonar.projectKey value to what you updated to in the UI.

 
Ann

It looks like analysis on the master branch has been failing for us for the last couple of days (last success was 7 days ago). There were no changes on our side regarding Sonar configuration.

Our setup consists of:

  • Bitbucket Cloud
  • Gradle plugin for running Sonar scan in CircleCI
  • Code base is in Java

The relevant message from the analysis error banner:

The last analysis has failed. If it keeps on failing after several attempts, please contact us on Community forum (opens in new tab) and provide the following failing analysis ID: 4458b5e1-0225-4b9a-a866-cba8bd4a0a92.

I did have a look at the Background tasks and for the failed analysis tasks, it does emit an error:

Project or branch in report (organization_project-key) does not match the project or branch under which it was submitted (organization_project-key:BRANCH:master)

Any help would be greatly appreciated

Kind regards,

Jure

Hi Jure,

I’ve moved your post into this existing incident thread because it’s the same problem reported here. We’re still working on identifying the root cause and a fix, but there is a workaround:

 
Ann

Hi all,

We’re still actively investigating this. If you can, we’d like some more information from you.

First, can we have your full analysis configuration? Here, I mean everything

  • relevant envvars
  • analysis command-line params
  • property file contents

All redacted, obvs :sweat_smile:

Also, can you each explicitly (re)state whether you’re using automatic analysis, or a CI, and if the latter exactly which platform and scanner you’re using?

This would be very helpful!

 
Thx!
Ann

Hi Ann,

We are generating our configuration programmatically and submitting scans through https://www.npmjs.com/package/sonarqube-scanner@^4.3.2

We are using Github and using GHA (with self hosted runners).

These are the first few lines from our logs. I hope that these provide the versions that you require.

[INFO]  Bootstrapper: Platform: linux x64
[INFO]  Bootstrapper: Server URL: https://sonarcloud.io
[INFO]  Bootstrapper: Version: 4.3.5
[INFO]  Bootstrapper: JRE provisioning is supported
[INFO]  Bootstrapper: No Cache found for JRE
[INFO]  Bootstrapper: Download starting...
[INFO]  Bootstrapper: Download complete
[INFO]  Bootstrapper: Downloaded JRE to libs/combined-explore/features/combined-explore/.sonar/cache/aeab55d064a1a27a3744b0880b9b414077b4ed2b1790817eea3df60aec946431/OpenJDK21U-jre_x64_linux_hotspot_21.0.9_10.tar.gz
[INFO]  Bootstrapper: No Cache found for SonarScanner Engine
[INFO]  Bootstrapper: Download starting...
[INFO]  Bootstrapper: Download complete
[INFO]  Bootstrapper: Downloaded SonarScanner Engine to libs/combined-explore/features/combined-explore/.sonar/cache/c7db4da4e86aac21e05184379d2278d2c7b74ef7f960790995c7aaa9f90fa21a/sonarcloud-scanner-engine-12.25.0.2810-all.jar
[INFO]  ScannerEngine: Starting SonarScanner Engine...

Still working updating that key and re-running an analysis.

Hi Ann,

Just confirming that after a rename, the analysis has successfully completed.

However, we have dozens of projects, I’d prefer not to have to rename each one.

Thanks.

Hi,

Thanks for confirming the workaround. We understand that this doesn’t work as a “solution” and we’re still actively investigating.

 
Ann

Hi all,

We’re currently testing a fix, which should roll out tomorrow. :tada:

 
Ann