Hey y’all! I’ve been using SonarCloud for almost a year now, and I’m absolutely loving it. I have it integrated into my GitHub Actions with sonarsource/sonarcloud-github-action@master, and recently, the action has been failing saying that Node.js 12 is not supported. However, it’s running in a Docker container provided by SonarCloud in the action, and I’m using the most up-to-date version of the action. Does anyone know what’s going on?
Came to report the same issue. Existing implementation of GitHub Action using SonarSource/sonarcloud-github-action@master is suddenly complaining that NodeJS 12 is no longer accepted. The GitHub Action is running on the SonarSource supplied image. Please update the image to use a newer version of Node.
The version of node.js (12) you have used to run this analysis is deprecated and we stopped accepting it.
Please update to at least node.js 14. You can find more information here: https://docs.sonarcloud.io/appendices/scanner-environment/
This error message looks buggy, because it assumes that my node version is 12 or below, while it is actually 16:
Run actions/setup-node@v3
Found in cache @ /opt/hostedtoolcache/node/16.20.0/x64
Environment details
Same here. I try to re-run it on old branch that works fine before. And it’s fail.
The test is fail when testing javascript. But with golang scan, it works fine.
Same issue here.
I triple checked that GH actions is not using nodejs 12, and all GH hosted runners are using 16 by default (according to an old article).
Manually setup-node to use version 16, no luck.
Checked this thread, assuming it’s a SC issue at this stage.
The version of node.js (12) you have used to run this analysis is deprecated and we stopped accepting it.
Please update to at least node.js 14. You can find more information here: https://docs.sonarcloud.io/appendices/scanner-environment/
When will the docker image be fixed? As I’m sure is the case for many others, we have numerous workflows using this action and changing all of them for the short-term to change them back isn’t the best use of time.
As a sidenote, why is master suggested as the tag to use? Can the action move to using major version tags such as v1 like a majority of actions do? That way, if an issue like this arises again the major version tag can be pointed back to a previous release until a proper fix for the new release is out.
Even though you use branch that works, anything after 1.8 will fail -it works before. They didn’t made fail change to repo. Instead they push sonar-scanner-cli:4.8 again with error which is outside the code.
Out team uses the sonarsource/sonar-scanner-cli:4 container image (tekton pipelines) and pipelines across all our application repositories are failing. For some, we have been reverting to sonarsource/sonar-scanner-cli:4.7. (this reminds us that we should probably template that)
Thanks Jeremy. Could Sonar consider adding “issues” support to your action repo on GitHub please? Users of the action are already users of GitHub and that’s naturally the first place we check. I couldn’t find this info using Google, I came from the code commit on the release.
RE: using major version / master. That wouldn’t have helped in this case because the erroneous version is still a v1.X version.
afaict, this is an unintentional breaking change, though yes I agree pinning major versions of GH Actions should be the default because then any breaking changes can be made without breaking people’s workflows that are using master