Gherkin/Cucumber Plugins Not Working

已回答

I just restored my IntelliJ installation from a backup and suddenly my Gherkin .feature files are not syntax colored, and I cannot link to glue code from the feature steps. I found this in the idea log:

2020-07-20 15:21:08,547 [ 46008] ERROR - aemon.impl.PassExecutorService - null
java.lang.ExceptionInInitializerError
at com.intellij.htmltools.xml.util.HtmlReferenceContributor.registerReferenceProviders(HtmlReferenceContributor.java:19)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.registerContributedReferenceProviders(ReferenceProvidersRegistryImpl.java:104)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.createRegistrar(ReferenceProvidersRegistryImpl.java:72)
at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.getRegistrar(ReferenceProvidersRegistryImpl.java:111)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistryImpl.doGetReferencesFromProviders(ReferenceProvidersRegistryImpl.java:126)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.lambda$getReferencesFromProviders$0(ReferenceProvidersRegistry.java:40)
at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:158)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54)
at com.intellij.util.CachedValueBase.lambda$getValueWithLock$1(CachedValueBase.java:235)
at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:113)
at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:72)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:236)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:73)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:154)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:136)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:39)
at com.intellij.psi.impl.source.resolve.reference.ReferenceProvidersRegistry.getReferencesFromProviders(ReferenceProvidersRegistry.java:32)
at org.jetbrains.plugins.cucumber.psi.impl.GherkinStepImpl.getReferencesInner(GherkinStepImpl.java:94)
at org.jetbrains.plugins.cucumber.psi.impl.GherkinStepImpl.lambda$getReferences$1(GherkinStepImpl.java:90)
at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:158)
at com.intellij.psi.impl.PsiCachedValueImpl.doCompute(PsiCachedValueImpl.java:54)
at com.intellij.util.CachedValueBase.lambda$getValueWithLock$1(CachedValueBase.java:235)
at com.intellij.openapi.util.RecursionManager$1.doPreventingRecursion(RecursionManager.java:113)
at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:72)
at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:236)
at com.intellij.psi.impl.PsiCachedValueImpl.getValue(PsiCachedValueImpl.java:43)
at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:73)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:154)
at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:136)
at org.jetbrains.plugins.cucumber.psi.impl.GherkinStepImpl.getReferences(GherkinStepImpl.java:90)
at org.jetbrains.plugins.cucumber.psi.annotator.GherkinAnnotatorVisitor.visitStep(GherkinAnnotatorVisitor.java:69)
at org.jetbrains.plugins.cucumber.psi.impl.GherkinStepImpl.acceptGherkin(GherkinStepImpl.java:99)
at org.jetbrains.plugins.cucumber.psi.impl.GherkinPsiElementBase.accept(GherkinPsiElementBase.java:70)
at org.jetbrains.plugins.cucumber.psi.annotator.GherkinAnnotator.annotate(GherkinAnnotator.java:16)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:129)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:110)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:346)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:280)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:306)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:309)
at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:93)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:309)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:277)
at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:222)
at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:52)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:442)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:435)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:627)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:572)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:434)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:410)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:168)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:168)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:408)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:171)
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:177)
Caused by: java.lang.ClassCastException: class org.intellij.images.fileTypes.impl.ImageFileTypeManagerImpl cannot be cast to class org.intellij.images.fileTypes.ImageFileTypeManager (org.intellij.images.fileTypes.impl.ImageFileTypeManagerImpl is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @2718f1a7; org.intellij.images.fileTypes.ImageFileTypeManager is in unnamed module of loader com.intellij.util.lang.UrlClassLoader @573f2bb1)
at org.intellij.images.fileTypes.ImageFileTypeManager.getInstance(ImageFileTypeManager.java:25)
at com.intellij.htmltools.xml.util.HtmlReferenceProvider.<clinit>(HtmlReferenceProvider.java:55)
... 65 more

0

See https://youtrack.jetbrains.com/issue/IDEA-236324#focus=Comments-27-4055484.0-0 .

Reinstall IntelliJ IDEA from http://www.jetbrains.com/idea/download/index.html.

If it doesn't help, reset the configuration: File | Manage IDE Settings | Restore Default Settings...: https://i.imgur.com/kbrkC7w.png .

0

Thanks for the quick response, Serge. After I posted that I noticed that my Java editor was not compiling either. I knew I was in trouble when I went to Settings -> Editor -> Inspections and there were no inspections listed. I reinstalled, it was trivial, and everything just worked after that.

0
Avatar
Permanently deleted user

I still got issues with 2020.2.3

Whenever I click in a *.feature file I get

2020-11-17 14:47:12,070 [ 241643] ERROR - aemon.impl.PassExecutorService - IntelliJ IDEA 2020.2.3 Build #IU-202.7660.26
2020-11-17 14:47:12,070 [ 241643] ERROR - aemon.impl.PassExecutorService - JDK: 11.0.8; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2020-11-17 14:47:12,070 [ 241643] ERROR - aemon.impl.PassExecutorService - OS: Mac OS X
2020-11-17 14:47:12,071 [ 241644] ERROR - aemon.impl.PassExecutorService - org/intellij/plugins/intelliLang/inject/InjectorUtils
java.lang.NoClassDefFoundError: org/intellij/plugins/intelliLang/inject/InjectorUtils
at org.jetbrains.plugins.cucumber.injector.GherkinLanguageInjector.getLanguagesToInject(GherkinLanguageInjector.java:44)
at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.processInPlaceInjectorsFor(InjectedLanguageManagerImpl.java:411)
at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.probeElementsUp(InjectedLanguageUtil.java:345)
at com.intellij.psi.impl.source.tree.injected.InjectedLanguageUtil.enumerate(InjectedLanguageUtil.java:164)
at com.intellij.psi.impl.source.tree.injected.InjectedLanguageManagerImpl.enumerateEx(InjectedLanguageManagerImpl.java:311)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryLineMarkersForInjected(LineMarkersPass.java:216)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.queryProviders(LineMarkersPass.java:178)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.lambda$doCollectInformation$3(LineMarkersPass.java:96)
at com.intellij.codeInsight.daemon.impl.Divider.divideInsideAndOutsideInOneRoot(Divider.java:81)
at com.intellij.codeInsight.daemon.impl.LineMarkersPass.doCollectInformation(LineMarkersPass.java:83)
at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:54)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:399)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1110)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:392)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:391)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:367)
at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:170)
at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:182)
at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:365)
at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:181)
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)

 

The File is stuck in Analyzing…

 

 

Do you have any suggestions beside

  1. Delete IntelliJ from /Applications
  2. Install altest Version
  3. Reset Config
  4. Re-Import Project

Tanks in advance, Christoph

 

0
Avatar
Permanently deleted user

FYI I can execute Scenarios in IntelliJ nonetheless when I delete the run-configuration.

0

Hello!

Issue should be fixed in the next update: https://youtrack.jetbrains.com/issue/IDEA-251322

0

Guys . This issue is still reproducing.
My version 2023.2.3 Comunity Edition.

Cucumber method doesn't see attached step. It says “Cannot find declaration to go to”
I reinstalled everything

 

0

Hello,

Is it possible to share sample project example for investigation?

0

hi. This is my test

this is my pom file


This is my idea version



Thak you in advance. If you need more information, please notify me

0

How did you create project? Seems .feature files should be stored in the src/test/resources/ directory.

0

I tried different options. Nothing helped.
but autotest works)

 

0

UPD . When i create tests, that took data from examples. I got next errror
io.cucumber.junit.UndefinedStepException: The step 'Should be text on page "Thank you for registering with Main Website Store."' is undefined.
You can implement this step using the snippet(s) below:

0

Does navigation work from method name?

0

请先登录再写评论。