Visit of Component .... Failed

Getting an error when posting analysis.

  • versions used: SonarQube 8.9
  • error observed
Error Details
org.sonar.ce.task.projectanalysis.component.VisitException: Visit of Component {key=Engines.Landstar.Cloud.Engines.Aggregator:BRANCH:Dev,uuid=AXlHc_zyQeM37Pi7ptaX,type=PROJECT} failed
	at org.sonar.ce.task.projectanalysis.component.VisitException.rethrowOrWrap(VisitException.java:44)
	at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:41)
	at org.sonar.ce.task.projectanalysis.step.QualityGateEventsStep.execute(QualityGateEventsStep.java:84)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:81)
	at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:72)
	at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:59)
	at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:81)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.executeTask(CeWorkerImpl.java:212)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$ExecuteTask.run(CeWorkerImpl.java:194)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:160)
	at org.sonar.ce.taskprocessor.CeWorkerImpl$TrackRunningState.get(CeWorkerImpl.java:135)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:87)
	at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:53)
	at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
	at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:69)
	at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalArgumentException: Unknown value '0'
	at org.sonar.server.measure.Rating.lambda$valueOf$1(Rating.java:54)
	at java.base/java.util.Optional.orElseThrow(Optional.java:408)
	at org.sonar.server.measure.Rating.valueOf(Rating.java:54)
	at org.sonar.server.qualitygate.notification.QGChangeEmailTemplate.formatRating(QGChangeEmailTemplate.java:157)
	at org.sonar.server.qualitygate.notification.QGChangeEmailTemplate.generateMessageBody(QGChangeEmailTemplate.java:123)
	at org.sonar.server.qualitygate.notification.QGChangeEmailTemplate.format(QGChangeEmailTemplate.java:70)
	at org.sonar.server.notification.email.EmailNotificationChannel.format(EmailNotificationChannel.java:202)
	at org.sonar.server.notification.email.EmailNotificationChannel.lambda$deliverAll$1(EmailNotificationChannel.java:181)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.ReduceOps$5.evaluateSequential(ReduceOps.java:257)
	at java.base/java.util.stream.ReduceOps$5.evaluateSequential(ReduceOps.java:248)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.count(ReferencePipeline.java:605)
	at org.sonar.server.notification.email.EmailNotificationChannel.deliverAll(EmailNotificationChannel.java:189)
	at org.sonar.server.notification.EmailNotificationHandler.deliver(EmailNotificationHandler.java:45)
	at org.sonar.server.notification.NotificationService.lambda$deliverEmails$2(NotificationService.java:96)
	at java.base/java.util.stream.ReferencePipeline$4$1.accept(ReferencePipeline.java:212)
	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.IntPipeline.reduce(IntPipeline.java:491)
	at java.base/java.util.stream.IntPipeline.sum(IntPipeline.java:449)
	at org.sonar.server.notification.NotificationService.deliverEmails(NotificationService.java:97)
	at org.sonar.ce.task.projectanalysis.step.QualityGateEventsStep.notifyUsers(QualityGateEventsStep.java:145)
	at org.sonar.ce.task.projectanalysis.step.QualityGateEventsStep.checkNewQualityGate(QualityGateEventsStep.java:123)
	at org.sonar.ce.task.projectanalysis.step.QualityGateEventsStep.checkQualityGateStatusChange(QualityGateEventsStep.java:100)
	at org.sonar.ce.task.projectanalysis.step.QualityGateEventsStep.executeForProject(QualityGateEventsStep.java:94)
	at org.sonar.ce.task.projectanalysis.step.QualityGateEventsStep.access$000(QualityGateEventsStep.java:51)
	at org.sonar.ce.task.projectanalysis.step.QualityGateEventsStep$1.visitProject(QualityGateEventsStep.java:82)
	at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitNode(DepthTraversalTypeAwareCrawler.java:70)
	at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitImpl(DepthTraversalTypeAwareCrawler.java:51)
	at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:39)
	... 20 more

(wrap logs/code around triple quote ``` for proper formatting)

  • steps to reproduce
  • potential workaround

Error message: Visit of Component {key=Engines.Landstar.Cloud.Engines.GeoFence:BRANCH:Dev,uuid=AXlHddB0QeM37Pi7ptab,type=PROJECT} failed

Hi @gizmohd ,

You have run into a known bug: SONAR-14807 CE Task failure transforming ratings to letter grades, which will be fixed in SonarQube 9.0 but I think this may be placed in a patch version of SonarQube 8.9.1.

The issue comes from SonarQube trying to send notifications to users on a project’s Quality Gate change and it happens specifically when there are integer metrics (like Issues) used in a Quality Gate with thresholds of 0 or greater than 5.

As a workaround (until this is fixed), you can disable e-mail notifications (remove the value of SMTP Host from your global Administration > General > Email).

Joe

Good morning @Joe ,
I faced exactly the same issue (same stack) with SonarQube LTS 8.9.0 installed 2 weeks ago.

Could we expect a bug fix for the LTS version and when? Email notification are important for project managers. They like to receive them to make a quick check in the morning.

Is there no other workaround than disable e-mail notification ? Because it is thanks to this notification I knew this morning that the analysis failed.

Thank you.
Sebastien

FYI, as suggested in your answer @Joe, I updated my quality gate properties to set threshold = 1 (instead of 0) for Issue metric and analysis completed.

2 Likes

Yes, there will be a bug fix for LTS version, 8.9.1 to be released soon since it is very important for many people.

3 Likes

Waiting for a fix here in LTS :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

@gizmohd , @SebG , @ricardf : You can download SonarQube 8.9.1 from here (navigate to CommercialDistribution for commercial SonarQube or Distribution for community SonarQube).

1 Like