SonarCloud: Your SonarQube instance seems to have an invalid license

I’m using SonarCloud with GitHub Actions to analyse pull requests. It’s an ASP.NET project, using MSBuild 5.0.1

It has been working without any problems until a few days ago it suddenly starting failing with ‘Your SonarQube instance seems to have an invalid license’. There seems to be no issue with the license, we are still under our lines of code limit and have no indication of issues on sonarcloud.io

I have read some people experiencing the same issue, which seem to have happened to them around 30 days ago. These were reported for SonarQube and seem to be a bug with the latest version, where they have downgraded and resolved the problem.

Since I am using SonarCloud rather than SonarQube, I haven’t found a way to use an older version. It also seems strange that I have been using SonarCloud with no problems in the last month and it’s only just happened 3-4 days ago.

Has anyone had similar issues? Is there a way to specify using an older version of SonarCloud when using GitHub Actions? (I couldn’t find any parameter for it on the docs).

Cheers!

Hi @LSO107 and welcome to the community.

Could you please upgrade your scanner version to 5.0.4 please ?

Where there is a slight bug in the detection, it should at least pass this check and you should be good to go.

Let me know.
Thank you.
Mickaël

Hi Mickael,

Thanks for you response.

Might seem a bit silly but I have been trying to upgrade the scanner and can’t seem to figure out how.

I tried using the dotnet tool install --global dotnet-sonarscanner --version 5.0.4 but sonarcloud still uses 5.0.1, is there a parameter within the sonarscanner that I can use? I couldn’t see it on the docs.

Cheers!

Hi,

Can you try the dotnet tool update instead ?

Hi Mickael,

I have tried installing and updating - both seem be ok, but then the sonarscanner still seems to choose to use 5.0.1, so I’m not sure if sonarcloud is pointing to MSBuild 5.0.1 internally or where it is finding that version from?

I’m using GitHub Actions and using the YAML file that is provided on SonarCloud.io for .NET projects. The command starts with .\.sonar\scanner\dotnet-sonarscanner begin

Thanks

Wow that’s interesting ! Do you have maybe some kind of cache somewhere ?

Thank you for your help Mikael!

I have managed to get it sorted. Just quite a bit of confusion around the bug, then the cache… In the process of trying to fix it another issue was introduced that was preventing the project from building too.

But it’s all fixed now, thanks for pointing me in the right direction

Thanks for letting me know ! Glad it works now !

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.