New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insiders: "Cannot read property 'adapter' of undefined" #66322
Comments
(Experimental duplicate detection) |
The "adapter" property refers to something in |
Ah, I see - it occurred while I was trying to debug so I assumed it was related. I see now it says Let me know if this may be extension dependent and what info would be useful to track it down. |
Do you have some more steps here? Is this a dart-file? |
Yep, it's a Dart file. I don't seem to be able to repro doing what I think is the same now - any ideas what sort of thing could go wrong to cause this that might help reproduce it? (it's also possible my Insiders updated, though I think that happened before I was hitting this) |
This could happen when registering and unregistering a provider without us knowing, e.g. while a request is active. Could that be? |
I guess that's possible - everything is generally registered in We also dispose them when we perform a "silent restart" of the language server and then re-register them. This shouldn't happen much during normal use, but I guess it's possible (since I was trying to repro something) that I opened the project and hit F5 while the code shown above was still going on. If it was that - is this a bug, or should I only register at certain times? (btw, if you specifically meant a code action provider, then as far as I can tell, they've only activated synchronously in the activate method) |
No, you should be able to do this any time. It's a bug on our end. |
@mjbvz the code action provider regsitry ( |
@jrieken Can you verify? |
This error still exists in 1.31.1 (Stable). I got it today and I don't know if it's related but one of my file syntax colorings is broken. I didn't use a debugger, just updated VS Code and after some time run into this issue. Broken coloringI'm using Default Dark+ theme. Log (Window)
Log (Extension Host)
Toggle Developer Tools (Warnings)
|
That's a different stack ( |
@roblourens Okay, thanks, already opened a issue: #68764 |
Saw this in documentSymbols just now. I've opened #69147. This time it's certainly what @jrieken suggested:
I had just changed the Dart SDK path, which results in us disposing and re-creating the providers that have references to the language server (which changes with the SDK). |
In the current insiders, when I run a debug session I see this:
This doesn't happen in stable. I'm running a Dart debug session, though I don't know if matters (the stack doesn't look like it's the extension code, but the stack traces are often misleading).
The text was updated successfully, but these errors were encountered: