odoo-ide / pycharm-odoo

PyCharm plugin for Odoo
https://plugins.jetbrains.com/plugin/13499-odoo
Other
44 stars 5 forks source link

Can't read GistImpl[js.stub.element.gist] #484

Open andreax64 opened 2 months ago

andreax64 commented 2 months ago

I'm creating a new Odoo 17 widget and I get this error often during the development, especially when I'm working in the js file.

java.io.IOException: Can't read GistImpl[js.stub.element.gist]{version: 1091796, externalizer: com.intellij.lang.javascript.index.gist.BufferedExternalizer@4ddea8f8} at com.intellij.util.gist.storage.GistStorageImpl$GistImpl.getProjectData(GistStorageImpl.java:266) at com.intellij.util.gist.VirtualFileGistOverGistStorage.getOrCalculateAndCache(VirtualFileGistOverGistStorage.java:66) at com.intellij.util.gist.VirtualFileGistOverGistStorage.getUpToDateOrNull(VirtualFileGistOverGistStorage.java:43) at com.intellij.lang.javascript.index.gist.JSStubElementGist.lambda$getUpToDateOrNullGistData$3(JSStubElementGist.java:229) at com.intellij.lang.javascript.psi.util.SoftlyCachedValue.getOrComputeOnce(SoftlyCachedValue.java:41) at com.intellij.lang.javascript.index.gist.JSStubElementGist.getUpToDateOrNullGistData(JSStubElementGist.java:226) at com.intellij.lang.javascript.index.gist.JSStubElementGist.getUpToDateOrNullFromGist(JSStubElementGist.java:211) at com.intellij.lang.javascript.index.gist.JSStubElementGist.getData(JSStubElementGist.java:146) at com.intellij.lang.javascript.index.gist.JSStubElementGist.getData(JSStubElementGist.java:123) at com.intellij.lang.javascript.psi.impl.JSCachingTypeOwner.lambda$static$0(JSCachingTypeOwner.java:32) at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.kt:23) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:236) at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:43) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:236) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111) at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:237) at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.kt:17) at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:97) at com.intellij.lang.javascript.psi.impl.JSStubElementImpl.getCachedValueStubBuildOptimized(JSStubElementImpl.java:353) at com.intellij.lang.javascript.psi.impl.JSCachingTypeOwner.getJSType(JSCachingTypeOwner.java:90) at com.intellij.lang.javascript.psi.JSTypeOwner.lambda$getJSType$0(JSTypeOwner.java:23) at com.intellij.lang.javascript.evaluation.JSTypeEvaluationLocationProvider.withTypeEvaluationLocation(JSTypeEvaluationLocationProvider.java:23) at com.intellij.lang.javascript.psi.JSTypeOwner.getJSType(JSTypeOwner.java:23) at com.intellij.lang.javascript.psi.resolve.JSQualifiedNameResolver.lambda$expandElement$2(JSQualifiedNameResolver.java:254) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111) at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66) at com.intellij.lang.javascript.psi.resolve.JSQualifiedNameResolver.expandElement(JSQualifiedNameResolver.java:227) at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) at java.base/java.util.stream.DistinctOps$1$2.accept(DistinctOps.java:174) at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:722) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at com.intellij.lang.javascript.psi.resolve.JSQualifiedNameResolver.expandElements(JSQualifiedNameResolver.java:215) at com.intellij.lang.javascript.psi.resolve.JSQualifiedNameResolver.getExpandedTopLevelElements(JSQualifiedNameResolver.java:179) at com.intellij.lang.javascript.psi.resolve.JSQualifiedNameResolver.resolveByComponents(JSQualifiedNameResolver.java:124) at com.intellij.lang.javascript.psi.resolve.JSQualifiedNameResolver.resolveQualifiedName(JSQualifiedNameResolver.java:67) at com.intellij.lang.javascript.psi.resolve.JSImportHandler.resolveName(JSImportHandler.java:61) at com.intellij.lang.javascript.psi.resolve.JSImportHandler.resolveName(JSImportHandler.java:55) at com.intellij.lang.javascript.psi.resolve.JSImportHandler.resolveObjectOrTypeName(JSImportHandler.java:40) at dev.ngocta.pycharm.odoo.javascript.OdooJSImportHandler.resolveObjectOrTypeName(OdooJSImportHandler.java:25) at com.intellij.lang.javascript.psi.ecma6.impl.ES6ReferenceListImpl.resolveReferenceListMemberNoCache(ES6ReferenceListImpl.java:260) at com.intellij.lang.javascript.psi.ecma6.impl.ES6ReferenceListImpl.lambda$static$0(ES6ReferenceListImpl.java:125) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111) at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66) at com.intellij.lang.javascript.psi.ecma6.impl.ES6ReferenceListImpl.lambda$static$1(ES6ReferenceListImpl.java:125) at com.intellij.psi.impl.PsiParameterizedCachedValue.doCompute(PsiParameterizedCachedValue.kt:23) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:236) at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:43) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:236) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111) at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:237) at com.intellij.psi.impl.PsiParameterizedCachedValue.getValue(PsiParameterizedCachedValue.kt:17) at com.intellij.psi.util.CachedValuesManager.getParameterizedCachedValue(CachedValuesManager.java:97) at com.intellij.lang.javascript.psi.ecma6.impl.ES6ReferenceListImpl.resolveReferenceListMember(ES6ReferenceListImpl.java:252) at com.intellij.lang.javascript.psi.ecma6.impl.ES6ReferenceListImpl.resolveMemberClasses(ES6ReferenceListImpl.java:441) at com.intellij.lang.javascript.psi.ecma6.impl.JSReferenceListMemberImpl.getClassesWithSubstitutors(JSReferenceListMemberImpl.java:100) at com.intellij.lang.javascript.psi.ecma6.impl.ES6ReferenceListImpl.lambda$getReferencedClassesImpl$2(ES6ReferenceListImpl.java:169) at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:273) at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1024) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:575) at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260) at java.base/java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616) at one.util.streamex.StreamEx.toArray(StreamEx.java:871) at com.intellij.lang.javascript.psi.ecma6.impl.ES6ReferenceListImpl.getReferencedClassesImpl(ES6ReferenceListImpl.java:171) at com.intellij.lang.javascript.psi.ecmal4.impl.JSReferenceListImpl.getReferencedClasses(JSReferenceListImpl.java:105) at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.computeExtendsClasses(JSClassBase.java:509) at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase$2.computeForScope(JSClassBase.java:536) at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase$2.computeForScope(JSClassBase.java:532) at com.intellij.lang.javascript.psi.resolve.JSInheritanceUtil$CacheByEnforcedResolveScope.compute(JSInheritanceUtil.java:1000) at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.getClassesFromReferenceList(JSClassBase.java:539) at com.intellij.lang.javascript.psi.ecmal4.impl.JSClassBase.getSuperClasses(JSClassBase.java:455) at dev.ngocta.pycharm.odoo.javascript.OdooJSUtils.getSuperClasses(OdooJSUtils.java:99) at dev.ngocta.pycharm.odoo.javascript.OdooJSUtils.processAncestorClasses(OdooJSUtils.java:106) at dev.ngocta.pycharm.odoo.javascript.OdooJSUtils.lambda$getAncestorClasses$0(OdooJSUtils.java:120) at com.intellij.psi.util.CachedValuesManager$1.compute(CachedValuesManager.java:173) at com.intellij.psi.impl.PsiCachedValueImpl$Direct.doCompute(PsiCachedValueImpl.kt:77) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$3(CachedValueBase.java:236) at com.intellij.util.CachedValueBase.computeData(CachedValueBase.java:43) at com.intellij.util.CachedValueBase.lambda$getValueWithLock$4(CachedValueBase.java:236) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111) at com.intellij.openapi.util.RecursionGuard.doPreventingRecursion(RecursionGuard.java:27) at com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:66) at com.intellij.util.CachedValueBase.getValueWithLock(CachedValueBase.java:237) at com.intellij.psi.impl.PsiCachedValueImpl$Direct.getValue(PsiCachedValueImpl.kt:81) at com.intellij.util.CachedValuesManagerImpl.getCachedValue(CachedValuesManagerImpl.java:83) at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:170) at com.intellij.psi.util.CachedValuesManager.getCachedValue(CachedValuesManager.java:136) at dev.ngocta.pycharm.odoo.javascript.OdooJSUtils.getAncestorClasses(OdooJSUtils.java:118) at dev.ngocta.pycharm.odoo.javascript.owl.OwlUtils.isOwlComponentDerivedClass(OwlUtils.java:43) at dev.ngocta.pycharm.odoo.javascript.owl.OwlUtils.lambda$findOwlComponentsByName$0(OwlUtils.java:65) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) at java.base/java.util.LinkedList$LLSpliterator.forEachRemaining(LinkedList.java:1249) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at dev.ngocta.pycharm.odoo.javascript.owl.OwlUtils.findOwlComponentsByName(OwlUtils.java:65) at dev.ngocta.pycharm.odoo.javascript.owl.OwlComponentReference.getVariants(OwlComponentReference.java:45) at com.intellij.codeInsight.completion.CompletionData.completeReference(CompletionData.java:225) at com.intellij.codeInsight.completion.CompletionVariant.addReferenceCompletions(CompletionVariant.java:122) at com.intellij.codeInsight.completion.CompletionData.completeReference(CompletionData.java:66) at com.intellij.codeInsight.completion.LegacyCompletionContributor.lambda$completeReference$0(LegacyCompletionContributor.java:80) at com.intellij.codeInsight.completion.LegacyCompletionContributor.processReference(LegacyCompletionContributor.java:141) at com.intellij.codeInsight.completion.LegacyCompletionContributor.processReferences(LegacyCompletionContributor.java:114) at com.intellij.codeInsight.completion.LegacyCompletionContributor.completeReference(LegacyCompletionContributor.java:78) at com.intellij.codeInsight.completion.LegacyCompletionContributor.fillCompletionVariants(LegacyCompletionContributor.java:48) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributor(CompletionService.java:81) at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.getVariantsFromContributor(CompletionServiceImpl.kt:220) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:73) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:150) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:142) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:138) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:128) at com.intellij.codeInsight.completion.XmlNoVariantsDelegator.fillCompletionVariants(XmlNoVariantsDelegator.java:12) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributor(CompletionService.java:81) at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.getVariantsFromContributor(CompletionServiceImpl.kt:220) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:73) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:150) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:142) at com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:138) at com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$1.addCompletions(LiveTemplateCompletionContributor.java:87) at com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:23) at com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:156) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributor(CompletionService.java:81) at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.getVariantsFromContributor(CompletionServiceImpl.kt:220) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:73) at com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:56) at com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:130) at com.intellij.codeInsight.completion.BaseCompletionService.performCompletion(BaseCompletionService.java:48) at com.intellij.codeInsight.completion.impl.CompletionServiceImpl.performCompletion(CompletionServiceImpl.kt:235) at com.intellij.codeInsight.completion.CompletionProgressIndicator.lambda$calculateItems$12(CompletionProgressIndicator.java:974) at com.intellij.util.indexing.FileBasedIndex.lambda$ignoreDumbMode$0(FileBasedIndex.java:225) at com.intellij.openapi.util.RecursionManager$1.computePreventingRecursion(RecursionManager.java:111) at com.intellij.util.indexing.FileBasedIndexEx.ignoreDumbMode(FileBasedIndexEx.java:645) at com.intellij.util.indexing.FileBasedIndex.ignoreDumbMode(FileBasedIndex.java:224) at com.intellij.util.indexing.DumbModeAccessType.ignoreDumbMode(DumbModeAccessType.java:41) at com.intellij.codeInsight.completion.CompletionProgressIndicator.calculateItems(CompletionProgressIndicator.java:970) at com.intellij.codeInsight.completion.CompletionProgressIndicator.runContributors(CompletionProgressIndicator.java:958) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$7(CodeCompletionHandlerBase.java:383) at io.opentelemetry.context.Context.lambda$wrap$1(Context.java:212) at com.intellij.codeInsight.completion.CompletionThreadingKt.tryReadOrCancel$lambda$0(CompletionThreading.kt:76) at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.tryRunReadAction(AnyThreadWriteThreadingSupport.kt:291) at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:965) at com.intellij.codeInsight.completion.CompletionThreadingKt.tryReadOrCancel(CompletionThreading.kt:74) at com.intellij.codeInsight.completion.CodeCompletionHandlerBase.lambda$startContributorThread$8(CodeCompletionHandlerBase.java:375) at io.opentelemetry.context.Context.lambda$wrap$1(Context.java:212) at com.intellij.codeInsight.completion.AsyncCompletion.startThread$lambda$1$lambda$0(CompletionThreading.kt:98) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:217) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202) at com.intellij.codeInsight.completion.AsyncCompletion.startThread$lambda$1(CompletionThreading.kt:93) at com.intellij.codeInsight.completion.AsyncCompletion$startThread$future$1.invokeSuspend(CompletionThreading.kt:104) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104) at kotlinx.coroutines.internal.SoftLimitedDispatcher$Worker.run(SoftLimitedDispatcher.kt:125) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:99) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750) Caused by: java.io.IOException: Unrecognized gist.valueKind(=-1): incorrect (outdated?) gist format at com.intellij.util.gist.storage.GistStorageImpl$GistImpl.nextRecordOrNull(GistStorageImpl.java:376) at com.intellij.util.gist.storage.GistStorageImpl$GistImpl.getProjectData(GistStorageImpl.java:226) ... 175 more

trinhanhngoc commented 2 months ago

Hello @andreax64 ,

I am pretty sure this is an IntelliJ indexing issue itself. You can try Invalidate caches to see if it helps.