Closed KinoKiru closed 7 months ago
Yes exactly the same error happening for me.
Hi,
It seems that "flutter" command is not on path (or in current dir). How did you install flutter on the runner ?
Did you use flutter-action ? (https://github.com/marketplace/actions/flutter-action)
i did use flutter action, i'll add the build.yml
name: Build
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions: read-all
steps:
- uses: actions/checkout@v3
- name: Install and set Flutter version
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Run Flutter doctor
run: flutter doctor -v
- name: Sonar-scanner
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
# # If you wish to fail your job when the Quality Gate is red, uncomment the
# # following lines. This would typically be used to fail a deployment.
- uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
try 0.5.1 works for me, not sure why tho.
https://github.com/insideapp-oss/sonar-flutter/releases/tag/0.5.1-SNAPSHOT
I've updated the plugin on the server to 0.5.1-snapshot, but for me, it gives the same error.
I've updated the plugin on the server to 0.5.1-snapshot, but for me, it gives the same error.
I get the same error as well
Hi,
It seems that "flutter" command is not on path (or in current dir). How did you install flutter on the runner ?
Did you use flutter-action ? (https://github.com/marketplace/actions/flutter-action)
On sonarqube I selected the option 'Upload project localy'. I get the same error as the author gets
Caused by: java.io.IOException: Cannot run program "flutter" (in directory "/github/workspace"): error=2, No such file or directory
It looks like the directory /github/workspace
does not exist. I have the same issue (different setup but same no such file or directory found) and I still haven't found a solution to it.
EDIT: I didn't made available the intended artifacts. Doing that solved th eissue on my side.
This issue is stale because it has been open for 90 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.
I have the plugin and flutter installed on the sever, but GitHub actions won't complete successfully.
stacktrace:
INFO: ------------------------------------------------------------------------ INFO: EXECUTION FAILURE INFO: ------------------------------------------------------------------------ INFO: Total time: 1:00.495s ERROR: Error during SonarScanner execution INFO: Final Memory: 25M/100M org.buildobjects.process.StartupException: Could not startup process 'flutter analyze --no-fatal-warnings --no-fatal-infos'. INFO: ------------------------------------------------------------------------ at org.buildobjects.process.Proc.(Proc.java:91)
at org.buildobjects.process.ProcBuilder.run(ProcBuilder.java:205)
at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.executable.AnalyzerExecutable.analyze(AnalyzerExecutable.java:88)
at fr.insideapp.sonarqube.dart.lang.issues.dartanalyzer.DartAnalyzerSensor.execute(DartAnalyzerSensor.java:67)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:88)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:79)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:61)
at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:82)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:201)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:180)
at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:398)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:394)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:363)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:201)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:180)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:139)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:201)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:180)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:71)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:65)
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:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at jdk.proxy1/jdk.proxy1.$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.io.IOException: Cannot run program "flutter" (in directory "/github/workspace"): error=2, No such file or directory
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1143)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1073)
at java.base/java.lang.Runtime.exec(Runtime.java:594)
at org.buildobjects.process.Proc.(Proc.java:77)
... 33 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:314)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:244)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1110)
... 36 more