IdeaGinkgo / Intellij-Ginkgo

Idea plugin for running and viewing ginkgo tests
GNU General Public License v3.0
34 stars 13 forks source link

Throwable thrown: "Could not get spec description for function: %s" #78

Open vmallet opened 1 year ago

vmallet commented 1 year ago

Found an exception this morning but I don't really know how/when it happened, so no context here. Ginkgo plugin 0.9.0, IntelliJ 2022.3.1 #IU-223.8214.52, built on December 20, 2022

Stacktrace ``` Details: rw.Header() java.lang.Throwable: Could not get spec description for function: %s at com.intellij.openapi.diagnostic.Logger.error(Logger.java:228) at com.github.idea.ginkgo.util.GinkgoUtil.getSpecDescription(GinkgoUtil.java:51) at com.github.idea.ginkgo.util.GinkgoUtil.getSpecNames(GinkgoUtil.java:39) at com.github.idea.ginkgo.GinkgoRunConfigurationProducer.getSpecNames(GinkgoRunConfigurationProducer.java:68) at com.github.idea.ginkgo.GinkgoRunConfigurationProducer.setupConfigurationFromContext(GinkgoRunConfigurationProducer.java:36) at com.github.idea.ginkgo.GinkgoRunConfigurationProducer.setupConfigurationFromContext(GinkgoRunConfigurationProducer.java:16) at com.intellij.execution.actions.RunConfigurationProducer.createConfigurationFromContext(RunConfigurationProducer.java:100) at com.intellij.execution.actions.RunConfigurationProducer.findOrCreateConfigurationFromContext(RunConfigurationProducer.java:197) at com.intellij.execution.actions.PreferredProducerFind.doGetConfigurationsFromContext(PreferredProducerFind.java:118) at com.intellij.execution.actions.PreferredProducerFind.getConfigurationsFromContext(PreferredProducerFind.java:100) at com.intellij.execution.actions.ConfigurationContext.getConfigurationsFromContext(ConfigurationContext.java:413) at com.intellij.execution.actions.ConfigurationContext.findPreferredConfiguration(ConfigurationContext.java:292) at com.intellij.execution.actions.ConfigurationContext.findExisting(ConfigurationContext.java:285) at com.intellij.execution.actions.BaseRunConfigurationAction.findExisting(BaseRunConfigurationAction.java:65) at com.intellij.execution.actions.BaseRunConfigurationAction.fullUpdate(BaseRunConfigurationAction.java:220) at com.intellij.execution.actions.BaseRunConfigurationAction.update(BaseRunConfigurationAction.java:185) at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:153) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:176) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:720) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$4(ActionUpdater.java:136) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$callAction$5(ActionUpdater.java:186) at com.intellij.diagnostic.telemetry.TraceKt.computeWithSpan(trace.kt:123) at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:182) at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:161) at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.java:137) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$0(ActionUpdater.java:124) at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:705) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:556) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:606) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:606) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:606) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:606) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:606) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:309) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$14(ActionUpdater.java:377) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$15(ActionUpdater.java:396) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1086) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$tryRunReadActionAndCancelBeforeWrite$19(ActionUpdater.java:428) at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128) at com.intellij.openapi.actionSystem.impl.ActionUpdater.tryRunReadActionAndCancelBeforeWrite(ActionUpdater.java:424) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$16(ActionUpdater.java:396) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:589) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:664) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:620) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:588) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175) at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:366) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$17(ActionUpdater.java:395) at io.opentelemetry.context.Context.lambda$wrap$1(Context.java:212) at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:243) at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29) at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:216) at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212) at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:205) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833) ```
TaylorOno commented 1 year ago

I can recreate this if I change/update/delete a spec in a way that makes it invalid, and clicking the run button or before intellij catches up to hide it. But currently it will still try to run the test with an empty or wrong focus expression.

If I can't generate a focus expression based on the current state of the file what do you think should be the expected behavior?

I am leaning towards popping up and error message without running the actual tests.

vmallet commented 1 year ago

Not sure what to do in the question above, but I just happen to see it trigger again. However, I was navigating a non-test .go file that has no test and no ginkgo stuff at all in it. Actually, I never ran any test in that project at all, no go test or ginkgo run configurations at all...

It's actually not the same stacktrace, including it here. Happy to file a different issue if you think it's different enough.

Stacktrace Details: rw.Header() java.lang.Throwable: Could not get spec description for function: %s at com.intellij.openapi.diagnostic.Logger.error(Logger.java:228) at com.github.idea.ginkgo.util.GinkgoUtil.getSpecDescription(GinkgoUtil.java:51) at com.github.idea.ginkgo.util.GinkgoUtil.getSpecNames(GinkgoUtil.java:39) at com.github.idea.ginkgo.GinkgoRunConfigurationProducer.getSpecNames(GinkgoRunConfigurationProducer.java:68) at com.github.idea.ginkgo.GinkgoRunConfigurationProducer.setupConfigurationFromContext(GinkgoRunConfigurationProducer.java:36) at com.github.idea.ginkgo.GinkgoRunConfigurationProducer.setupConfigurationFromContext(GinkgoRunConfigurationProducer.java:16) at com.intellij.execution.actions.RunConfigurationProducer.createConfigurationFromContext(RunConfigurationProducer.java:100) at com.intellij.execution.actions.RunConfigurationProducer.findOrCreateConfigurationFromContext(RunConfigurationProducer.java:197) at com.intellij.execution.actions.PreferredProducerFind.doGetConfigurationsFromContext(PreferredProducerFind.java:118) at com.intellij.execution.actions.PreferredProducerFind.getConfigurationsFromContext(PreferredProducerFind.java:100) at com.intellij.execution.actions.ConfigurationContext.getConfigurationsFromContext(ConfigurationContext.java:413) at com.intellij.execution.actions.ConfigurationContext.findPreferredConfiguration(ConfigurationContext.java:292) at com.intellij.execution.actions.ConfigurationContext.findExisting(ConfigurationContext.java:285) at com.intellij.execution.actions.BaseRunConfigurationAction.findExisting(BaseRunConfigurationAction.java:65) at com.intellij.execution.actions.BaseRunConfigurationAction.fullUpdate(BaseRunConfigurationAction.java:220) at com.intellij.execution.actions.BaseRunConfigurationAction.update(BaseRunConfigurationAction.java:185) at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performDumbAwareUpdate$0(ActionUtil.java:153) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareUpdate(ActionUtil.java:176) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doUpdate(ActionUpdater.java:720) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$updateActionReal$4(ActionUpdater.java:136) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$callAction$5(ActionUpdater.java:186) at com.intellij.diagnostic.telemetry.TraceKt.computeWithSpan(trace.kt:123) at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:182) at com.intellij.openapi.actionSystem.impl.ActionUpdater.callAction(ActionUpdater.java:161) at com.intellij.openapi.actionSystem.impl.ActionUpdater.updateActionReal(ActionUpdater.java:137) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$new$0(ActionUpdater.java:124) at com.intellij.openapi.actionSystem.impl.ActionUpdater.update(ActionUpdater.java:705) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:556) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:606) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:606) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:606) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:606) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandGroupChild(ActionUpdater.java:606) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroup$23(ActionUpdater.java:529) at com.intellij.util.containers.ContainerUtil.concat(ContainerUtil.java:1406) at com.intellij.openapi.actionSystem.impl.ActionUpdater.doExpandActionGroup(ActionUpdater.java:529) at com.intellij.openapi.actionSystem.impl.ActionUpdater.expandActionGroup(ActionUpdater.java:309) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$14(ActionUpdater.java:377) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$15(ActionUpdater.java:396) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1086) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$tryRunReadActionAndCancelBeforeWrite$19(ActionUpdater.java:428) at com.intellij.openapi.progress.util.ProgressIndicatorUtilService.runActionAndCancelBeforeWrite(ProgressIndicatorUtilService.java:63) at com.intellij.openapi.progress.util.ProgressIndicatorUtils.runActionAndCancelBeforeWrite(ProgressIndicatorUtils.java:128) at com.intellij.openapi.actionSystem.impl.ActionUpdater.tryRunReadActionAndCancelBeforeWrite(ActionUpdater.java:424) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$16(ActionUpdater.java:396) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:589) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:664) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:620) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:588) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175) at com.intellij.openapi.progress.util.BackgroundTaskUtil.runUnderDisposeAwareIndicator(BackgroundTaskUtil.java:366) at com.intellij.openapi.actionSystem.impl.ActionUpdater.lambda$doExpandActionGroupAsync$17(ActionUpdater.java:395) at io.opentelemetry.context.Context.lambda$wrap$1(Context.java:212) at com.intellij.util.concurrency.BoundedTaskExecutor.doRun(BoundedTaskExecutor.java:243) at com.intellij.util.concurrency.BoundedTaskExecutor.access$200(BoundedTaskExecutor.java:29) at com.intellij.util.concurrency.BoundedTaskExecutor$1.executeFirstTaskAndHelpQueue(BoundedTaskExecutor.java:216) at com.intellij.util.ConcurrencyUtil.runUnderThreadName(ConcurrencyUtil.java:212) at com.intellij.util.concurrency.BoundedTaskExecutor$1.run(BoundedTaskExecutor.java:205) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)