You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2021-07-24T19:53:12.4529179Z ##[error]19:53:12.438 Failed to request and parse 'https://sonarcloud.io/api/qualityprofiles/search?project=Something&organization=ThisIsInvalidValue': Value cannot be null.
Parameter name: s
returns clear error message that is not visible in the log
{"errors":[{"msg":"No organization with key \u0027ThisIsInvalidValue\u0027"}]}
Full log
2021-07-24T19:53:10.5219836Z ##[section]Starting: SonarCloudPrepare
2021-07-24T19:53:10.5404829Z ==============================================================================
2021-07-24T19:53:10.5405723Z Task : Prepare Analysis Configuration
2021-07-24T19:53:10.5406376Z Description : Prepare SonarCloud analysis configuration
2021-07-24T19:53:10.5406773Z Version : 1.20.0
2021-07-24T19:53:10.5407289Z Author : sonarsource
2021-07-24T19:53:10.5407953Z Help : Version: 1.20.0. [More Information](https://sonarcloud.io/documentation/analysis/scan/sonarscanner-for-azure-devops/)
2021-07-24T19:53:10.5408765Z ==============================================================================
2021-07-24T19:53:11.6940202Z [command]D:\a\_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.20.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe begin /k:Something /o:ThisIsInvalidValue
2021-07-24T19:53:11.8029673Z SonarScanner for MSBuild 5.2.1
2021-07-24T19:53:11.8037307Z Using the .NET Framework version of the Scanner for MSBuild
2021-07-24T19:53:11.8910853Z Pre-processing started.
2021-07-24T19:53:11.8944412Z Preparing working directories...
2021-07-24T19:53:12.0944275Z 19:53:12.093 Updating build integration targets...
2021-07-24T19:53:12.2988185Z 19:53:12.297 Fetching analysis configuration settings...
2021-07-24T19:53:12.4529179Z ##[error]19:53:12.438 Failed to request and parse 'https://sonarcloud.io/api/qualityprofiles/search?project=Something&organization=ThisIsInvalidValue': Value cannot be null.
Parameter name: s
2021-07-24T19:53:12.4550272Z 19:53:12.438 Failed to request and parse 'https://sonarcloud.io/api/qualityprofiles/search?project=Something&organization=ThisIsInvalidValue': Value cannot be null.
2021-07-24T19:53:12.4551520Z Parameter name: s
2021-07-24T19:53:12.4751840Z
2021-07-24T19:53:12.4753780Z ##[error]Unhandled Exception:
2021-07-24T19:53:12.4895653Z ##[error]System.ArgumentNullException: Value cannot be null.
Parameter name: s
at System.IO.StringReader..ctor(String s)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
at SonarScanner.MSBuild.PreProcessor.SonarWebService.<>c__DisplayClass6_0.<<TryGetQualityProfile>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.PreProcessor.SonarWebService.<DoLogExceptions>d__17`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.PreProcessor.SonarWebService.<TryGetQualityProfile>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.<FetchArgumentsAndRulesets>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.<DoExecute>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.<Execute>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.BootstrapperClass.<PreProcess>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.BootstrapperClass.<Execute>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.Program.<Execute>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.Program.<Execute>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.Program.<Main>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at SonarScanner.MSBuild.Program.<Main>(String[] args)
2021-07-24T19:53:12.4916131Z System.ArgumentNullException: Value cannot be null.
2021-07-24T19:53:12.4918055Z Parameter name: s
2021-07-24T19:53:12.4919304Z at System.IO.StringReader..ctor(String s)
2021-07-24T19:53:12.4920640Z at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
2021-07-24T19:53:12.4922138Z at SonarScanner.MSBuild.PreProcessor.SonarWebService.<>c__DisplayClass6_0.<<TryGetQualityProfile>b__0>d.MoveNext()
2021-07-24T19:53:12.4923934Z --- End of stack trace from previous location where exception was thrown ---
2021-07-24T19:53:12.4925303Z at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-07-24T19:53:12.4926793Z at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2021-07-24T19:53:12.4928305Z at SonarScanner.MSBuild.PreProcessor.SonarWebService.<DoLogExceptions>d__17`1.MoveNext()
2021-07-24T19:53:12.4929718Z --- End of stack trace from previous location where exception was thrown ---
2021-07-24T19:53:12.4931185Z at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-07-24T19:53:12.4932690Z at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2021-07-24T19:53:12.4934235Z at SonarScanner.MSBuild.PreProcessor.SonarWebService.<TryGetQualityProfile>d__6.MoveNext()
2021-07-24T19:53:12.4935604Z --- End of stack trace from previous location where exception was thrown ---
2021-07-24T19:53:12.4936764Z at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-07-24T19:53:12.4938013Z at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.<FetchArgumentsAndRulesets>d__14.MoveNext()
2021-07-24T19:53:12.4939340Z --- End of stack trace from previous location where exception was thrown ---
2021-07-24T19:53:12.4940563Z at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-07-24T19:53:12.4941792Z at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2021-07-24T19:53:12.4943327Z at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.<DoExecute>d__12.MoveNext()
2021-07-24T19:53:12.4944617Z --- End of stack trace from previous location where exception was thrown ---
2021-07-24T19:53:12.4945835Z at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-07-24T19:53:12.4947946Z at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2021-07-24T19:53:12.4949287Z at SonarScanner.MSBuild.PreProcessor.TeamBuildPreProcessor.<Execute>d__11.MoveNext()
2021-07-24T19:53:12.4950526Z --- End of stack trace from previous location where exception was thrown ---
2021-07-24T19:53:12.4951712Z at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-07-24T19:53:12.4954525Z at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2021-07-24T19:53:12.4955821Z at SonarScanner.MSBuild.BootstrapperClass.<PreProcess>d__9.MoveNext()
2021-07-24T19:53:12.4957004Z --- End of stack trace from previous location where exception was thrown ---
2021-07-24T19:53:12.4958204Z at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-07-24T19:53:12.4959460Z at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2021-07-24T19:53:12.4960725Z at SonarScanner.MSBuild.BootstrapperClass.<Execute>d__8.MoveNext()
2021-07-24T19:53:12.4961905Z --- End of stack trace from previous location where exception was thrown ---
2021-07-24T19:53:12.4963114Z at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-07-24T19:53:12.4964577Z at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2021-07-24T19:53:12.4966517Z at SonarScanner.MSBuild.Program.<Execute>d__4.MoveNext()
2021-07-24T19:53:12.4967557Z --- End of stack trace from previous location where exception was thrown ---
2021-07-24T19:53:12.4968548Z at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-07-24T19:53:12.4969560Z at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2021-07-24T19:53:12.4970770Z at SonarScanner.MSBuild.Program.<Execute>d__3.MoveNext()
2021-07-24T19:53:12.4971898Z --- End of stack trace from previous location where exception was thrown ---
2021-07-24T19:53:12.4972860Z at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-07-24T19:53:12.4973865Z at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2021-07-24T19:53:12.4974853Z at SonarScanner.MSBuild.Program.<Main>d__2.MoveNext()
2021-07-24T19:53:12.4975759Z --- End of stack trace from previous location where exception was thrown ---
2021-07-24T19:53:12.4976714Z at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
2021-07-24T19:53:12.4977712Z at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
2021-07-24T19:53:12.4979591Z
2021-07-24T19:53:12.5071442Z ##[error]The process 'D:\a\_tasks\SonarCloudPrepare_14d9cde6-c1da-4d55-aa01-2965cd301255\1.20.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe' failed with exit code 3762504530
2021-07-24T19:53:12.5273788Z ##[section]Finishing: SonarCloudPrepare
The text was updated successfully, but these errors were encountered:
pavel-mikula-sonarsource
changed the title
Bug in WS error handling: ArgumentNullException
Fix bug in WS error handling: ArgumentNullException
Aug 13, 2021
Setup
Let's have AZP YML file with an nonexistent organization key:
Error
It produces
ArgumentNullException
While the reported URL from SonarCloud
https://sonarcloud.io/api/qualityprofiles/search?project=Something&organization=ThisIsInvalidValue
returns clear error message that is not visible in the log
Full log
The text was updated successfully, but these errors were encountered: