07:55:38 07:55:38.197 WARN: File '/opt/workDir/***.spec.ts' was detected as changed but without having changed lines 07:55:38 07:55:38.197 WARN: File '***.ts' was detected as changed but without having changed lines 07:55:38 07:55:38.203 DEBUG: eslint-bridge server will shutdown 07:55:44 07:55:43.204 DEBUG: eslint-bridge server closed 07:55:44 07:55:43.205 INFO: Time spent writing ucfgs 0ms 07:55:44 07:55:44.639 INFO: ------------------------------------------------------------------------ 07:55:44 07:55:44.639 INFO: EXECUTION FAILURE 07:55:44 07:55:44.639 INFO: ------------------------------------------------------------------------ 07:55:44 07:55:44.640 INFO: Total time: 3:43.860s 07:55:44 07:55:44.745 ERROR: Error during SonarScanner execution 07:55:44 07:55:44.745 INFO: Final Memory: 54M/208M 07:55:44 07:55:44.745 INFO: ------------------------------------------------------------------------ 07:55:44 java.lang.UnsupportedOperationException 07:55:44 at java.base/java.util.AbstractCollection.add(AbstractCollection.java:267) 07:55:44 at org.sonar.scanner.report.ChangedLinesPublisher.writeChangedLines(ChangedLinesPublisher.java:93) 07:55:44 at org.sonar.scanner.report.ChangedLinesPublisher.publish(ChangedLinesPublisher.java:65) 07:55:44 at org.sonar.scanner.report.ReportPublisher.generateReportFile(ReportPublisher.java:181) 07:55:44 at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:154) 07:55:44 at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:430) 07:55:44 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123) 07:55:44 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109) 07:55:44 at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:130) 07:55:44 at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:123) 07:55:44 at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:109) 07:55:44 at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:57) 07:55:44 at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:51) 07:55:44 at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46) 07:55:44 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 07:55:44 at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 07:55:44 at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 07:55:44 at java.base/java.lang.reflect.Method.invoke(Method.java:566) 07:55:44 at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) 07:55:44 at com.sun.proxy.$Proxy0.execute(Unknown Source) 07:55:44 at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189) 07:55:44 at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138) 07:55:44 at org.sonarsource.scanner.cli.Main.execute(Main.java:126) 07:55:44 at org.sonarsource.scanner.cli.Main.execute(Main.java:81) 07:55:44 at org.sonarsource.scanner.cli.Main.main(Main.java:62)
What DevOps platform are you using to run the analysis? Can you share your pipeline configuration?
We are using Jenkins Multibranch Pipeline job
the cli command looks like this
sonar-scanner -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=dev-bitbucket -Dsonar.projectBaseDir=./*** -Dproject.settings=./sources/sonar-project.properties -Dsonar.scanner.metadataFilePath=$(pwd)/report-task.txt -Dsonar.ws.timeout=600 -Dsonar.projectKey=dev-test -Dsonar.pullrequest.branch=feature-A -Dsonar.pullrequest.key=103 -Dsonar.pullrequest.base=develop -Dsonar.login=****'\
And tried all the strategies in Jenkins multibranch pipeline job
Determines how pull requests are discovered: **Merging the pull request with the current target branch revision** Discover each pull request once with the discovered revision corresponding to the result of merging with the current revision of the target branch **The current pull request revision** Discover each pull request once with the discovered revision corresponding to the pull request head revision without merging **Both the current pull request revision and the pull request merged with the current target branch revision** Discover each pull request twice. The first discovered revision corresponds to the result of merging with the current revision of the target branch in each scan. The second parallel discovered revision corresponds to the pull request head revision without merging
Did you get chance to look into it?
Can I check if the pipeline was previously working and this is a recent issue or if you are trying to setup a new pipeline?
It might also be useful if you could run the command with debug-level logging (you can see more information about this here: SonarCloud-CI)
Also, I assume that the previously mentioned command is recieving those values as variables from the Jenkins job? I notice that you dont have a project specified however, is this information held inside of the Sonar-project.properties file?
Finally, do you also have a SONAR_TOKEN for the connection? This would have probably been setup as part of the initial import.
We are using multibranchpipeline job, the configuration is same of all of the branch pipelines.
When we create a pull request a new pipeline will be created, here we facing this issue. not yet succeeded.
yes we have Sonar-project.properties in every branch.
Yes we have SONAR_TOKEN
I Could see lot of lines in the console output with some warning
WARN: File '/home/jenkins/sources/.spec.ts' was detected as changed but without having changed lines
we have sonar.exclusions=, sonar.coverage.exclusions defined in Sonar-project.properties file
Ok so it sounds like you have most of the settings which we would expect for this to run properly, you have said that PRs are failing, however, are branches also failing or is it only limited to PRs?
I have a couple of questions to try and see if we can find the cause of this issue.
I noticed that in the above comments, your project key is mentioning bitbucket. Can I check how the project was actually imported? I’m thinking that there could potentially be an issue with picking up the PR information from Bitbucket depending on how the project was imported.
I also found the following information in the CLI documentation, which details that it shouldn’t be possible to use the projectBaseDir and project.settings parameters at the same time. Do you know why both of these parameters are being passed to the CLI?
Alternatives to the sonar-project.properties file
sonar-project.propertiesfile cannot be created in the root directory of the project, the alternatives are:
- The properties can be specified directly through the command line. Ex:
sonar-scanner -Dsonar.organization=my_organization -Dsonar.projectKey=my_project -> Dsonar.sources=src
- The property
project.settingscan be used to specify the path to the project configuration file (this option is incompatible with the
- The root folder of the project to analyze can be set through the
sonar.projectBaseDirproperty. This folder must contain a
sonar-project.propertiesfile if the
sonar.projectKeyis not specified on the command line. Additional analysis parameters can be defined in this project configuration file or through command line parameters.
Project was imported using sonarcloud ui
I believe that we have managed to isolate an issue on the SonarCloud code base which could be causing this issue that you are experiencing. I will keep you updated on the progress and I hope that it will resolve the issue which you are experiencing.
Thanks for the Update @shane.findley
Any Update on this?
Sorry for the delay, I have just checked and the fix is currently being held as it needs some proof as to where the issue is coming from. Do you have a recent failure log that you could send to me, I might be able to link the two which would allow the fix to progress.
The changes have been prepped for release and should be part of the coming release in the next few days. I will follow this up with another message to confirm that it is available, I hope that this will remove the issues that you are facing.
Hi @js-techie ,
These changes should be available now, I hope that this helps to resolve the issues which you are experiencing.
Thanks for the support.
We will monitor our builds for few days and update you
I am also from same team of js-techie.
PFA SS below
Hi @Viswa658 ,
I will discuss with Colin about this one to see what we can do. However, as it is a different topic I’ll reply over there rather than having the two tickets running.