Intelij crash on startup with sonarlink plugin

  • Operating system: Windows 11
  • SonarLint plugin version: 8.1.0.65508
  • Programming language you’re coding in: Java
  • IntelIJ version: IntelliJ IDEA 2022.3.3 (Ultimate Edition)
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version): SonarCloud

After restarting intelij it crashes on startup, need to delete plugin files from the system to launch it again.

java.lang.RuntimeException: Cannot invoke (class=InitializeSonarLintOnStartup, method=appFrameCreated, topic=AppLifecycleListener)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:639)
    at com.intellij.util.messages.impl.MessageBusImplKt.deliverMessage(MessageBusImpl.kt:395)
    at com.intellij.util.messages.impl.MessageBusImplKt.pumpWaiting(MessageBusImpl.kt:374)
    at com.intellij.util.messages.impl.MessageBusImplKt.access$pumpWaiting(MessageBusImpl.kt:1)
    at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:433)
    at jdk.proxy2/jdk.proxy2.$Proxy49.appFrameCreated(Unknown Source)
    at com.intellij.idea.IdeStarter.openProjectIfNeeded$suspendImpl(IdeStarter.kt:91)
    at com.intellij.idea.IdeStarter.openProjectIfNeeded(IdeStarter.kt)
    at com.intellij.idea.IdeStarter$start$2.invokeSuspend(IdeStarter.kt:72)
    at com.intellij.idea.IdeStarter$start$2.invoke(IdeStarter.kt)
    at com.intellij.idea.IdeStarter$start$2.invoke(IdeStarter.kt)
    at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
    at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
    at com.intellij.idea.IdeStarter.start$suspendImpl(IdeStarter.kt:70)
    at com.intellij.idea.IdeStarter.start(IdeStarter.kt)
    at com.intellij.idea.ApplicationLoader.initApplicationImpl(ApplicationLoader.kt:169)
    at com.intellij.idea.ApplicationLoader.access$initApplicationImpl(ApplicationLoader.kt:1)
    at com.intellij.idea.ApplicationLoader$initApplicationImpl$1.invokeSuspend(ApplicationLoader.kt)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: java.lang.NullPointerException
    at org.sonarlint.intellij.core.BackendService.toSonarCloudBackendConnection(BackendService.kt:153)
    at org.sonarlint.intellij.core.BackendService.initialize(BackendService.kt:84)
    at org.sonarlint.intellij.core.BackendService.startOnce(BackendService.kt:77)
    at org.sonarlint.intellij.InitializeSonarLintOnStartup.appFrameCreated(InitializeSonarLintOnStartup.kt:28)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:655)
    at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:625)
    ... 23 more

Your JRE: 17.0.6+1-b653.34 amd64 (JetBrains s.r.o.)
C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.3\jbr

1 Like

Hi @skuall007,

Looking at the stack trace, I’m guessing you had a SonarCloud connection without an organization set, which could lead to this NPE.

If that’s the case, it’s something we prevented in the 8.1 version that you have, meaning that if you reset your SonarCloud connections and create them again, it shouldn’t happen anymore

2 Likes

Greetings, where I can I find connection config? I have deleted plugin manually, but it seems there are files which I missed

Update: Found config.json file and added organization, thank you for help, now all works fine

1 Like

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