Command 'sonar-scanner ' failed with error code: 1

Could someone please help me to resolve below mentioned issue?

I am using below SQ version:
INFO: SonarScanner 4.3.0.2102
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Mac OS X 10.15.4 x86_64

Error Log
ERROR: Error during SonarScanner execution
java.lang.UnsupportedOperationException: Can not add the same measure twice on get-pip.py: DefaultMeasure[component=get-pip.py,metric=Metric[id=,key=complexity,description=Cyclomatic complexity,type=INT,direction=-1,domain=Complexity,name=Cyclomatic Complexity,qualitative=false,userManaged=false,enabled=true,worstValue=,bestValue=,optimizedBestValue=false,hidden=false,deleteHistoricalData=false,decimalScale=],value=44,fromCore=false,storage=org.sonar.scanner.sensor.DefaultSensorStorage@6d71f296,saved=false]
at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:177)
at org.sonar.scanner.sensor.DefaultSensorStorage.store(DefaultSensorStorage.java:137)
at org.sonar.api.batch.sensor.measure.internal.DefaultMeasure.doSave(DefaultMeasure.java:96)
at org.sonar.api.batch.sensor.internal.DefaultStorable.save(DefaultStorable.java:45)
at com.backelite.sonarqube.swift.complexity.LizardReportParser.addComplexityFileMeasures(LizardReportParser.java:182)
at com.backelite.sonarqube.swift.complexity.LizardReportParser.parseMeasure(LizardReportParser.java:121)
at com.backelite.sonarqube.swift.complexity.LizardReportParser.parseFile(LizardReportParser.java:89)
at com.backelite.sonarqube.swift.complexity.LizardReportParser.parseReport(LizardReportParser.java:69)
at com.backelite.sonarqube.swift.complexity.LizardSensor.execute(LizardSensor.java:71)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:386)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:382)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:351)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:137)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:123)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
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(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
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:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
ERROR:
ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.

  • returnValue=1
  • set +x
    ERROR - Command 'sonar-scanner ’ failed with error code: 1

Hi,

Looks like you are using some community plugin for Swift, you better address your issue to them directly (based on package name com.backelite.sonarqube.swift it could be https://github.com/Idean/sonar-swift

Hi Lena,
Thank you for the response.

I have raised an issue with them as well.

As I am using this as a first time, could you please redirect me how can use our’s directly for an iOS development?

I don’t understand your question.
If you want to use SonarSource analyzer for Swift you need to have Developer Edition, check this page https://www.sonarsource.com/swift/. It does not matter for which platform you develop.