phptools-docs
phptools-docs copied to clipboard
Actual command not found, wanted to execute devsense:peekReferences /80387
I clicked on "3 references" above a function definition and got this error:
Actual command not found, wanted to execute devsense:peekReferences /80387
and of course it fails to find the references.
After a couple of minutes and having done nothing, it's working again
Interesting; thank you for reporting that.
It seems VSCode did not register our custom commands soon enough, causing this kind of issue. I'll take a look if we can handle the command registration sooner.
VSCode may remember Code Lenses from a previous session, and it shows that even before our language server started. That would cause the problem.
When this happen, do you know if PHP Language Server is started already?
It happened to me once as well! and then it worked properly ... I'll keep watching the issue.
Just happened to me again. As usual, issues goes away after a few minutes or (in this case) seconds.
I'm under the impression that, every time this happens, it doesn't matter how long I wait (either doing nothing or ctrl+clicking again and again on a function call) it won't fix itself, but if I "go away" from VSCode (i.e. give focus to another application) and come back, it will fix itself immediately. That is, as if the act of giving focus away and back triggered whatever event causes the issue to fix itself.
I know this might be a coincidence, and that it's easy to get the wrong impression that some "trick" makes an issue go away when it's just a matter of waiting (because the longer you wait the more likely you become to do the thing), but since I've starting noticing it, it has always happened. Sometimes I do it immediately, and it goes away immediately, sometimes I wait for many, many seconds and then the moment I do the "going away and coming back" trick it goes away.
@php4fan I have found a few similar issues
- https://github.com/microsoft/vscode/issues/198411
- https://github.com/microsoft/vscode/issues/170117
They say, that VSCode "holds" a reference to a command that has been disposed. So the 'focus' theory makes sense (forces VSC to refresh commands/code lenses).
The fix mentioned in https://github.com/microsoft/vscode/pull/198461 may fix this behavior - I'll try that.
I'm still not sure, how to reproduce the issue, maybe after restarting/crashing the extension? Maybe after switching between document tabs?
hmm it feels more and more like VSCode issue as it's caching the resolved commands and then it fails to forward it to our LS.
Isn't it happening after the Language Server gets restarted after a crash or something?
Isn't it happening after the Language Server gets restarted after a crash or something?
I don't know, how can I check that? If it is crashing, this is the only symptom (that I've noticed at least).
I don't know, how can I check that? If it is crashing, this is the only symptom (that I've noticed at least).
There would be an exception in OUTPUT / PHP Language Server.
And a popup window in the lower right corner of VSCode, if the language server crashes repeatedly.
There would be an exception in OUTPUT / PHP Language Server.
By the way it's difficult to figure out when the messages in the output were logged, because they have a time but not a date. I have to carefully look at all of them and look where the times wrap around, and assume that I use VSCode every day (or remember which days I didn't use it) and that it's unlikely to log nothing for 24 hours.
Is this something I should report to VSCode or are the timestamps part of the output from the extension? I can't understand what goes through the mind of a person who decides to put a timestamp on a log entry and consciously decides that the time of day is enough.
It doesn't look like there was a language server crash around the time I saw the "actual command not found" messages.
Given that I posted my comment here yesterday at 8PM GMT+1, I must have got the error a few minutes before that, or a few hours at most.
I have two VSCode windows open with two different projects, and I'm not sure in which one I got the error.
In one, in the output I have only this:
[Info - 4:20:11 PM] PHP Language Server Started (PID: 29426)
[Info - 4:20:11 PM] Parsing phar file /home/*****/composer.phar ...
[Info - 4:20:15 PM] Loaded 79 package(s) from cache in 00:00:02.2402670.
[Info - 4:20:16 PM] Processing packages in /home/*****/vendor/composer/installed.json ...
[Info - 4:20:16 PM] Processing done in 00:00:00.0095697.
[Info - 5:27:16 PM] 1 file system change(s) ... <<<<<<< and a few more of these
In the other one, there are these errors that I calculate must be from Monday around the time I opened VSCode:
[Error - 4:20:20 PM] Parsing '/home/*****/*****/vendor/propel/propel1/runtime/lib/validator/NotMatchValidator.php' errored.
[Error - 4:20:20 PM] Parsing '/home/*****/*****/vendor/propel/propel1/runtime/lib/validator/MatchValidator.php' errored.
[Error - 4:20:20 PM] Parsing '/home/*****/*****/vendor/propel/propel1/runtime/lib/util/BasePeer.php' errored.
[Error - 4:20:20 PM] Parsing '/home/*****/*****/vendor/propel/propel1/generator/lib/config/GeneratorConfig.php' errored.
[Error - 4:20:20 PM] Parsing '/home/*****/*****/vendor/propel/propel1/generator/lib/config/QuickGeneratorConfig.php' errored.
[Error - 4:20:20 PM] AggregateException_ctor_DefaultMessage (IO_PathNotFound_Path, /home/*****/*****/vendor/roave/security-advisories)
[Info - 4:20:20 PM] Processing done in 00:00:01.0980310.
so nowhere near the time of the error popup, and I guess these are not crashes, right?
Thank you, there are no crashes; the redundant messages from the log will be removed, just to keep things simple.
Still observing this from time to time
@php4fan thank you for the update;
is it always devsense:peekReferences ?
is it always devsense:peekReferences ?
I'll pay more attention next time
having the same issue here, just grabbing some popcorn and watching
@nuoclanh86 thank you for the information. May I ask you for some details? Is it always the devsense:peekReferences command ?
@nuoclanh86 thank you for the information. May I ask you for some details? Is it always the
devsense:peekReferencescommand ?
oh mine is difference a bit it always like this: "Actual command not found, wanted to execute roslyn.client.peekReferences /445" and it happens 5 to 6 times per hour of use
@nuoclanh86 thank you for the information. May I ask you for some details? Is it always the
devsense:peekReferencescommand ?oh mine is difference a bit it always like this: "Actual command not found, wanted to execute roslyn.client.peekReferences /445" and it happens 5 to 6 times per hour of use
This is more likely Omnisharp/C# extension, which may indicate it is an issue in VSCode itself.