Seeing an error "Error retrieving entitlements" since from last 3-4 days

  • ALM used (GitHub, Bitbucket Cloud, Azure DevOps): Azure DevOps

  • CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI: Azure DevOps

  • Languages of the repository: .NET

  • Issue Description:

    • We have created SOT and added sonarcloud projects to SOT
    • This SOT is setup in the service connection in Azure DevOps which would be used in our Azure DevOps pipelines to scan the code
    • Since from last 3-4 days, we are observing the error: ##[error]ERROR: Error retrieving entitlements, proceeding with analysis
      org.sonar.api.utils.MessageException: Project not found. Please check the ‘sonar.projectKey’ and ‘sonar.organization’ properties, the ‘SONAR_TOKEN’ environment variable, or contact the project administrator to check the permissions of the user the token belongs to
    • This error was not there before and no changes were made to any configurations
    • The complete log of error is as below:

    INFO: Load metrics repository
    INFO: Load metrics repository (done) | time=100ms
    INFO: Sensor cache enabled
    INFO: Inferred api base url ‘https://api.sonarcloud.io’ from host url ‘https://sonarcloud.io’.
    INFO: Load sensor cache
    INFO: Load sensor cache (76 KB) | time=515ms
    INFO: Inferred api base url ‘https://api.sonarcloud.io’ from host url ‘https://sonarcloud.io’.
    INFO: Inferred api base url ‘https://api.sonarcloud.io’ from host url ‘https://sonarcloud.io’.
    ##[error]ERROR: Error retrieving entitlements, proceeding with analysis
    org.sonar.api.utils.MessageException: Project not found. Please check the ‘sonar.projectKey’ and ‘sonar.organization’ properties, the ‘SONAR_TOKEN’ environment variable, or contact the project administrator to check the permissions of the user the token belongs to
    ERROR: Error retrieving entitlements, proceeding with analysis
    org.sonar.api.utils.MessageException: Project not found. Please check the ‘sonar.projectKey’ and ‘sonar.organization’ properties, the ‘SONAR_TOKEN’ environment variable, or contact the project administrator to check the permissions of the user the token belongs to

    INFO: Sensor C# Project Type Information [csharpenterprise]
    INFO: Sensor C# Project Type Information [csharpenterprise] (done) | time=4ms
    INFO: Sensor C# Analysis Log [csharpenterprise]
    INFO: Roslyn version: 5.0.0.0

Could you please guide us further in resolving this issue

1 Like

Hi,

Does the analysis run through to successful completion?

If not, can you provide the full log?

 
Thx,
Ann

Hi Ann,

The analysis runs through successfully

Hi,

Thanks for confirming that. I’m glad analysis succeeds, but you shouldn’t be seeing that error. I’m going to forward this to the team for a deeper look, but with low priority.

 
Ann

Where can we track the status of this issue. Is there a public bug tracker?

Hi @kenyoungdispel,

The developers haven’t picked this up yet, so there’s no ticket so far.

Are you also seeing this error? Do you work with the OP?

 
Ann

I am not sure what an OP is. Yes I am seeing the error. I have verified that I am using the correct project and organization, as well as having recreated our sonar_token in Scoped Organization Tokens that have access to the project. I can verify that the token is being used/accessed. We are using Github actions running SonarSource/sonarqube-scan-action@v7.0.0.

1 Like

Hi,

OP is an Original Poster or Original Post.

Could either of you add -Dsonar.verbose=true to your analysis command line and provide the full analysis log, starting from the analysis command itself, please?

 
Thx,
Ann

Hello,

I have seen the same issue in my analysis runs. I ran with the -Dsonar.verbose=true flag set and noticed a 403 error related to fetching billing entitlements. The token has Execute Analysis permissions, but it is not given billing API access. It seems strange that the scanner is trying to access billing info for analysis tokens.

1 Like

Hi @cjakins,

Welcome to the community and thanks for these additional details!

We’ve got some work happening right now around ADO, and this is probably a side effect. Unpleasant, but ultimately benign. Nonetheless, it is flagged for the developers.

 
Thx,
Ann

We are experiencing this same issue on GitHub, so it does not seem to be specific to ADO.

2 Likes

Hi Ann,

Please find full analysis log from our pipeline

Sonarcloud Log.zip (390.3 KB)

Hi all,

Thanks @akumbhar for the log. It was helpful for me to see the full context!

We have a fix for this in the works. It’s expected to land early next week.

In the meantime, I can only apologize for the confusion and thank you for your patience.

 
Ann

1 Like

Any news on that. We are having the same issue here.

Hi @geuken,

I have news, but unfortunately it’s not good news. As you’re aware, we haven’t rolled out the fix this week like I said we would. We initially underestimated the effort here, but hope to roll out the fix late next week.

 
Ann

Hi everybody

we are having the same issue

1 Like