[analysis_server] Bad state:: Expected existing element
and Invalid file path
errors
#48082
Labels
legacy-area-analyzer
Use area-devexp instead.
needs-info
We need additional information from the issue author (auto-closed after 14 days if no response)
P3
A lower priority bug or feature request
Issue:
The analysis server is throwing
Bad state:: Expected existing element
andInvalid file path
errors in a project that I'm working on. I'm observing the errors in VS Code and the error persist even after restarting VS Code entirely (I assume that will be equivalent to restarting the analysis server). Also due to that error, all requests to the server are failing (e.g. hovering over definition or go-to definition).In fact, this is the second time I face this issue. The first time I filed it here at Dart-Code#3726. The issue disappeared on its own after restarting VS Code multiple times (given that I had multiple projects open at the time so maybe switching between them helped). Now, every time I open VS Code for the same project, I'm getting the errors shown in the logs below (edit: see update below -- opening another project made it the issue disappear).
Logs
The following is a sample extracted from the
analyzerInstrumentation
log file attached below. This is the first error after opening a fresh instance of VS Code for the project in question.Probably Related Issue:
The following issue describes a probably similar errors that has been appearing frequently as well:
Attachement:
As mentioned above, this log is from a fresh start of VS Code where the error was happening:
Dart SDK Version
Additional Details:
The project in question is an open source project located at the following repository:
The error occurred after I switched to my local branch and I was viewing the following file:
The issue is only happening at
/Users/osaxma/Projects/super_editor/super_editor/
project. When I opened another project, it was working fine (even the first time, the issue occurred at the same project, and same branch -- autofocus branch on my fork).Update:
I just opened a different project, then closed it and then I reopened
super_editor
project, and the issue was gone (no more errors).I hope these information are helpful. Unfortunately, I'm not able to reproduce as in both times it happened at random but I can say for sure that in both times it happened after I switched from one branch to another.
The text was updated successfully, but these errors were encountered: