I have been tried to integrate SonarCloud to my iOS project repo in Azure DevOps. I have a pipeline setup to distribute builds for testing.
Now, I’m trying to integrate SonarCloud in pipeline. As per the documents, I have added connections to sonar cloud and did the basic setup.
YAML file contains this piece of code for SonarCloud reporting:
# MARK: - SonarCloud
- task: SonarCloudPrepare@1
inputs:
SonarCloud: 'XXXX' # Name of the SonarCloud service connection you created
organization: 'XXXX'
scannerMode: 'CLI'
configMode: 'file'
- task: Bash@3
displayName: Download and install build wrapper
inputs:
targetType: 'inline'
script: |
mkdir -p $HOME/.sonar
curl -sSLo $HOME/.sonar/build-wrapper-macosx-x86.zip ${{variables.BUILD_WRAPPER_DOWNLOAD_URL}}
unzip -o $HOME/.sonar/build-wrapper-macosx-x86.zip -d $HOME/.sonar/
- task: Bash@3
displayName: Build in build-wrapper
inputs:
targetType: 'inline'
workingDirectory:
script: |
export PATH=$HOME/.sonar/build-wrapper-macosx-x86:$PATH
cd PatientAccess
build-wrapper-macosx-x86 --out-dir build_wrapper_output_directory xcodebuild -workspace PatientAccess.xcworkspace -scheme PatientAccessDev test -destination 'platform=iOS Simulator,name=iPhone 14'
- task: SonarCloudAnalyze@1
# Publish Quality Gate Result task
- task: SonarQubePublish@5
inputs:
pollingTimeoutSec: '300'
So with the above, I could able to run the build wrapper successfully. Strangely, facing issue during SonarCloudAnalyze@1
task.
This is the error I get:
2023-02-28T07:13:53.0852900Z 07:13:53.084 DEBUG: GET 200 https://sonarcloud.io/api/server/version | time=461ms
2023-02-28T07:13:53.0882140Z 07:13:53.087 DEBUG: Updated analysis started with a difference of -271 milliseconds
2023-02-28T07:13:53.1015450Z 07:13:53.101 DEBUG: Started at Tue Feb 28 07:13:48 UTC 2023
2023-02-28T07:13:53.1366470Z 07:13:53.136 INFO: Loaded core extensions: developer-scanner
2023-02-28T07:13:53.1586940Z 07:13:53.158 DEBUG: Installed core extension: com.sonarsource.branch.DeveloperScannerCoreExtension@327c7bea
2023-02-28T07:13:53.6818970Z 07:13:53.680 INFO: Found an active CI vendor: 'Azure DevOps'
2023-02-28T07:13:53.6922220Z 07:13:53.691 INFO: Load global settings
2023-02-28T07:13:54.1529410Z 07:13:54.152 DEBUG: GET 200 https://sonarcloud.io/api/settings/values.protobuf | time=461ms
2023-02-28T07:13:54.1556050Z 07:13:54.153 INFO: Load global settings (done) | time=462ms
2023-02-28T07:13:54.1615410Z 07:13:54.161 INFO: Process project properties
2023-02-28T07:13:54.1764990Z 07:13:54.176 INFO: ------------------------------------------------------------------------
2023-02-28T07:13:54.1766130Z 07:13:54.176 INFO: EXECUTION FAILURE
2023-02-28T07:13:54.1767170Z 07:13:54.176 INFO: ------------------------------------------------------------------------
2023-02-28T07:13:54.1767920Z 07:13:54.176 INFO: Total time: 10.940s
2023-02-28T07:13:54.2052680Z 07:13:54.204 INFO: Final Memory: 7M/30M
2023-02-28T07:13:54.2054600Z 07:13:54.204 INFO: ------------------------------------------------------------------------
2023-02-28T07:13:54.2132780Z ##[error]07:13:54.205 ERROR: Error during SonarScanner execution
2023-02-28T07:13:54.2158910Z ##[debug]Processed: ##vso[task.logissue type=error;]07:13:54.205 ERROR: Error during SonarScanner execution
2023-02-28T07:13:54.2160090Z 07:13:54.205 ERROR: Error during SonarScanner execution
2023-02-28T07:13:54.2162280Z ##[error]java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.ProjectLock
2023-02-28T07:13:54.2163530Z ##[debug]Processed: ##vso[task.logissue type=error;]java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.ProjectLock
2023-02-28T07:13:54.2164640Z java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.ProjectLock
2023-02-28T07:13:54.2166350Z ##[error]at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)
2023-02-28T07:13:54.2167780Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)
2023-02-28T07:13:54.2169480Z at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)
2023-02-28T07:13:54.2173040Z ##[error]at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:273)
at org.sonar.scanner.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:176)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:121)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
2023-02-28T07:13:54.2176090Z ##[debug]Processed: ##vso[task.logissue type=error;]at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)%0A at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:273)%0A at org.sonar.scanner.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:176)%0A at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:121)%0A at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
2023-02-28T07:13:54.2178350Z at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:678)
2023-02-28T07:13:54.2179190Z at org.sonar.core.platform.ComponentContainer.getComponentByType(ComponentContainer.java:273)
2023-02-28T07:13:54.2180010Z at org.sonar.scanner.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:176)
2023-02-28T07:13:54.2180830Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:121)
2023-02-28T07:13:54.2239330Z ##[error]at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:130)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
at org.sonarsource.scanner.cli.Main.main(Main.java:62)
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.api.batch.fs.internal.DefaultInputProject
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:50)
... 22 more
Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.api.batch.bootstrap.ProjectReactor
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
at org.picocontainer.injectors.SingleMemberInjector.getMemberArguments(SingleMemberInjector.java:61)
at org.picocontainer.injectors.MethodInjector.getMemberArguments(MethodInjector.java:100)
at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:112)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:50)
... 36 more
Caused by: You must define the following mandatory properties for 'Unknown': sonar.projectKey
2023-02-28T07:13:54.2266810Z ##[debug]Processed: at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)##vso[task.logissue type=error;]at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:130)%0A at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)%0A at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)%0A at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)%0A at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)%0A at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)%0A at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)%0A at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)%0A at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)%0A at java.base/java.lang.reflect.Method.invoke(Method.java:566)%0A at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)%0A at com.sun.proxy.$Proxy0.execute(Unknown Source)%0A at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)%0A at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)%0A at org.sonarsource.scanner.cli.Main.execute(Main.java:126)%0A at org.sonarsource.scanner.cli.Main.execute(Main.java:81)%0A at org.sonarsource.scanner.cli.Main.main(Main.java:62)%0ACaused by: java.lang.IllegalStateException: Unable to load component class org.sonar.api.batch.fs.internal.DefaultInputProject%0A at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)%0A at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)%0A at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)%0A at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)%0A at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)%0A at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)%0A at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)%0A at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)%0A at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)%0A at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)%0A at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)%0A at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)%0A at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)%0A at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)%0A at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:50)%0A ... 22 more%0ACaused by: java.lang.IllegalStateException: Unable to load component class org.sonar.api.batch.bootstrap.ProjectReactor%0A at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)%0A at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)%0A at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)%0A at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)%0A at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)%0A at org.picocontainer.injectors.SingleMemberInjector.getMemberArguments(SingleMemberInjector.java:61)%0A at org.picocontainer.injectors.MethodInjector.getMemberArguments(MethodInjector.java:100)%0A at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:112)%0A at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)%0A at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)%0A at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)%0A at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)%0A at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)%0A at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)%0A at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)%0A at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:50)%0A ... 36 more%0ACaused by: You must define the following mandatory properties for 'Unknown': sonar.projectKey
2023-02-28T07:13:54.2281480Z
2023-02-28T07:13:54.2282110Z at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:130)
2023-02-28T07:13:54.2282910Z at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123)
2023-02-28T07:13:54.2283710Z at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109)
2023-02-28T07:13:54.2284430Z at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:58)
2023-02-28T07:13:54.2285280Z at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:52)
2023-02-28T07:13:54.2286070Z at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
2023-02-28T07:13:54.2287180Z at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2023-02-28T07:13:54.2288850Z at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
2023-02-28T07:13:54.2289830Z at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2023-02-28T07:13:54.2290610Z at java.base/java.lang.reflect.Method.invoke(Method.java:566)
2023-02-28T07:13:54.2291360Z at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
2023-02-28T07:13:54.2292090Z at com.sun.proxy.$Proxy0.execute(Unknown Source)
2023-02-28T07:13:54.2292750Z at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
2023-02-28T07:13:54.2293500Z at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
2023-02-28T07:13:54.2294200Z at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
2023-02-28T07:13:54.2294830Z at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
2023-02-28T07:13:54.2295400Z at org.sonarsource.scanner.cli.Main.main(Main.java:62)
2023-02-28T07:13:54.2296160Z Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.api.batch.fs.internal.DefaultInputProject
2023-02-28T07:13:54.2297130Z at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)
2023-02-28T07:13:54.2298150Z at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
2023-02-28T07:13:54.2299050Z at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
2023-02-28T07:13:54.2299950Z at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
2023-02-28T07:13:54.2300790Z at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
2023-02-28T07:13:54.2301670Z at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
2023-02-28T07:13:54.2303020Z at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
2023-02-28T07:13:54.2303880Z at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
2023-02-28T07:13:54.2304780Z at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
2023-02-28T07:13:54.2305880Z at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
2023-02-28T07:13:54.2306820Z at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
2023-02-28T07:13:54.2307600Z at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
2023-02-28T07:13:54.2308350Z at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
2023-02-28T07:13:54.2309210Z at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
2023-02-28T07:13:54.2310120Z at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:50)
2023-02-28T07:13:54.2310820Z ... 22 more
2023-02-28T07:13:54.2311440Z Caused by: java.lang.IllegalStateException: Unable to load component class org.sonar.api.batch.bootstrap.ProjectReactor
2023-02-28T07:13:54.2312330Z at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:52)
2023-02-28T07:13:54.2313190Z at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:632)
2023-02-28T07:13:54.2314010Z at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
2023-02-28T07:13:54.2314870Z at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
2023-02-28T07:13:54.2315700Z at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
2023-02-28T07:13:54.2316850Z at org.picocontainer.injectors.SingleMemberInjector.getMemberArguments(SingleMemberInjector.java:61)
2023-02-28T07:13:54.2317700Z at org.picocontainer.injectors.MethodInjector.getMemberArguments(MethodInjector.java:100)
2023-02-28T07:13:54.2318470Z at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:112)
2023-02-28T07:13:54.2319480Z at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
2023-02-28T07:13:54.2320380Z at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
2023-02-28T07:13:54.2321230Z at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
2023-02-28T07:13:54.2322070Z at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
2023-02-28T07:13:54.2322830Z at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
2023-02-28T07:13:54.2323640Z at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:699)
2023-02-28T07:13:54.2324430Z at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:647)
2023-02-28T07:13:54.2325420Z at org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer.getComponent(ComponentContainer.java:50)
2023-02-28T07:13:54.2326140Z ... 36 more
2023-02-28T07:13:54.2327000Z Caused by: You must define the following mandatory properties for 'Unknown': sonar.projectKey
2023-02-28T07:13:55.5050650Z ##[debug]Exit code 1 received from tool '/Users/runner/work/_tasks/SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1/1.36.0/sonar-scanner/bin/sonar-scanner'
2023-02-28T07:13:55.5057080Z ##[debug]STDIO streams have closed for tool '/Users/runner/work/_tasks/SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1/1.36.0/sonar-scanner/bin/sonar-scanner'
2023-02-28T07:13:55.5118480Z ##[debug]task result: Failed
2023-02-28T07:13:55.5120970Z ##[error]The process '/Users/runner/work/_tasks/SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1/1.36.0/sonar-scanner/bin/sonar-scanner' failed with exit code 1
2023-02-28T07:13:55.5123520Z ##[debug]Processed: ##vso[task.issue type=error;]The process '/Users/runner/work/_tasks/SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1/1.36.0/sonar-scanner/bin/sonar-scanner' failed with exit code 1
2023-02-28T07:13:55.5127220Z ##[debug]Processed: ##vso[task.complete result=Failed;]The process '/Users/runner/work/_tasks/SonarCloudAnalyze_ce096e50-6155-4de8-8800-4221aaeed4a1/1.36.0/sonar-scanner/bin/sonar-scanner' failed with exit code 1
2023-02-28T07:13:55.5168110Z ##[section]Finishing: SonarCloudAnalyze
I could not get any help or related issue to fix. Googling didn’t help much. Mostly the similar issue reported are happening on Java project. Since I’m trying this on iOS(Swift) project, I have no clue what to do next.
Any help would be greatly appreciated. Thank you.