IllegalStateException while scanning iOS project on SonarCloud

sonarcfamily
(Mjbader) #1

Hello, I have been trying to scan my project and keep running into this exception that I can’t get around. Since I have no insight into the codebase and the error is incredibly nondescript, I haven’t what’s causing the issue.

java.lang.IllegalStateException: exit code != 0
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:54)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:25)
at com.sonar.cpp.plugin.CFamilySensor.lambda$process$4(CFamilySensor.java:323)
at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:53)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

15:50:36.638 INFO: ------------------------------------------------------------------------
15:50:36.638 INFO: EXECUTION FAILURE
15:50:36.638 INFO: ------------------------------------------------------------------------
15:50:36.638 INFO: Total time: 50.434s
15:50:37.100 INFO: Final Memory: 104M/1517M
15:50:37.100 INFO: ------------------------------------------------------------------------
15:50:37.100 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: java.lang.IllegalStateException: exit code != 0
at com.sonar.cpp.analyzer.AnalysisExecutor.submit(AnalysisExecutor.java:47)
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:310)
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:279)
at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:198)
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.execute(ModuleSensorsExecutor.java:62)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:367)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:362)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:325)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:130)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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:185)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
at org.sonarsource.scanner.cli.Main.execute(Main.java:111)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: exit code != 0
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:54)
at com.sonar.cpp.analyzer.Subprocess.execute(Subprocess.java:25)
at com.sonar.cpp.plugin.CFamilySensor.lambda$process$4(CFamilySensor.java:323)
at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(AnalysisExecutor.java:53)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

(Massimo Paladin) #2

Hi @mjbader,

is it a private or public project?

(Mjbader) #3

This is a private project.

(Massimo Paladin) #4

Hi @mjbader,

could you please share privately the sonar-scanner log and the build-wrapper-dump.json file?

(Andrew) #5

I am also getting this exception. The stack trace appears to be identical.

This is a private Objective-C project, running against sonarqube 7.6 enterprise with C family plugin 6.1

I will see if I can share the log files privately with you.

(Massimo Paladin) #6

Hi @aclaus,

regarding:

feel free to open a new topic so we can track your failure. It would be great if you could share with me the logs.

(Massimo Paladin) #7

Hi @mjbader,

any news? Are you going to be able to share the logs?

(Andrew) #8

I was able to solve my issue. I was building twice, the first time with the wrapper building debug mode and again with fastlane in release mode. The fastlane build was cleaning the first build. I removed the clean step and now it works.

1 Like
(Mjbader) #9

Hello, I am back and revisiting this issue. I can’t seem to send a private message to you, so I am not sure how to proceed.

(Massimo Paladin) #10

Hi @mjbader,

I sent you a private message where you can reply.