Unexpected character encountered while parsing value: <. Path ' ', line 0 , position 0

HI,

I am trying to use Sonar task in Azure Devops Pipeline. But it seems to fail in the initial prepare analyze stage with this error - Unexpected character encountered while parsing value: <. Path ’ ', line 0 , position 0. There are no other details to this error nor there are any logs in the sonar server. The azure devops extension of sonarqube that I am using is 4.21.0 and the sonarqube version is 6.2. IS there any issues with the versions used? Any pointers/directions to resolve this issue is highly appreciated. Thanks!

Hi @Santrip ,

Welcome to SonarSource Community! :sonarsource:

First, please upgrade to SonarQube 9.0 first. You are using a very old version that may be causing your problems. If you still have issues, please post the entire stack trace and logs here. Please enable debug logs by adding sonar.verbose=true to your Prepare SonarQube Configuration step in the extraProperties key.

HI,

Thanks for the update. I did try running the pipeline by setting sonar.verbose=true. But still there isnt any other additional details available in the log-

2021-07-08T08:50:46.5194594Z (node:1096) Warning: Use Cipheriv for counter mode of aes-256-ctr

2021-07-08T08:50:46.6035763Z [command]C:__w_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.21.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe begin /k:projectkeyvaluehere

2021-07-08T08:50:46.7222751Z SonarScanner for MSBuild 5.2.1

2021-07-08T08:50:46.7223551Z Using the .NET Framework version of the Scanner for MSBuild

2021-07-08T08:50:46.8609305Z Pre-processing started.

2021-07-08T08:50:46.8736567Z Preparing working directories…

2021-07-08T08:50:47.0511314Z 08:50:46.96 Updating build integration targets…

2021-07-08T08:50:47.2015256Z 08:50:47.116 08:50:47.116 WARNING: The version of SonarQube you are using is deprecated. Analyses will fail starting 6.0 release of the Scanner for .NET

2021-07-08T08:50:47.2529230Z ##[error]08:50:47.163 Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.

2021-07-08T08:50:47.2540654Z 08:50:47.163 Unexpected character encountered while parsing value: <. Path ‘’, line 0, position 0.

2021-07-08T08:50:47.2542295Z ##[error]08:50:47.163 Pre-processing failed. Exit code: 1

2021-07-08T08:50:47.2543598Z 08:50:47.163 Pre-processing failed. Exit code: 1

2021-07-08T08:50:47.2847610Z ##[error]The process ‘C:__w_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\4.21.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’ failed with exit code 1

2021-07-08T08:50:47.3214838Z ##[section]Finishing: Prepare analysis on SonarQube

Please upgrade to the latest version of SonarQube (either 8.9 or 9.0) and try again. The error is something I’ve seen in very old versions of SonarQube.