Getting Error message: Compute Engine task main component key is null

Template for a good new topic, formatted with Markdown:

  • Bitbucket Cloud

  • CI system used Bitbucket Cloud,

  • Scanner command used when applicable - pipe: sonarsource/sonarcloud-scan:1.2.1

  • Languages of the repository PHP

  • Running QualityGate with the below for a PHP application,
    - pipe: sonarsource/sonarcloud-quality-gate:0.1.4
    gets below error message:

Error message: Compute Engine task main component key is null.

Also the number of lines scanned of the organization repos is within the subscription limit.

Hi @sonar2 ,

Could you please provide the ID of your failed analysis so that I can have a look at it?

Thanks!

Where do I find that, this repo does not show any analysis results on SonarCloud event after setting the New Code.

Hi @sonar2 ,

From your project, click on Administration, and then Background Tasks

I invite you to get more details from: https://sonarcloud.io/documentation/digging-deeper/background-tasks/

I do not see any details under the BackGround Tasks.

This repo I did some changes to make a change of the default branch from master to develop.

In between I deleted the project and added back, from there it does not show any results.

Deletion of the project did something went wrong ?

If you deleted the project, then associated tasks were deleted as well.
You will need to re-submit an analysis to SonarCloud and then see again what the outcome was
I hope this helps

Can you check with this:

Background task: AXucqyygLF3mVb5NTxdH
Submission time: 2021-08-31T14:44:29+0000
Failure time: 2021-08-31T14:44:30+0000

HI @AlxO ,

Any update with the above task details, were you able to see why it always returns the message " Compute Engine Task main component key is null"

Hi Dnellutla,

Apologies for not getting back to you earlier. No, I could not find the reason why you got this error. I could see there are other projects in your organization that are successful: maybe an approach would be to compare how they’re set-up on both the :sonarcloud: and Bitbucket sides?

HI @AlxO , There is no difference in the setup when compared to other projects.
I deleted the project and added back, But there is no change in the analysis.

What are the other reasons why Sonar Cloud always returns

Compute Engine taks main component key is null.

Project: Reptrax_US (develop)
Background task: AX0kehCkkecGlsi8oJeP
Submission time: 2021-11-15T16:41:59+0000
Failure time: 2021-11-15T16:41:59+0000

Error message: Compute Engine task main component key is null.

Hi @sonar2 ,

Changing the project key (and then updating the pipeline to use the new key) is a workaround for that issue, as found in this other thread. Could you please try that? We are still investigating for the root cause.

If the problem reappears after changing the key, could you please give us:

  • the full scanner log of the first time the error appears
  • the new project key
  • the background task ID
  • the submission time
  • any information of something that happened to the project or to the organization: manual deletion of a branch? of the project ? of the organization? an analysis failing for another reason just before? the time since the previous analysis of the impacted branch/ of the project ?..

Thanks a lot, and my apologies for the long time this investigation is taking.
Claire