aws / aws-toolkit-jetbrains

AWS Toolkit for JetBrains - a plugin for interacting with AWS from JetBrains IDEs
https://plugins.jetbrains.com/plugin/11349-aws-toolkit
Apache License 2.0
753 stars 219 forks source link

AWS Toolkit 1.35-212 crashes after upgrading on WebStorm [dynamic plugin] #2975

Open htr3n opened 2 years ago

htr3n commented 2 years ago

Describe the bug

WebStorm informs me to upgrade AWS Toolkit to the new version 1.35-212. After upgrading, the plugin crashes and the following exception is shown:

During querying provider AWS Lambda (class software.aws.toolkits.jetbrains.services.lambda.upload.LambdaLineMarker)

java.lang.ClassCastException: class software.aws.toolkits.jetbrains.services.lambda.nodejs.NodeJsRuntimeGroup cannot be cast to class software.aws.toolkits.jetbrains.services.lambda.RuntimeGroup (software.aws.toolkits.jetbrains.services.lambda.nodejs.NodeJsRuntimeGroup is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4d3321c4; software.aws.toolkits.jetbrains.services.lambda.RuntimeGroup is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @1525d620)
    at software.aws.toolkits.jetbrains.services.lambda.RuntimeGroupUtil$runtimeGroup$3.invoke(RuntimeGroup.kt:103)
    at software.aws.toolkits.jetbrains.services.lambda.RuntimeGroup$Companion.find(RuntimeGroup.kt:136)
    at software.aws.toolkits.jetbrains.services.lambda.RuntimeGroupUtil.getRuntimeGroup(RuntimeGroup.kt:103)
    at software.aws.toolkits.jetbrains.services.lambda.upload.LambdaLineMarker.getLineMarkerInfo(LambdaLineMarker.kt:42)
    at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:155)
    at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:90)
    at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:81)
    at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:77)
    at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:414)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:407)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:406)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:382)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183)
    at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:380)
    at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

To reproduce Upgrading AWS Toolkit on WebStorm to 1.35-212.

Expected behavior AWS Toolkit starts normally.

Screenshots N/A

Your Environment

Additional context Note that, this issue is different from https://github.com/aws/aws-toolkit-jetbrains/issues/2976. In this case, the plugin crashes and cannot event start.

abrooksv commented 2 years ago

Do you see this issue if you restart IntelliJ?

htr3n commented 2 years ago

@abrooksv that's strange. I restarted after installing the plugins (as WebStorm requires that) and the crash happened after the first restart. It took a few restart and becomes stable now (i.e. no crashing any more). I will close this issue.

abrooksv commented 2 years ago

These definitely look like issues related to us turning on dynamic plugin mode. We need to investigate more and possibly turn it back off

abrooksv commented 2 years ago

JetBrains has confirmed that the only workaround right now is to disable dynamic plugin support.