Recently we upgraded from Sonarqube Enterprise edition 9.3 to Sonarqube Enterprise edition 10.2 after that we are receiving the below warning for NPM code post scan analysis.
“” SonarQube Warning - The property ‘sonar.login’ is deprecated and will be removed in the future. Please use the ‘sonar.token’ property instead when passing a token."
We have similar issue;
I’ve changed sonar.login to sonar.token in sonar-project.properties file and gave the value which has been generated from SonarQube server with the following steps : MyAccount->Security->Generate Token. (I’ve used Project Analysis Token)
However, I still see below warning message in Sonar Scanner logs even there is no sonar.login property in sonar-project.properties file.
WARN: The property ‘sonar.login’ is deprecated and will be removed in the future. Please use the ‘sonar.token’ property instead when passing a token.
After which version sonar.token will be started to use? We use Sonar 10.2 and the message below is logged on Sonar Scanner.
The property ‘sonar.login’ is deprecated and will be removed in the future. Please use the ‘sonar.token’ property instead when passing a token.
I’ve changed sonar.login to sonar.token in sonar-project.properties file and gave the value which has been generated from SonarQube server with the following steps : MyAccount->Security->Generate Token. (I’ve used Project Analysis Token)
However, I still see warning message in Sonar Scanner logs even there is no sonar.login property in sonar-project.properties file.
I’ve changed sonar.login to sonar.token in sonar-project.properties file and gave the value which has been generated from SonarQube server with the following steps : MyAccount->Security->Generate Token. (I’ve used Project Analysis Token)
It would be great if you could open a separate topic, instead of adding your issue into mine. This would cause confusion to both me and the person who helps.
So you’re both seeing both properties in your contexts. The good news is that you can ignore the deprecation message because you’re covered.
Now the mystery is where the extra property is coming from. @Srisidharth I appreciate the screenshot showing that you’re setting the token value into a spot in the UI labeled ‘Token’. I suspect what’s happening here is that the extension is populating both values for backward compatibility, and this will go away with a future update.