WARN: Unable to locate 'report-task.txt' in the workspace. Did the SonarScanner succed?

Hello,
I have Jenkins pipeline with Credential in secret text, With SonarQube Scanner V2.13.1
I have jenkinsfile , it’s working fine. the problem when i added “withSonarQubeENV(“Server name”)”
What I suppose to do to let Jenkinsfile send the code to sonarqube and add reports in the dashboard?







Hi,

Welcome to the community!

Can you provide the analysis log (the Jenkins log from when analysis runs) in text format? These screen pictures are a bit difficult to work with at this end.

From what I can tell, your pipeline syntax doesn’t match the docs:
Yours: withSonarQubeEnv(installationName: 'sonarqube')
vs
Docs: withSonarQubeEnv('sonarqube')

And that may be having an impact

 
HTH,
Ann

Hello,
Thank you for the response,
I did like what in the DOC : withSonarQubeEnv(‘sonarqube’). and I still have the same problem.
what do you think causes this issue?

Hi,

 
:woman_shrugging:
Ann

Hi,
Thank you for your response.
I did in Jenkins debug and I got this error ?

Hi,

That error usually means the SonarQube URL isn’t quite right.

And if you need to send further logs, please copy/paste the text of the logs. As I stated earlier, these pictures of screens are difficult to work with.

 
Ann

Same issue with me!

PFA error log from Jenkins
WARN: Findbugs needs sources to be compiled. Please build project before executing sonar or check the location of compiled classes to make it possible for Findbugs to analyse your (sub)project (E:\Jenkins\jobs\2025\LDP_UT\workspace).
WARN: Property ‘sonar.java.binaries’ is not declared as multi-values/property set but was read using ‘getStringArray’ method. The SonarQube plugin declaring this property should be updated.
13:54:34.260 INFO: ------------------------------------------------------------------------
13:54:34.260 INFO: EXECUTION FAILURE
13:54:34.260 INFO: ------------------------------------------------------------------------
13:54:34.260 INFO: Total time: 1:51.701s
13:54:34.385 INFO: Final Memory: 23M/84M
13:54:34.385 INFO: ------------------------------------------------------------------------
13:54:34.385 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: Can not execute Findbugs
at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:191)
at org.sonar.plugins.findbugs.FindbugsSensor.execute(FindbugsSensor.java:132)
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:392)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:388)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:357)
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:150)
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)
Caused by: java.lang.IllegalStateException: One (sub)project contains Java source files that are not compiled (E:\Jenkins\jobs\2025\LDP_UT\workspace).
sonar.java.binaries was set to E:\Jenkins\jobs\2025\LDP_UT\workspace\src\main
Sonar JavaResourceLocator.classFilesToAnalyze was empty
at org.sonar.plugins.findbugs.FindbugsConfiguration.buildMissingCompiledCodeException(FindbugsConfiguration.java:169)
at org.sonar.plugins.findbugs.FindbugsConfiguration.initializeFindbugsProject(FindbugsConfiguration.java:139)
at org.sonar.plugins.findbugs.FindbugsConfiguration.initializeFindbugsProject(FindbugsConfiguration.java:102)
at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:117)
… 31 more
WARN: Unable to locate ‘report-task.txt’ in the workspace. Did the SonarScanner succeeded?
ERROR: SonarQube scanner exited with non-zero code: 1
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE

Hey @Karansing_Shelar

It would be great if you created a new thread, instead of bumping this old one.

If you do, make sure to mentioned details like what SonarQube version you’re using.

I’m going to close this thread.