-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dartanalyzer -h - could not startup process #12
Comments
Hello, that happened to me on Windows, somehow it doesn't work properly.. And because I was just testing on my machine I just deployed it into a container with Linux and it worked properly. Not sure if this is a bug on Windows. |
hmm alright, thanks for the reply, might try it in a container aswell. |
I have the same error with docker sonarqube:7.6-community:
|
The error can be fixed by Flutter/Dart installation. |
I have the same error, already install Flutter and Dart. Waiting for some solution as I need it for my Master Thesis |
Hey @skindud , can you explain how exactly the installation of Flutter/Dart fixed it for you? I got the same error. The following command works in cmd but not when I run
|
The root cause of the error that there is not dartanalyzer (or not PATH to it) in the system.
|
Has anyone been able to fix it in windows? PATH = C:\Program Files (x86)\Common Files\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\ProgramData\chocolatey\bin;C:\flutter\bin;C:\flutter\bin\cache\dart-sdk\bin;C:\Program Files\Git\cmd and if from the server run dartanalyzer -h |
In the file DartAnalyzerSensor.java, Change the following line.
Use Maven to re-compile and generate jar file. |
Encountered the same error in while implementing this in a SonarQube Docker. The problem lies in the fact that an efficient installation of Dart and Flutter is difficult in a container, except for creating volumes and binding them to the container. I have all the files in my container, all paths assigned, and even then, SonarQube says that it could not execute dartanalyzer -h Request you to look into it, it's a similar issue as that of OP. |
This fixes the problem for me. I just added the path to my ".../flutter/bin/cache/dart-sdk/bin" and then it works. |
I'm facing this error, but result of command "dartanalyzer -h" in the same directory and it don't work. Anybody help me!!! |
Hi all, @lifehalo solution could be the right one. |
Hi, |
Im trying to run the sonar-scanner command but get an error telling me it could not startup dartanalyzer -h even though it works directly when i use dartananalyzer -h in cmd line.
INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ INFO: Total time: 5.754s INFO: Final Memory: 36M/130M INFO: ------------------------------------------------------------------------ ERROR: Error during SonarQube Scanner execution org.buildobjects.process.StartupException: Could not startup process 'dartanalyzer -h'. at org.buildobjects.process.Proc.<init>(Proc.java:91) at org.buildobjects.process.ProcBuilder.run(ProcBuilder.java:205) at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerSensor.verifyCommand(DartAnalyzerSensor.java:129) at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerSensor.execute(DartAnalyzerSensor.java:84) 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:136) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122) 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:136) at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122) at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141) 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: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) Caused by: java.io.IOException: Cannot run program "dartanalyzer": CreateProcess error=2, Het systeem kan het opgegeven bestand niet vinden at java.base/java.lang.ProcessBuilder.start(Unknown Source) at java.base/java.lang.ProcessBuilder.start(Unknown Source) at java.base/java.lang.Runtime.exec(Unknown Source) at org.buildobjects.process.Proc.<init>(Proc.java:77) ... 33 more Caused by: java.io.IOException: CreateProcess error=2, Het systeem kan het opgegeven bestand niet vinden at java.base/java.lang.ProcessImpl.create(Native Method) at java.base/java.lang.ProcessImpl.<init>(Unknown Source) at java.base/java.lang.ProcessImpl.start(Unknown Source) ... 37 more
when running the command directly in the same directory it does work. see code below.
`D:\Development\Flutter\KlankenBak_Repo\KlankenBak\klankenbak>dartanalyzer -h
Usage: dartanalyzer [options...]
-h, --help Display this help message. Add --verbose to show hidden options.
-v, --verbose Verbose output.
Run "dartanalyzer -h -v" for verbose help output, including less commonly used options.
For more information, see https://www.dartlang.org/tools/analyzer.`
The text was updated successfully, but these errors were encountered: