Prepare Analysis Configuration v5.15.0 broke JSON deserialization for SONARQUBE_SCANNER_PARAMS

Please provide

  • Operating system: Windows
  • Programming language you’re coding in: c#
  • Connected to SonarQube * Developer Edition Version 9.9 (build 65466)

And a thorough description of the problem / question:
Our build have stopped functionning, the submission to SQ step generates an error:


	at org.sonarsource.scanner.cli.Conf.loadEnvironmentProperties(Conf.java:78)
##[error]at org.sonarsource.scanner.cli.Conf.loadGlobalProperties(Conf.java:85)
##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.cli.Conf.loadGlobalProperties(Conf.java:85)
	at org.sonarsource.scanner.cli.Conf.loadGlobalProperties(Conf.java:85)
##[error]at org.sonarsource.scanner.cli.Conf.properties(Conf.java:59)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:70)
##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.cli.Conf.properties(Conf.java:59)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:70)
	at org.sonarsource.scanner.cli.Conf.properties(Conf.java:59)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:70)
##[error]at org.sonarsource.scanner.cli.Main.main(Main.java:62)
##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.cli.Main.main(Main.java:62)
	at org.sonarsource.scanner.cli.Main.main(Main.java:62)
##[error]Caused by: java.lang.UnsupportedOperationException: Not an object: "{\"sonar.host.url\":\"https://webapp-tcc-sonarqube-prd-cc-001.azurewebsites.net/\",\"sonar.login\":***,\"sonar.projectKey\":\"652779af1e31440ab17893d945fc6c05\",\"sonar.projectName\":\"Colibri\",\"sonar.projectVersion\":\"1.2.55\",\"sonar.scanner.metadataFilePath\":\"D:\\\\a\\\\_temp\\\\sonar\\\\3195\\\\1ff7d201-5cde-902f-8786-c08cdee49f87\\\\report-task.txt\",\"/d:sonar.scm.exclusions.disabled\":\"true\"}"
##[debug]Processed: ##vso[task.logissue type=error;]Caused by: java.lang.UnsupportedOperationException: Not an object: "{\"sonar.host.url\":\"https://webapp-tcc-sonarqube-prd-cc-001.azurewebsites.net/\",\"sonar.login\":***,\"sonar.projectKey\":\"652779af1e31440ab17893d945fc6c05\",\"sonar.projectName\":\"Colibri\",\"sonar.projectVersion\":\"1.2.55\",\"sonar.scanner.metadataFilePath\":\"D:\\\\a\\\\_temp\\\\sonar\\\\3195\\\\1ff7d201-5cde-902f-8786-c08cdee49f87\\\\report-task.txt\",\"/d:sonar.scm.exclusions.disabled\":\"true\"}"
Caused by: java.lang.UnsupportedOperationException: Not an object: "{\"sonar.host.url\":\"https://webapp-tcc-sonarqube-prd-cc-001.azurewebsites.net/\",\"sonar.login\":***,\"sonar.projectKey\":\"652779af1e31440ab17893d945fc6c05\",\"sonar.projectName\":\"Colibri\",\"sonar.projectVersion\":\"1.2.55\",\"sonar.scanner.metadataFilePath\":\"D:\\\\a\\\\_temp\\\\sonar\\\\3195\\\\1ff7d201-5cde-902f-8786-c08cdee49f87\\\\report-task.txt\",\"/d:sonar.scm.exclusions.disabled\":\"true\"}"
##[error]at org.sonarsource.scanner.api.internal.shaded.minimaljson.JsonValue.asObject(JsonValue.java:290)
	at org.sonarsource.scanner.api.Utils.loadEnvironmentProperties(Utils.java:55)
	... 5 more
##[debug]Processed: ##vso[task.logissue type=error;]at org.sonarsource.scanner.api.internal.shaded.minimaljson.JsonValue.asObject(JsonValue.java:290)
	at org.sonarsource.scanner.api.Utils.loadEnvironmentProperties(Utils.java:55)
	... 5 more
	at org.sonarsource.scanner.api.internal.shaded.minimaljson.JsonValue.asObject(JsonValue.java:290)
	at org.sonarsource.scanner.api.Utils.loadEnvironmentProperties(Utils.java:55)
	... 5 more
##[error]ERROR:
##[debug]Processed: ##vso[task.logissue type=error;]ERROR:
ERROR: 
##[error]The SonarScanner did not complete successfully
##[debug]Processed: ##vso[task.logissue type=error;]The SonarScanner did not complete successfully
The SonarScanner did not complete successfully
##[error]15:44:25.368  Post-processing failed. Exit code: 1
##[debug]Processed: ##vso[task.logissue type=error;]15:44:25.368  Post-processing failed. Exit code: 1
15:44:25.368  Post-processing failed. Exit code: 1
##[debug]Exit code 1 received from tool 'D:\a\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.15.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe'
##[debug]STDIO streams have closed for tool 'D:\a\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.15.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe'
##[debug]task result: Failed
##[error]The process 'D:\a\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.15.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 1
##[debug]Processed: ##vso[task.issue type=error;]The process 'D:\a\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.15.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 1
##[debug]Processed: ##vso[task.complete result=Failed;]The process 'D:\a\_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.15.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 1
Finishing: Publish Quality Gate

Now it’s obvious to me with the token replacement with *** and escape chars that the output here isn’t valid json anymore.

The Report is correctly uploaded, but the task fails

Hi,

Welcome to the community!

I’m confused. You seem to contradict yourself:

It’s difficult to know for sure without the full analysis log, or at least the full error/stacktrace, but that error

likely indicates that something “helpful” on your network interfered with analysis report submission.

You should probably start by talking to your network folks.

 
HTH,
Ann