SonarQube Azure Devops Token Not Working

Versions: SonarQube: 7.9.2.30863, SonarQube Azure Devops Extension: 4.11.0

Problem:

Service connection success message: “Connected to service using credentials”

Pipeline Config:


I get the following error asking for creds, indicating that the token is not working:
Error: Error during SonarScanner execution
Error: Not authorized. Please check the properties sonar.login and sonar.password.

I add sonar.login, sonar.password, and it asks for sonar.projectKey.
I add sonar.projectKey and analysis runs successfully, but I get an error.

Could not fetch metrics
API GET ‘/apimetrics/search’ failed, status code was: 401

In SonarQube, I look at the token information and it indicates that the token has never been used.

Tried:
Looked under “Variables” Tab… only default settings there.
There are no sonar project property files in the project.
I’ve tried deleting and re-creating the service connection.

Thank you for your help! I greatly appreciate it!

Hello @paulsonmr,

There’s a few things that are not properly configured in you setup I guess:

First on SonarQube:

  • Create a user (call it azdo for instance) and give this user: Create Projects and Execute Analysis global permissions. See https://docs.sonarqube.org/latest/instance-administration/security/ about user creation and how to grant permissions (Menu Administration --> Security --> Users --> Create User, and Administration --> Security --> Global permissions)
  • For this user, create a token (Menu Administration --> User then on the line of the azdo user click on the icon in the “Tokens” column. Pick the name you want for the token (anything is OK, eg “Token for analysis”), click Generate and the token is created. Save/Copy the token, it ill be displayed only once.

Then on Azure DevOps:

  • In the Service Connection settings, enter the URL of your SonarQube server (it should be accessible from Azure DevOps through this URL), and the token that you generated in SonarQube
  • In the pipeline configuration you simply need to select your SonarQube endpoint (that you named BuildTestProject1 which is not a very good name, it should be called SonarQube or something like that).
    The fact that you selected that endpoint will also define the token to use so…
  • In the sonar-project.properties and Additional Projects there should be NO presence of sonar.login or sonar.password property at all. Everything is in the token of the SonarQube endpoint

Let me know if that works.

Olivier

Olivier, Thank you for your help.

I followed your instructions.

I created a user and generated a token. The user does have execute analysis and create project permissions. I deleted the old service connection and created a new one with that token. I went into the build pipeline, selected the new token, and deleted everything out of Additional Properties section.

I reran the build and received this error:

ERROR: Error during SonarScanner execution
ERROR: Not authorized. Please check the properties sonar.login and sonar.password.
ERROR: The process ‘C:\buildagent_work_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\sonar-scanner.bat’ failed with exit code 1

Hello Mallory,

Can you share the full logs of you build (from start to error), not only a short extract. (This is a good practice that you can apply for any future post). The reasons for the problem may be hinted much earlier in the logs.

Olivier

This is the log for the entire Run Code Analysis task. Below is the successful log for the Prepare Analysis task.

@OlivierK Part 1

2020-07-14T16:29:33.5432390Z ##[section]Starting: Build and Test 2.7
2020-07-14T16:29:34.5931968Z ##[section]Starting: Initialize job
2020-07-14T16:29:34.5932239Z Current agent version: '2.153.1'
2020-07-14T16:29:34.6055495Z Prepare build directory.
2020-07-14T16:29:34.6403935Z Set build variables.
2020-07-14T16:29:34.6442095Z Download all required tasks.
2020-07-14T16:29:34.6992966Z Start tracking orphan processes.
2020-07-14T16:29:34.7058867Z ##[section]Finishing: Initialize job
2020-07-14T16:29:34.7587092Z ##[section]Starting: Checkout
2020-07-14T16:29:34.8329281Z ==============================================================================
2020-07-14T16:29:34.8329434Z Task         : Get sources
2020-07-14T16:29:34.8329540Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-07-14T16:29:34.8329623Z Version      : 1.0.0
2020-07-14T16:29:34.8329700Z Author       : Microsoft
2020-07-14T16:29:34.8329789Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-07-14T16:29:34.8329922Z ==============================================================================
2020-07-14T16:29:35.3080664Z Syncing repository: Test Project (Git)
2020-07-14T16:29:35.3180376Z Prepending Path environment variable with directory containing 'git.exe'.
2020-07-14T16:29:35.3266021Z ##[command]git version
2020-07-14T16:29:35.3859970Z git version 2.21.0.windows.1
2020-07-14T16:29:35.4072486Z ##[command]git lfs version
2020-07-14T16:29:36.3017229Z git-lfs/2.10.0 (GitHub; windows amd64; go 1.12.7; git a526ba6b)
2020-07-14T16:29:36.3017841Z ##[command]git config --get remote.origin.url
2020-07-14T16:29:36.3032365Z ##[command]git config gc.auto 0
2020-07-14T16:29:36.3033237Z ##[command]git config --get-all http.http://redacted.us/DefaultCollection/Test%20Project/_git/Test%20Project.extraheader
2020-07-14T16:29:36.3034058Z ##[command]git config --get-all http.proxy
2020-07-14T16:29:36.3410940Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --force --tags --prune --progress --no-recurse-submodules origin
2020-07-14T16:29:36.5816598Z ##[command]git checkout --progress --force c659c721cd88be4e5ae63415baa2b242c487fe0b
2020-07-14T16:29:36.5832411Z HEAD is now at c659c72 Deleted Any
2020-07-14T16:29:36.5871816Z ##[section]Finishing: Checkout
2020-07-14T16:29:36.5985688Z ##[section]Starting: Use Python 2.7
2020-07-14T16:29:36.6078946Z ==============================================================================
2020-07-14T16:29:36.6079057Z Task         : Use Python version
2020-07-14T16:29:36.6079150Z Description  : Use the specified version of Python from the tool cache, optionally adding it to the PATH
2020-07-14T16:29:36.6079245Z Version      : 0.151.1
2020-07-14T16:29:36.6079317Z Author       : Microsoft Corporation
2020-07-14T16:29:36.6079415Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/use-python-version
2020-07-14T16:29:36.6079507Z ==============================================================================
2020-07-14T16:29:36.8986104Z Found tool in cache: Python 2.7.17 x64
2020-07-14T16:29:36.9028014Z Prepending PATH environment variable with directory: C:\buildagent\_work\_tool\Python\2.7.17\x64
2020-07-14T16:29:36.9029230Z Prepending PATH environment variable with directory: C:\buildagent\_work\_tool\Python\2.7.17\x64\Scripts
2020-07-14T16:29:36.9030447Z Prepending PATH environment variable with directory: C:\Windows\system32\config\systemprofile\AppData\Roaming\Python\Python27\Scripts
2020-07-14T16:29:36.9107276Z ##[section]Finishing: Use Python 2.7
2020-07-14T16:29:36.9233517Z ##[section]Starting: Publish Test Results **/test-results.xml
2020-07-14T16:29:36.9327160Z ==============================================================================
2020-07-14T16:29:36.9327276Z Task         : Publish Test Results
2020-07-14T16:29:36.9327360Z Description  : Publish test results to Azure Pipelines
2020-07-14T16:29:36.9327448Z Version      : 2.153.5
2020-07-14T16:29:36.9327520Z Author       : Microsoft Corporation
2020-07-14T16:29:36.9328643Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-test-results
2020-07-14T16:29:36.9328756Z ==============================================================================
2020-07-14T16:29:37.8183848Z [command]C:\buildagent\_work\_tasks\PublishTestResults_0b0f01ed-7dde-43ff-9cbb-e48954daf9b1\2.153.5\modules\TestResultsPublisher.exe @C:\buildagent\_work\_temp\35724bc0-c5ef-11ea-a58f-9d155c9223f5.txt
2020-07-14T16:29:37.8188827Z No Result Found to Publish 'C:\buildagent\_work\2\s\junit\test-results.xml'.
2020-07-14T16:29:37.8189242Z No build level attachments to publish.
2020-07-14T16:29:38.0859197Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-14T16:29:38.0859415Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.0859567Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.0859753Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.0859933Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-14T16:29:38.0860112Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.0860277Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.0860428Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.0861396Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-14T16:29:38.0861802Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.0862176Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.0862488Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.0862888Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
2020-07-14T16:29:38.0863217Z    --- End of inner exception stack trace ---
2020-07-14T16:29:38.0863516Z    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2020-07-14T16:29:38.0863834Z    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
2020-07-14T16:29:38.0864103Z    at System.Threading.Tasks.Task`1.get_Result()
2020-07-14T16:29:38.0864609Z    at Microsoft.TeamFoundation.TestClient.PublishTestResults.PublishTestResultsEndpointManager.TryGetFeatureFlagStateFromService(FeatureAvailabilityHttpClient featureAvailabilityHttpClient, String FFName, Boolean& featureFlagState) in D:\V2.0\A1\_work\56\s\Ta\Tasks\PublishTestResults\PublishTestResultsEndpointManager.cs:line 159
2020-07-14T16:29:38.0865140Z ---> (Inner Exception #0) Microsoft.VisualStudio.Services.Common.VssServiceException: TestManagement.Server.TestLogStoreOnTCMService
2020-07-14T16:29:38.0865540Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-14T16:29:38.0868674Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.0869104Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.0869404Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.0869778Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-14T16:29:38.0870956Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.0871254Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.0871544Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.0871940Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-14T16:29:38.0872278Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.0872549Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.0872854Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.0873209Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0<---
2020-07-14T16:29:38.0873456Z 
2020-07-14T16:29:38.0965402Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-14T16:29:38.0966006Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.0966520Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.0967013Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.0968205Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-14T16:29:38.0968728Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.0969244Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.0969733Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.0970270Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-14T16:29:38.0970780Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.0971263Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.0971757Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.0972275Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
2020-07-14T16:29:38.0972765Z    --- End of inner exception stack trace ---
2020-07-14T16:29:38.0973254Z    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2020-07-14T16:29:38.0973733Z    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
2020-07-14T16:29:38.0974213Z    at System.Threading.Tasks.Task`1.get_Result()
2020-07-14T16:29:38.0975411Z    at Microsoft.TeamFoundation.TestClient.PublishTestResults.PublishTestResultsEndpointManager.TryGetFeatureFlagStateFromService(FeatureAvailabilityHttpClient featureAvailabilityHttpClient, String FFName, Boolean& featureFlagState) in D:\V2.0\A1\_work\56\s\Ta\Tasks\PublishTestResults\PublishTestResultsEndpointManager.cs:line 159
2020-07-14T16:29:38.0976032Z ---> (Inner Exception #0) Microsoft.VisualStudio.Services.Common.VssServiceException: TestManagement.Server.PublishOnTestLogStoreEnabled
2020-07-14T16:29:38.0976573Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-14T16:29:38.0977887Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.0978475Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.0978966Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.0979527Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-14T16:29:38.0980036Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.0980520Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.0981015Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.0981524Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-14T16:29:38.0982041Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.0982526Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.0983006Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.0983533Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0<---
2020-07-14T16:29:38.0983973Z 
2020-07-14T16:29:38.1108481Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-14T16:29:38.1109026Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1109505Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1109978Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1110473Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-14T16:29:38.1110936Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1111424Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1111887Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1112365Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-14T16:29:38.1112836Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1113286Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1113743Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1114243Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
2020-07-14T16:29:38.1114695Z    --- End of inner exception stack trace ---
2020-07-14T16:29:38.1115322Z    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2020-07-14T16:29:38.1115805Z    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
2020-07-14T16:29:38.1116241Z    at System.Threading.Tasks.Task`1.get_Result()
2020-07-14T16:29:38.1116779Z    at Microsoft.TeamFoundation.TestClient.PublishTestResults.PublishTestResultsEndpointManager.TryGetFeatureFlagStateFromService(FeatureAvailabilityHttpClient featureAvailabilityHttpClient, String FFName, Boolean& featureFlagState) in D:\V2.0\A1\_work\56\s\Ta\Tasks\PublishTestResults\PublishTestResultsEndpointManager.cs:line 159
2020-07-14T16:29:38.1118171Z ---> (Inner Exception #0) Microsoft.VisualStudio.Services.Common.VssServiceException: TestManagement.Server.TestLogStoreTelemetryDisabledFF
2020-07-14T16:29:38.1118705Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-14T16:29:38.1119202Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1125500Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1126102Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1126712Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-14T16:29:38.1128957Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1129089Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1129453Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1129720Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-14T16:29:38.1129875Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1130019Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1130139Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1130332Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0<---
2020-07-14T16:29:38.1130429Z 
2020-07-14T16:29:38.1224914Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-14T16:29:38.1225320Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1225600Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1225873Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1226186Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-14T16:29:38.1226458Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1226725Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1226967Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1227275Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-14T16:29:38.1228240Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1229235Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1229545Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1229861Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
2020-07-14T16:29:38.1231128Z    --- End of inner exception stack trace ---
2020-07-14T16:29:38.1231351Z    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2020-07-14T16:29:38.1231604Z    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
2020-07-14T16:29:38.1231815Z    at System.Threading.Tasks.Task`1.get_Result()
2020-07-14T16:29:38.1232236Z    at Microsoft.TeamFoundation.TestClient.PublishTestResults.PublishTestResultsEndpointManager.TryGetFeatureFlagStateFromService(FeatureAvailabilityHttpClient featureAvailabilityHttpClient, String FFName, Boolean& featureFlagState) in D:\V2.0\A1\_work\56\s\Ta\Tasks\PublishTestResults\PublishTestResultsEndpointManager.cs:line 159
2020-07-14T16:29:38.1232663Z ---> (Inner Exception #0) Microsoft.VisualStudio.Services.Common.VssServiceException: TestManagement.Server.TestLogStoreOnTCMService
2020-07-14T16:29:38.1232983Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-14T16:29:38.1233304Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1233559Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1233804Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1234130Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-14T16:29:38.1235169Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1235490Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1235767Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1236078Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-14T16:29:38.1236402Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1236639Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1236911Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1237601Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0<---
2020-07-14T16:29:38.1237849Z 
2020-07-14T16:29:38.1323378Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-14T16:29:38.1324587Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1325693Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1326730Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1328420Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-14T16:29:38.1329644Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1331742Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1332866Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1333918Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-14T16:29:38.1335158Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1336144Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1337127Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1338711Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
2020-07-14T16:29:38.1339831Z    --- End of inner exception stack trace ---
2020-07-14T16:29:38.1340802Z    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2020-07-14T16:29:38.1341826Z    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
2020-07-14T16:29:38.1342782Z    at System.Threading.Tasks.Task`1.get_Result()
2020-07-14T16:29:38.1343945Z    at Microsoft.TeamFoundation.TestClient.PublishTestResults.PublishTestResultsEndpointManager.TryGetFeatureFlagStateFromService(FeatureAvailabilityHttpClient featureAvailabilityHttpClient, String FFName, Boolean& featureFlagState) in D:\V2.0\A1\_work\56\s\Ta\Tasks\PublishTestResults\PublishTestResultsEndpointManager.cs:line 159
2020-07-14T16:29:38.1345138Z ---> (Inner Exception #0) Microsoft.VisualStudio.Services.Common.VssServiceException: TestManagement.Server.PublishOnTestLogStoreEnabled
2020-07-14T16:29:38.1346247Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-14T16:29:38.1347276Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1348819Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1349880Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1350919Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-14T16:29:38.1351969Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1352933Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1353929Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1355004Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-14T16:29:38.1356015Z --- End of stack trace from previous location where exception was thrown ---
2020-07-14T16:29:38.1356989Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-14T16:29:38.1358448Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-14T16:29:38.1359761Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0<---
2020-07-14T16:29:38.1360678Z 
2020-07-14T16:29:38.2150758Z ##[section]Finishing: Publish Test Results **/test-results.xml
2020-07-14T16:29:38.2347014Z ##[section]Starting: Prepare analysis on SonarQube
2020-07-14T16:29:38.2472732Z ==============================================================================
2020-07-14T16:29:38.2472836Z Task         : Prepare Analysis Configuration
2020-07-14T16:29:38.2472931Z Description  : Prepare SonarQube analysis configuration
2020-07-14T16:29:38.2473005Z Version      : 4.11.0
2020-07-14T16:29:38.2473084Z Author       : sonarsource
2020-07-14T16:29:38.2473171Z Help         : Version: 4.11.0. [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2020-07-14T16:29:38.2473287Z ==============================================================================
2020-07-14T16:29:38.9872650Z SYSTEMVSSCONNECTION exists true
2020-07-14T16:29:39.0740625Z ##[section]Finishing: Prepare analysis on SonarQube
2020-07-14T16:29:39.0838606Z ##[section]Starting: Run Code Analysis
2020-07-14T16:29:39.1450965Z ==============================================================================
2020-07-14T16:29:39.1451103Z Task         : Run Code Analysis
2020-07-14T16:29:39.1451237Z Description  : Run scanner and upload the results to the SonarQube server.
2020-07-14T16:29:39.1451352Z Version      : 4.11.0
2020-07-14T16:29:39.1451460Z Author       : sonarsource
2020-07-14T16:29:39.1451641Z Help         : Version: 4.11.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

Part 2

More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2020-07-14T16:29:39.1451826Z ==============================================================================
2020-07-14T16:29:39.4435461Z [command]C:\Windows\system32\cmd.exe /D /S /C "C:\buildagent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\sonar-scanner.bat "--from=ScannerAzureDevOps/4.11.0""
2020-07-14T16:29:39.6062792Z INFO: Scanner configuration file: C:\buildagent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
2020-07-14T16:29:39.6063389Z INFO: Project root configuration file: NONE
2020-07-14T16:29:39.6439183Z INFO: SonarScanner 4.4.0.2170
2020-07-14T16:29:39.6439660Z INFO: Java 13 Oracle Corporation (64-bit)
2020-07-14T16:29:39.6439871Z INFO: Windows Server 2016 10.0 amd64
2020-07-14T16:29:40.0500832Z INFO: User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
2020-07-14T16:29:40.2170979Z INFO: Scanner configuration file: C:\buildagent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
2020-07-14T16:29:40.2172898Z INFO: Project root configuration file: NONE
2020-07-14T16:29:40.2173027Z INFO: Analyzing on SonarQube server 7.9.2
2020-07-14T16:29:40.2173173Z INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
2020-07-14T16:29:40.6429662Z INFO: Load global settings
2020-07-14T16:29:40.6754108Z INFO: ------------------------------------------------------------------------
2020-07-14T16:29:40.6754760Z INFO: EXECUTION FAILURE
2020-07-14T16:29:40.6755174Z INFO: ------------------------------------------------------------------------
2020-07-14T16:29:40.6757673Z INFO: Total time: 1.094s
2020-07-14T16:29:40.6931353Z INFO: Final Memory: 4M/20M
2020-07-14T16:29:40.6931698Z INFO: ------------------------------------------------------------------------
2020-07-14T16:29:40.7011508Z ##[error]ERROR: Error during SonarScanner execution
ERROR: Not authorized. Please check the properties sonar.login and sonar.password.
ERROR:
2020-07-14T16:29:40.7031485Z ERROR: Error during SonarScanner execution
2020-07-14T16:29:40.7031696Z ERROR: Not authorized. Please check the properties sonar.login and sonar.password.
2020-07-14T16:29:40.7031802Z ERROR: 
2020-07-14T16:29:40.7274748Z ##[error]The process 'C:\buildagent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
2020-07-14T16:29:40.7330308Z ##[section]Finishing: Run Code Analysis
2020-07-14T16:29:40.7445902Z ##[section]Starting: Checkout
2020-07-14T16:29:40.7535962Z ==============================================================================
2020-07-14T16:29:40.7536069Z Task         : Get sources
2020-07-14T16:29:40.7536166Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-07-14T16:29:40.7536249Z Version      : 1.0.0
2020-07-14T16:29:40.7536329Z Author       : Microsoft
2020-07-14T16:29:40.7536410Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-07-14T16:29:40.7536650Z ==============================================================================
2020-07-14T16:29:41.1561542Z Cleaning any cached credential from repository: Test Project (Git)
2020-07-14T16:29:41.1667950Z ##[section]Finishing: Checkout
2020-07-14T16:29:41.1813194Z ##[section]Starting: Finalize Job
2020-07-14T16:29:41.1849855Z Start cleaning up orphan processes.
2020-07-14T16:29:41.1868501Z ##[section]Finishing: Finalize Job
2020-07-14T16:29:41.1979482Z ##[section]Finishing: Build and Test 2.7

Logs for the 401 error I get if I provide login/password/projectKey in additional properties section of Prepare Analysis on SonarQube task:

Part 1

2020-07-23T11:10:13.4059296Z ##[section]Starting: Build and Test 2.7
2020-07-23T11:10:14.5431026Z ##[section]Starting: Initialize job
2020-07-23T11:10:14.5431346Z Current agent version: '2.153.1'
2020-07-23T11:10:14.5560761Z Prepare build directory.
2020-07-23T11:10:14.6139488Z Set build variables.
2020-07-23T11:10:14.6177437Z Download all required tasks.
2020-07-23T11:10:14.7165501Z Start tracking orphan processes.
2020-07-23T11:10:14.7220111Z ##[section]Finishing: Initialize job
2020-07-23T11:10:14.7749356Z ##[section]Starting: Checkout
2020-07-23T11:10:14.8556588Z ==============================================================================
2020-07-23T11:10:14.8556773Z Task         : Get sources
2020-07-23T11:10:14.8556886Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-07-23T11:10:14.8556978Z Version      : 1.0.0
2020-07-23T11:10:14.8557063Z Author       : Microsoft
2020-07-23T11:10:14.8557151Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-07-23T11:10:14.8557288Z ==============================================================================
2020-07-23T11:10:15.3540210Z Syncing repository: Test Project (Git)
2020-07-23T11:10:15.3693149Z Prepending Path environment variable with directory containing 'git.exe'.
2020-07-23T11:10:15.3918287Z ##[command]git version
2020-07-23T11:10:15.5331301Z git version 2.21.0.windows.1
2020-07-23T11:10:15.5556189Z ##[command]git lfs version
2020-07-23T11:10:16.9358647Z git-lfs/2.10.0 (GitHub; windows amd64; go 1.12.7; git a526ba6b)
2020-07-23T11:10:16.9451881Z ##[command]git config --get remote.origin.url
2020-07-23T11:10:16.9978947Z ##[command]git config gc.auto 0
2020-07-23T11:10:17.0366680Z ##[command]git config --get-all http.http://sass-devops.udri.us/DefaultCollection/Test%20Project/_git/Test%20Project.extraheader
2020-07-23T11:10:17.0787680Z ##[command]git config --get-all http.proxy
2020-07-23T11:10:17.1189097Z ##[command]git -c http.extraheader="AUTHORIZATION: bearer ***" fetch --force --tags --prune --progress --no-recurse-submodules origin
2020-07-23T11:10:17.8612059Z ##[command]git checkout --progress --force c659c721cd88be4e5ae63415baa2b242c487fe0b
2020-07-23T11:10:17.8613267Z HEAD is now at c659c72 Deleted Any
2020-07-23T11:10:17.8650380Z ##[section]Finishing: Checkout
2020-07-23T11:10:17.8829147Z ##[section]Starting: Use Python 2.7
2020-07-23T11:10:17.8955209Z ==============================================================================
2020-07-23T11:10:17.8955323Z Task         : Use Python version
2020-07-23T11:10:17.8955421Z Description  : Use the specified version of Python from the tool cache, optionally adding it to the PATH
2020-07-23T11:10:17.8955526Z Version      : 0.151.1
2020-07-23T11:10:17.8955603Z Author       : Microsoft Corporation
2020-07-23T11:10:17.8955709Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/use-python-version
2020-07-23T11:10:17.8955809Z ==============================================================================
2020-07-23T11:10:18.7711414Z Found tool in cache: Python 2.7.17 x64
2020-07-23T11:10:18.7754378Z Prepending PATH environment variable with directory: C:\buildagent\_work\_tool\Python\2.7.17\x64
2020-07-23T11:10:18.7755864Z Prepending PATH environment variable with directory: C:\buildagent\_work\_tool\Python\2.7.17\x64\Scripts
2020-07-23T11:10:18.7756289Z Prepending PATH environment variable with directory: C:\Windows\system32\config\systemprofile\AppData\Roaming\Python\Python27\Scripts
2020-07-23T11:10:18.7827329Z ##[section]Finishing: Use Python 2.7
2020-07-23T11:10:18.7920152Z ##[section]Starting: Publish Test Results **/test-results.xml
2020-07-23T11:10:18.8017367Z ==============================================================================
2020-07-23T11:10:18.8017505Z Task         : Publish Test Results
2020-07-23T11:10:18.8017608Z Description  : Publish test results to Azure Pipelines
2020-07-23T11:10:18.8017721Z Version      : 2.153.5
2020-07-23T11:10:18.8017824Z Author       : Microsoft Corporation
2020-07-23T11:10:18.8019083Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/test/publish-test-results
2020-07-23T11:10:18.8019219Z ==============================================================================
2020-07-23T11:10:19.3742182Z [command]C:\buildagent\_work\_tasks\PublishTestResults_0b0f01ed-7dde-43ff-9cbb-e48954daf9b1\2.153.5\modules\TestResultsPublisher.exe @C:\buildagent\_work\_temp\18280e00-ccd5-11ea-9f67-cbd19e6890b5.txt
2020-07-23T11:10:20.0878157Z No Result Found to Publish 'C:\buildagent\_work\2\s\junit\test-results.xml'.
2020-07-23T11:10:20.0902208Z No build level attachments to publish.
2020-07-23T11:10:20.3935644Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-23T11:10:20.3935883Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.3936060Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.3936262Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.3936718Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-23T11:10:20.3936898Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.3937081Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.3937292Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.3937516Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-23T11:10:20.3937836Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.3938026Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.3940706Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.3940964Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
2020-07-23T11:10:20.3941564Z    --- End of inner exception stack trace ---
2020-07-23T11:10:20.3941753Z    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2020-07-23T11:10:20.3942329Z    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
2020-07-23T11:10:20.3942504Z    at System.Threading.Tasks.Task`1.get_Result()
2020-07-23T11:10:20.3944018Z    at Microsoft.TeamFoundation.TestClient.PublishTestResults.PublishTestResultsEndpointManager.TryGetFeatureFlagStateFromService(FeatureAvailabilityHttpClient featureAvailabilityHttpClient, String FFName, Boolean& featureFlagState) in D:\V2.0\A1\_work\56\s\Ta\Tasks\PublishTestResults\PublishTestResultsEndpointManager.cs:line 159
2020-07-23T11:10:20.3944476Z ---> (Inner Exception #0) Microsoft.VisualStudio.Services.Common.VssServiceException: TestManagement.Server.TestLogStoreOnTCMService
2020-07-23T11:10:20.3944716Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-23T11:10:20.3946303Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.3946741Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.3946931Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.3947254Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-23T11:10:20.3948097Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.3948280Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.3948428Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.3948785Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-23T11:10:20.3949106Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.3949291Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.3949451Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.3949781Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0<---
2020-07-23T11:10:20.3950057Z 
2020-07-23T11:10:20.4099373Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-23T11:10:20.4099887Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4100199Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4100472Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4100785Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-23T11:10:20.4101074Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4101358Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4101621Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4101931Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-23T11:10:20.4102207Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4104035Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4104364Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4104559Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
2020-07-23T11:10:20.4104745Z    --- End of inner exception stack trace ---
2020-07-23T11:10:20.4104923Z    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2020-07-23T11:10:20.4105076Z    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
2020-07-23T11:10:20.4105227Z    at System.Threading.Tasks.Task`1.get_Result()
2020-07-23T11:10:20.4106163Z    at Microsoft.TeamFoundation.TestClient.PublishTestResults.PublishTestResultsEndpointManager.TryGetFeatureFlagStateFromService(FeatureAvailabilityHttpClient featureAvailabilityHttpClient, String FFName, Boolean& featureFlagState) in D:\V2.0\A1\_work\56\s\Ta\Tasks\PublishTestResults\PublishTestResultsEndpointManager.cs:line 159
2020-07-23T11:10:20.4106457Z ---> (Inner Exception #0) Microsoft.VisualStudio.Services.Common.VssServiceException: TestManagement.Server.PublishOnTestLogStoreEnabled
2020-07-23T11:10:20.4106679Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-23T11:10:20.4106978Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4107143Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4107311Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4107507Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-23T11:10:20.4107695Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4107842Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4108011Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4108213Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-23T11:10:20.4108394Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4108552Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4108704Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4108910Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0<---
2020-07-23T11:10:20.4109020Z 
2020-07-23T11:10:20.4198126Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-23T11:10:20.4198290Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4198412Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4201641Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4203879Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-23T11:10:20.4204127Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4204273Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4204388Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4204537Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-23T11:10:20.4204659Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4204786Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4204911Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4205044Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
2020-07-23T11:10:20.4205172Z    --- End of inner exception stack trace ---
2020-07-23T11:10:20.4205461Z    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2020-07-23T11:10:20.4205617Z    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
2020-07-23T11:10:20.4205714Z    at System.Threading.Tasks.Task`1.get_Result()
2020-07-23T11:10:20.4205899Z    at Microsoft.TeamFoundation.TestClient.PublishTestResults.PublishTestResultsEndpointManager.TryGetFeatureFlagStateFromService(FeatureAvailabilityHttpClient featureAvailabilityHttpClient, String FFName, Boolean& featureFlagState) in D:\V2.0\A1\_work\56\s\Ta\Tasks\PublishTestResults\PublishTestResultsEndpointManager.cs:line 159
2020-07-23T11:10:20.4206183Z ---> (Inner Exception #0) Microsoft.VisualStudio.Services.Common.VssServiceException: TestManagement.Server.TestLogStoreTelemetryDisabledFF
2020-07-23T11:10:20.4206336Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-23T11:10:20.4206481Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4206602Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4206712Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4206857Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-23T11:10:20.4206998Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4207101Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4207220Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4207360Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-23T11:10:20.4207493Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4207594Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4207715Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4207883Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0<---
2020-07-23T11:10:20.4207963Z 
2020-07-23T11:10:20.4279979Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-23T11:10:20.4280140Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4280281Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4280411Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4280551Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-23T11:10:20.4280692Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4280808Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4280938Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4281076Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-23T11:10:20.4281353Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4281476Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4281591Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4281740Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
2020-07-23T11:10:20.4282329Z    --- End of inner exception stack trace ---
2020-07-23T11:10:20.4282444Z    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2020-07-23T11:10:20.4282557Z    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
2020-07-23T11:10:20.4282671Z    at System.Threading.Tasks.Task`1.get_Result()
2020-07-23T11:10:20.4283278Z    at Microsoft.TeamFoundation.TestClient.PublishTestResults.PublishTestResultsEndpointManager.TryGetFeatureFlagStateFromService(FeatureAvailabilityHttpClient featureAvailabilityHttpClient, String FFName, Boolean& featureFlagState) in D:\V2.0\A1\_work\56\s\Ta\Tasks\PublishTestResults\PublishTestResultsEndpointManager.cs:line 159
2020-07-23T11:10:20.4283485Z ---> (Inner Exception #0) Microsoft.VisualStudio.Services.Common.VssServiceException: TestManagement.Server.TestLogStoreOnTCMService
2020-07-23T11:10:20.4283651Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-23T11:10:20.4283806Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4283916Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4284043Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4284201Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-23T11:10:20.4284329Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4284450Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4284564Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4284713Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-23T11:10:20.4284846Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4284965Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4285096Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4285243Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0<---
2020-07-23T11:10:20.4285325Z 
2020-07-23T11:10:20.4386681Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-23T11:10:20.4387119Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4387504Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4387836Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4388254Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-23T11:10:20.4388623Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4390114Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4390504Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4390894Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-23T11:10:20.4391442Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4391765Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4392073Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4392472Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
2020-07-23T11:10:20.4393484Z    --- End of inner exception stack trace ---
2020-07-23T11:10:20.4393879Z    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
2020-07-23T11:10:20.4394224Z    at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
2020-07-23T11:10:20.4394508Z    at System.Threading.Tasks.Task`1.get_Result()
2020-07-23T11:10:20.4395036Z    at Microsoft.TeamFoundation.TestClient.PublishTestResults.PublishTestResultsEndpointManager.TryGetFeatureFlagStateFromService(FeatureAvailabilityHttpClient featureAvailabilityHttpClient, String FFName, Boolean& featureFlagState) in D:\V2.0\A1\_work\56\s\Ta\Tasks\PublishTestResults\PublishTestResultsEndpointManager.cs:line 159
2020-07-23T11:10:20.4395721Z ---> (Inner Exception #0) Microsoft.VisualStudio.Services.Common.VssServiceException: TestManagement.Server.PublishOnTestLogStoreEnabled
2020-07-23T11:10:20.4396164Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<HandleResponseAsync>d__53.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 921
2020-07-23T11:10:20.4396514Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4396796Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4397077Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4397429Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__51.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 867
2020-07-23T11:10:20.4397756Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4398039Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4398314Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4398685Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__47`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 755
2020-07-23T11:10:20.4399012Z --- End of stack trace from previous location where exception was thrown ---
2020-07-23T11:10:20.4399274Z    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
2020-07-23T11:10:20.4399568Z    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2020-07-23T11:10:20.4399923Z    at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__28`1.MoveNext() in D:\V2.0\A1\_work\56\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0<---
2020-07-23T11:10:20.4400134Z 
2020-07-23T11:10:20.5257790Z ##[section]Finishing: Publish Test Results **/test-results.xml
2020-07-23T11:10:20.5422253Z ##[section]Starting: Prepare analysis on SonarQube
2020-07-23T11:10:20.5527061Z ==============================================================================
2020-07-23T11:10:20.5527175Z Task         : Prepare Analysis Configuration
2020-07-23T11:10:20.5527276Z Description  : Prepare SonarQube analysis configuration
2020-07-23T11:10:20.5527361Z Version      : 4.11.0
2020-07-23T11:10:20.5527449Z Author       : sonarsource
2020-07-23T11:10:20.5527548Z Help         : Version: 4.11.0. [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2020-07-23T11:10:20.5527670Z ==============================================================================

Part 2 (I didn’t format it, it auto-bolded/enlarged)

2020-07-23T11:10:24.1877942Z SYSTEMVSSCONNECTION exists true
2020-07-23T11:10:24.2674599Z ##[section]Finishing: Prepare analysis on SonarQube
2020-07-23T11:10:24.2798635Z ##[section]Starting: Run Code Analysis
2020-07-23T11:10:24.2926726Z ==============================================================================
2020-07-23T11:10:24.2926854Z Task         : Run Code Analysis
2020-07-23T11:10:24.2926950Z Description  : Run scanner and upload the results to the SonarQube server.
2020-07-23T11:10:24.2927053Z Version      : 4.11.0
2020-07-23T11:10:24.2927152Z Author       : sonarsource
2020-07-23T11:10:24.2927287Z Help         : Version: 4.11.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

[More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2020-07-23T11:10:24.2927447Z ==============================================================================
2020-07-23T11:10:24.8933500Z [command]C:\Windows\system32\cmd.exe /D /S /C "C:\buildagent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\sonar-scanner.bat "--from=ScannerAzureDevOps/4.11.0""
2020-07-23T11:10:26.0775779Z INFO: Scanner configuration file: C:\buildagent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
2020-07-23T11:10:26.0830746Z INFO: Project root configuration file: NONE
2020-07-23T11:10:26.1243824Z INFO: SonarScanner 4.4.0.2170
2020-07-23T11:10:26.1244425Z INFO: Java 13 Oracle Corporation (64-bit)
2020-07-23T11:10:26.1244754Z INFO: Windows Server 2016 10.0 amd64
2020-07-23T11:10:26.6265564Z INFO: User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
2020-07-23T11:10:26.8236292Z INFO: Scanner configuration file: C:\buildagent\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\4.11.0\sonar-scanner\bin\..\conf\sonar-scanner.properties
2020-07-23T11:10:26.8505855Z INFO: Project root configuration file: NONE
2020-07-23T11:10:26.8506051Z INFO: Analyzing on SonarQube server 7.9.2
2020-07-23T11:10:26.8506216Z INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
2020-07-23T11:10:27.2998858Z INFO: Load global settings
2020-07-23T11:10:27.7334196Z INFO: Load global settings (done) | time=426ms
2020-07-23T11:10:27.7351766Z INFO: Server id: BF41A1F2-AXCrTd062iLQ-R9R7FbS
2020-07-23T11:10:27.7504895Z INFO: User cache: C:\Windows\system32\config\systemprofile\.sonar\cache
2020-07-23T11:10:27.7545026Z INFO: Load/download plugins
2020-07-23T11:10:27.7545397Z INFO: Load plugins index
2020-07-23T11:10:28.1648589Z INFO: Load plugins index (done) | time=399ms
2020-07-23T11:10:28.6214830Z INFO: Load/download plugins (done) | time=856ms
2020-07-23T11:10:29.5233888Z INFO: Process project properties
2020-07-23T11:10:29.5234064Z INFO: Execute project builders
2020-07-23T11:10:29.5234178Z INFO: Execute project builders (done) | time=0ms
2020-07-23T11:10:29.5234308Z INFO: Project key: BuildTestProject1
2020-07-23T11:10:29.5234416Z INFO: Base dir: C:\buildagent\_work\2\s
2020-07-23T11:10:29.5234536Z INFO: Working dir: C:\buildagent\_work\2\s\.scannerwork
2020-07-23T11:10:29.5234661Z INFO: Load project settings for component key: 'BuildTestProject1'
2020-07-23T11:10:29.9328152Z INFO: Load project settings for component key: 'BuildTestProject1' (done) | time=420ms
2020-07-23T11:10:30.0019369Z INFO: Load quality profiles
2020-07-23T11:10:30.6753298Z INFO: Load quality profiles (done) | time=469ms
2020-07-23T11:10:30.6890771Z INFO: Detected Azure DevOps
2020-07-23T11:10:30.6906989Z INFO: Load active rules
2020-07-23T11:10:38.6078149Z INFO: Load active rules (done) | time=8107ms
2020-07-23T11:10:38.7150822Z INFO: Indexing files...
2020-07-23T11:10:38.7179118Z INFO: Project configuration:
2020-07-23T11:10:39.5377486Z INFO: 332 files indexed
2020-07-23T11:10:39.5377663Z INFO: 0 files ignored because of scm ignore settings
2020-07-23T11:10:39.5378061Z INFO: Quality profile for py: Sonar way
2020-07-23T11:10:39.5378152Z INFO: Quality profile for xml: Sonar way
2020-07-23T11:10:39.5379329Z INFO: ------------- Run sensors on module BuildTestProject1
2020-07-23T11:10:39.6686093Z INFO: Load metrics repository
2020-07-23T11:10:40.1000543Z INFO: Load metrics repository (done) | time=431ms
2020-07-23T11:10:40.6690376Z WARNING: An illegal reflective access operation has occurred
2020-07-23T11:10:40.6690624Z WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:/C:/Windows/system32/config/systemprofile/.sonar/cache/866bb1adbf016ea515620f1aaa15ec53/sonar-javascript-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
2020-07-23T11:10:40.6690806Z WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
2020-07-23T11:10:40.6690930Z WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
2020-07-23T11:10:40.6691090Z WARNING: All illegal access operations will be denied in a future release
2020-07-23T11:10:42.0199814Z INFO: Sensor Python Squid Sensor [python]
2020-07-23T11:10:42.0201384Z INFO: Load project repositories
2020-07-23T11:10:42.4286027Z INFO: Load project repositories (done) | time=749ms
2020-07-23T11:11:07.9213208Z INFO: Sensor Python Squid Sensor [python] (done) | time=26130ms
2020-07-23T11:11:07.9214070Z INFO: Sensor Cobertura Sensor for Python coverage [python]
2020-07-23T11:11:07.9214431Z INFO: Sensor Cobertura Sensor for Python coverage [python] (done) | time=59ms
2020-07-23T11:11:07.9214747Z INFO: Sensor PythonXUnitSensor [python]
2020-07-23T11:11:07.9215042Z INFO: Sensor PythonXUnitSensor [python] (done) | time=30ms
2020-07-23T11:11:07.9215390Z INFO: Sensor JaCoCo XML Report Importer [jacoco]
2020-07-23T11:11:07.9215792Z INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=0ms
2020-07-23T11:11:07.9216200Z INFO: Sensor JavaXmlSensor [java]
2020-07-23T11:11:07.9216562Z INFO: 5 source files to be analyzed
2020-07-23T11:11:08.1405476Z INFO: Sensor JavaXmlSensor [java] (done) | time=267ms
2020-07-23T11:11:08.1405964Z INFO: Sensor HTML [web]
2020-07-23T11:11:08.1610393Z INFO: 5/5 source files have been analyzed
2020-07-23T11:11:08.1610577Z INFO: Sensor HTML [web] (done) | time=29ms
2020-07-23T11:11:08.1610666Z INFO: Sensor XML Sensor [xml]
2020-07-23T11:11:08.1610770Z INFO: 5 source files to be analyzed
2020-07-23T11:11:08.4120259Z INFO: Sensor XML Sensor [xml] (done) | time=248ms
2020-07-23T11:11:08.6727047Z INFO: ------------- Run sensors on project
2020-07-23T11:11:08.6727362Z INFO: Sensor Zero Coverage Sensor
2020-07-23T11:11:08.6727550Z INFO: 5/5 source files have been analyzed
2020-07-23T11:11:08.6727738Z INFO: Sensor Zero Coverage Sensor (done) | time=237ms
2020-07-23T11:11:08.8270630Z INFO: SCM provider for this project is: git
2020-07-23T11:11:08.8372752Z INFO: 1 files to be analyzed
2020-07-23T11:11:09.2193157Z INFO: 0/1 files analyzed
2020-07-23T11:11:09.2428864Z WARN: Missing blame information for the following files:
2020-07-23T11:11:09.2429244Z WARN:   * junit/test-results.xml
2020-07-23T11:11:09.2429460Z WARN: This may lead to missing/broken features in SonarQube
2020-07-23T11:11:09.2429655Z INFO: 37 files had no CPD blocks
2020-07-23T11:11:09.2429834Z INFO: Calculating CPD for 252 files
2020-07-23T11:11:10.1804573Z INFO: CPD calculation finished
2020-07-23T11:11:10.7676481Z INFO: Analysis report generated in 482ms, dir size=6 MB
2020-07-23T11:11:20.9576567Z INFO: Analysis report compressed in 10184ms, zip size=2 MB
2020-07-23T11:11:21.5529615Z INFO: Analysis report uploaded in 595ms
2020-07-23T11:11:21.5530218Z INFO: ANALYSIS SUCCESSFUL, you can browse http://localhost:9000/dashboard?id=BuildTestProject1
2020-07-23T11:11:21.5530457Z INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
2020-07-23T11:11:21.5530696Z INFO: More about the report processing at http://localhost:9000/api/ce/task?id=AXN7Xt0-fOEiTT-7FwJk
2020-07-23T11:11:22.0167171Z INFO: Analysis total time: 53.268 s
2020-07-23T11:11:22.0326273Z INFO: ------------------------------------------------------------------------
2020-07-23T11:11:22.0506995Z INFO: EXECUTION SUCCESS
2020-07-23T11:11:22.0541603Z INFO: ------------------------------------------------------------------------
2020-07-23T11:11:22.0541771Z INFO: Total time: 55.955s
2020-07-23T11:11:22.1104181Z INFO: Final Memory: 13M/47M
2020-07-23T11:11:22.1105235Z INFO: ------------------------------------------------------------------------
2020-07-23T11:11:22.1907101Z ##[section]Finishing: Run Code Analysis
2020-07-23T11:11:22.2025093Z ##[section]Starting: Publish Quality Gate Result
2020-07-23T11:11:22.2330219Z ==============================================================================
2020-07-23T11:11:22.2330346Z Task         : Publish Quality Gate Result
2020-07-23T11:11:22.2330470Z Description  : Publish SonarQube's Quality Gate result on the Azure DevOps build result, to be used after the actual analysis.
2020-07-23T11:11:22.2330605Z Version      : 4.8.1
2020-07-23T11:11:22.2330686Z Author       : sonarsource
2020-07-23T11:11:22.2330798Z Help         : [More Information](http://redirect.sonarsource.com/doc/install-configure-scanner-tfs-ts.html)
2020-07-23T11:11:22.2330909Z 
==============================================================================
2020-07-23T11:11:25.7515490Z ##[error][SQ] Could not fetch metrics
2020-07-23T11:11:25.7524425Z ##[error][SQ] API GET '/api/metrics/search' failed, status code was: 401
2020-07-23T11:11:25.7833632Z ##[error][SQ] API GET '/api/ce/task' failed, status code was: 401
2020-07-23T11:11:25.7834681Z ##[error][SQ] Could not fetch task for ID 'AXN7Xt0-fOEiTT-7FwJk'
2020-07-23T11:11:25.8059385Z ##[section]Finishing: Publish Quality Gate Result
2020-07-23T11:11:25.8152425Z ##[section]Starting: Checkout
2020-07-23T11:11:25.8274541Z ==============================================================================
2020-07-23T11:11:25.8274677Z Task         : Get sources
2020-07-23T11:11:25.8274777Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-07-23T11:11:25.8274884Z Version      : 1.0.0
2020-07-23T11:11:25.8274976Z Author       : Microsoft
2020-07-23T11:11:25.8275072Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-07-23T11:11:25.8275188Z ==============================================================================
2020-07-23T11:11:26.2342332Z Cleaning any cached credential from repository: Test Project (Git)
2020-07-23T11:11:26.2438856Z ##[section]Finishing: Checkout
2020-07-23T11:11:26.2592137Z ##[section]Starting: Finalize Job
2020-07-23T11:11:26.2628680Z Start cleaning up orphan processes.
2020-07-23T11:11:26.2643044Z ##[section]Finishing: Finalize Job
2020-07-23T11:11:26.2758320Z ##[section]Finishing: Build and Test 2.7

Hello @paulsonmr,

Thanks for the logs. Next time it’s much simpler to attach them as a file attachment than to paste them inline, in several successive post :wink: . Please do that next time.

Your last log is improving. Now you complete a successful scan. The authorization error happens when you add the (optional) Publish Quality Gate Result task to your build.
For this task to succeed, you need to grant extra permissions to the user. See documentation of the API used by Publish Quality Gate Result and the required permissions (Browse & Administer on the project).
I could see from your set up that this is not a production environment (SonarQube on same host as AzDO, not HTTPS). So I would suggest 2 alternatives to simply solve you test scan:

  • Remove the Publish Quality Gate Result task from your build (this is optional) or
  • Grant all Global and Project permissions to the user that you created for the AzDO scan job

Olivier

@OlivierK As I’ve stated, the token is still not working. The last log was successful, because I manually specified the username and password in the additional properties section.

I gave the user all permissions including “Administer System” and “Administer” and the Publish Quality Gate Result task still fails in the same manner

Hello @paulsonmr,

Let’s narrow down the problem. Outside of Azure DevOps (ie from a cmd line on your workstation) can you try to execute:

curl -X GET -u <YourToken>: "<YourSqURL>/api/components/search_projects"

If you don’t have curl on your machine, you may use any equivalent tool that allows to run an HTTP request (Postman or whatever

Additionally, could you do the following:

  • On your SonarQube server, edit the server main configuration file (<SONARQUBE_HOME>/conf/sonar.properties) and add the following property:

sonar.web.accessLogs.pattern=%h | %l | %u | %t | %s | %b | %i{Referer} | %i{User-Agent} | %reqAttribute{ID} | %reqAttribute{LOGIN} | %r | %q | %requestContent

(Everything on a single line)

  • Restart your SonarQube
  • Run your failing Azure DevOps job
  • Send me a zip of your <SONARQUBE_HOME>/logs directory

Olivier

@OlivierK
The given curl command runs successfully.

Output

{“paging”:{“pageIndex”:1,“pageSize”:100,“total”:4},“organizations”:,“components”:[{“organization”:“default-organization”,“id”:“ITookThisOut”,“key”:“BuildTestProject1”,“name”:“BuildTestProject1”,“isFavorite”:false,“tags”:,“visibility”:“public”},{“organization”:“default-organization”,“id”:“ITookThisOut”,“key”:“BuildTestProject1Java”,“name”:“BuildTestProject1Java”,“isFavorite”:false,“tags”:,“visibility”:“public”},{“organization”:“default-organization”,“id”:“ITookThisOut”,“key”:“devops-test”,“name”:“devops-test”,“isFavorite”:false,“tags”:,“visibility”:“public”},{“organization”:“default-organization”,“id”:“ITookThisOut”,“key”:“EglinMaterialsDB-Test-Key”,“name”:“EglinMaterialsDB-Test”,“isFavorite”:false,“tags”:,“visibility”:“public”}],“facets”:}

I also have the zip file of the logs. Is there a way I could send it to you directly rather than posting it?

Hello @paulsonmr,

So if the curl command works, it means that the token is correct (in the sense, not corrupted).
I could also see from your logs that the initials stages of the build works, what fails in the “run Code Analysis” that requires the most elevated permissions of the whole process. Can you please provide

  • The name of the suer you use for the scan (so I can see it in the following screenshots)
  • A screenshot of the global permissions screen
  • A screenshot of the project permissions screen (for both screenshot showing clear the premissions granted to the user used for the scan)

Wrt to logs, it’s the rules of the game in the community that you get free community support but you also need to make things public (commercial support provides confidentiality). Feel free though to redact whatever you want to keep confidential in your logs.

Olivier

logs.zip (16.3 KB)

azdo global permissions


project permissions

@OlivierK Did you have a chance to look over the results?