I have a build that hasn’t ran for about a month but without any changes I can see it has started to fail with this message:
Failed to query JRE metadata: GET https://api.sonarcloud.io/analysis/jres?os=linux&arch=x86_64 failed with HTTP 401. Please check the property sonar.token or the environment variable SONAR_TOKEN.
This is a Gradle Build and uses the Azure DevOps Service Connection to authenticate. I have confirmed the token in the Service Connection is valid by opening it and pressing the Verify button. The Build is a Java 21 build but that hasn’t changed since it last worked.