tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
482 stars 38 forks source link

Webstorm Exception #216

Closed rsousacode closed 3 years ago

rsousacode commented 3 years ago

image

plugin vers: 0.18.0.203

How this happen? Unexpectedly in a advanced project (no changes were made) Yet I noticed that "Object" is marked in red, and that didn't happen before. ( Same with "console", "Number")

image

Stack Trace

java.lang.Throwable: Stub ids not found for key in index = js.nonglobal.symbol.index, file = file://C:/Users/dwork/Misc/Dev/Products-Page-Category/public/sticky-sidebar.js, file type = com.intellij.lang.javascript.JavaScriptFileType@7127d726, indexed file type = com.intellij.lang.javascript.JavaScriptFileType@7127d726
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:161)
    at com.intellij.psi.stubs.StubProcessingHelper.retrieveStubIdList(StubProcessingHelper.java:65)
    at com.intellij.psi.stubs.StubIndexImpl.lambda$processElements$4(StubIndexImpl.java:323)
    at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1705)
    at com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:322)
    at com.intellij.psi.stubs.StubIndex.processElements(StubIndex.java:49)
    at com.intellij.lang.javascript.psi.resolve.JSClassResolver.processElementsByNameIncludingImplicit(JSClassResolver.java:393)
    at com.intellij.lang.javascript.psi.resolve.JSIndexBasedResolveUtil.processAllSymbols(JSIndexBasedResolveUtil.java:114)
    at com.intellij.lang.javascript.psi.resolve.JSIndexBasedResolveUtil.processAllSymbols(JSIndexBasedResolveUtil.java:64)
    at com.intellij.lang.javascript.psi.resolve.JSReferenceExpressionResolver.resolveFromIndices(JSReferenceExpressionResolver.java:277)
    at com.intellij.lang.javascript.psi.resolve.JSReferenceExpressionResolver.resolve(JSReferenceExpressionResolver.java:128)
    at dev.blachut.svelte.lang.codeInsight.SvelteJSReferenceExpressionResolver.resolve(SvelteJSReferenceExpressionResolver.kt:23)
    at dev.blachut.svelte.lang.codeInsight.SvelteJSReferenceExpressionResolver.resolve(SvelteJSReferenceExpressionResolver.kt:14)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$5.get(JSResolveUtil.java:1616)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$5.get(JSResolveUtil.java:1613)
    at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111)
    at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:43)
    at com.intellij.lang.javascript.psi.resolve.JSEvaluatorComplexityTracker.runTask(JSEvaluatorComplexityTracker.java:72)
    at com.intellij.lang.javascript.psi.resolve.JSComplexityAwareRecursionGuard.lambda$getCachedValue$0(JSComplexityAwareRecursionGuard.java:71)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$4.lambda$calculateWithCaching$0(JSResolveUtil.java:1629)
    at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$resolve$1(ResolveCache.java:154)
    at com.intellij.openapi.util.Computable.get(Computable.java:17)
    at com.intellij.psi.impl.source.resolve.ResolveCache.lambda$loggingResolver$4(ResolveCache.java:260)
    at com.intellij.openapi.util.Computable.get(Computable.java:17)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:238)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolve(ResolveCache.java:154)
    at com.intellij.psi.impl.source.resolve.ResolveCache.resolveWithCaching(ResolveCache.java:289)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil$4.calculateWithCaching(JSResolveUtil.java:1627)
    at com.intellij.lang.javascript.psi.resolve.JSComplexityAwareRecursionGuard.getCachedValue(JSComplexityAwareRecursionGuard.java:74)
    at com.intellij.lang.javascript.psi.resolve.JSResolveUtil.resolve(JSResolveUtil.java:1611)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.multiResolve(JSReferenceExpressionImpl.java:524)
    at com.intellij.lang.javascript.inspections.JSAccessibilityCheckInspection$2.visitJSReferenceExpression(JSAccessibilityCheckInspection.java:54)
    at com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl.accept(JSReferenceExpressionImpl.java:512)
    at com.intellij.codeInspection.InspectionEngine.acceptElements(InspectionEngine.java:65)
    at com.intellij.codeInspection.InspectionEngine.createVisitorAndAcceptElements(InspectionEngine.java:56)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.runToolOnElements(LocalInspectionsPass.java:320)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$4(LocalInspectionsPass.java:279)
    at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:161)
    at com.intellij.util.AstLoadingFilter.forceAllowTreeLoading(AstLoadingFilter.java:153)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$5(LocalInspectionsPass.java:277)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:132)
    at com.intellij.util.AstLoadingFilter.disallowTreeLoading(AstLoadingFilter.java:121)
    at com.intellij.codeInsight.daemon.impl.LocalInspectionsPass.lambda$visitPriorityElementsAndInit$6(LocalInspectionsPass.java:277)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:149)
    at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1096)
    at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
    at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
    at com.intellij.concurrency.ApplierCompleter.lambda$compute$0(ApplierCompleter.java:83)
    at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:167)
    at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:178)
    at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:83)
    at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
    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)

And thanks for the amazing plugin

rsousacode commented 3 years ago

I recall activating "machine learning code assistance" yesterday which IDE suggested me to do. Probably related

tomblachut commented 3 years ago

Hello, could you please check:

  1. Run action Invalidate caches and restart IDE
  2. Verify if disabling "machine learning code assistance" helped.

Let me know how it went, thanks.

rsousacode commented 3 years ago

Meanwhile I upgraded Webstorm and issue is solved thanks.