-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Revisit hardcoded timeout for resolving shell environment blocking first window open #106537
Comments
Where do you have your You can see the PATH that VS Code has by running |
@connor4312 Output from Developer tools console:
Since |
I have the same problem after I upgraded to 1.49 !
I hit this error If I changed runtimeExecutable I hit the following error If I changed runtimeExecutable and runtimeArgs I hit the following error |
That's coming from your shell. In js-debug to find Node we run As a workaround, you may be able to get things to work by setting @sandy081 / @isidorn did something change in 1.49 that would interfere with the environment that the extension host receives? |
Hi added I didn't remember whether I restarted vscode yesterday but today that did fix the problem! |
I had same problem after upgrading to 1.49.0. |
Same problem after upgrading to 1.49.0. Problem went away after downgrading to 1.48.2. |
Sorry, I have no idea. If it is extensionHost related pinging @alexdima |
Can someone impacted please try:
The only change that happened in this timeframe around the extension host process launching that I'm aware of is 1b5fbca which removes ping @joaomoreno |
I got an error message right after launching vscode: We did not find "node" on your path, so can not enable auto-attach in your environment ... on Linux. I am using the insider version and do an update everyday. I don't have this issue yesterday, so the problem must be caused by changes between the insider version "d1f267742169584db010716d92addf50d4cd8139" and "9e505675670d65138405321a60b0df4ddec28799". Ref: #106938, which was marked(?!) as a "duplicate" of this one. |
And in my case, installing the nightly version of JavaScript Debugger can make that error message gone (#106938). Any explanation? |
I'm not sure how the debugger version is related to the issue, I haven't touched this area since the stable release. Curious whether using the nightly works for everyone, like @Ben-WD and @qiulang. |
Just updated and have what is likely a related problem. In my case I have the path to electron specified in launch.json:
Error message on launching debug states that the path does not exist: This worked correctly before updating to 1.49.0. Hope this is useful. Version: 1.49.0 |
That's not related, but does it work if you replace the tilde |
Thanks. Untildifying did make a difference. Now I am getting a permission denied error in the debug console and no popup dialog. I will try to track that down, but as you said this is not related to the issue above. |
@connor4312 After I restart vscode I don't have the problem any more. I tried to reproduce it but I can't |
Same problem here when platform is WSL but works fine when platform is Windows. Version: 1.49.1 (user setup) Opened VS Code from WSL terminal ( Received error message: Can't find Node.js binary "node": path does not exist. Make sure Node.js is installed and in your PATH, or set the "runtimeExecutable" in your launch.json Output from: Output from: Output from: No WSL paths! Works with work-around by adding:
to launch.json launch.json:
Also just to check, switched to Windows with No errors, works fine. All above is reproducible. |
@greglnye do you add the |
cc @aeschli who has recently looked into some environmental variable fixes for WSL. |
Did same thing as @greglnye and @connor4312 said, set up
|
@MatayoshiMariano nvm is a known case where (in their default install) we won't always pick it up, because it's set in your .bashrc which isn't run by VS Code and won't be applied unless you launch |
I had the same problem. Many of you restarted VScode so i tried it and it solved the problem. Thanks you guys. |
Hi! I'm having the same problem. I had this problem in some projects and after updating to Visual Studio Code 1.49.3 it's happening to me in all the projects so I cannot debug any of my applications. Please help! I don't know what else to try, I have already restarted the software several times, restarted the Mac and installing another versión of node with nvm but the problem keeps appearing. |
fyi @joaomoreno on my change. I really think this is not the right solution all in all because for a user you may be surprised that opening the first window always takes up to 10s (now 3s) without fully understanding what is going on in the background. I think a setting for this could work, but is hard to discover too. Alternatively we could simply proceed with opening the workbench and let the process environment come in async with possibly an event to emit once that happens so that parties that need to update can subscribe to? |
It happens a lot, and that's why it was set to 10.
@jrieken made sure this doesn't block the window from opening, just the workbench from loading, back when he introduced Overall, the user env is really only needed when further spawning more processes, so the real fix here is to just have an Until then, I suggest to revert to the 10s timeout. Adding a setting for it is not good. Because every single user timing out will always file an issue before they even consider searching for a setting. |
I really do not see how this good. The workbench not loading in 10s is equally bad as the window not loading in 10s. All that matters is the time to blinking cursor in the editor and that is what we measure in our perf runs. #108804 sounds like a good idea and I think we should really tackle it soon not late. Back to 3s vs 10s: what I don't like is this:
If we had a setting this would at least enable this flow:
|
Sorry for interjecting, I understand your concern @bpasero, but in my opinion ---from a user perspective--- it'd be better not to modify the current behavior. Thus avoiding a couple threads of confused people from undocumented behavior changed. |
I've had this same error happen recently as well, rendering VSCode useless for me until I figured out what was going on, and it took me a good bit of time to even figure out that this was the root cause, as I didn't get notified that the environment loading was timed out. My eventual "resolution" was to disable extensions until my environment could be loaded in time. Given that I actually would like to use some of these extensions I disabled, I obviously can't consider this a real fix (this is something I will have to shelve VSCode for if it a must-have extension that is causing the problem, but I haven't gotten that far yet). A setting to override the timeout would be great, I could change it and move on. The initial timeout is probably fine for a lot of people and the arguments for not having it set to 10s as a default are solid, but the lack of feedback about the environment not loading combined with the inability to override this behavior is a killer combination. I see that there is a feature request already put in to provide a real fix, but it would be amazing if, in the interim, we can get a setting + a prompt to update this setting if the environment load runs afoul of that timeout. |
Developer: Reload Windows resolved my issue. Might not work for you just try. It worked for me. |
I have this issue too with 1.50. never had with 1.49 ( or at least it never happened ). Solved with Developer: Reload windows |
I've had the same problem with version 1.51.1 on macOS and solved (or worked around) it by re-starting VSCode. |
Same problem Developer: Reload windows solved it |
Since I think the current solution is just wrong (blocking the startup to resolve shell environment waiting for N seconds), I will close this as duplicate of #108804 which is the correct solution: resolve the shell environment when it is needed. In that solution we will wait as long as it takes for the shell to spawn. |
In case anyone else comes across this, this problem started for me after installing the macOS Big Sur 11.1 update. |
I'm not on big sur, still get problems launching with debugger. restarting vs code fixes it. Version: 1.52.1 |
Issue Type: Bug
I'm developing a Node.js webserver application with the following launch configuration:
This has been working perfectly until version 1.49 has been installed. Since then, I get the following error when launching the application:
Can't find Node.js binary "node": path does not exist. Make sure Node.js is installed and in your PATH, or set the "runtimeExecutable" in your launch.json
Output from
echo $PATH
:Out from
which node
:Of course I can add the argument runtimeExecutable to launch.json, but I think this should not be necessary.
VS Code version: Code 1.49.0 (e790b93, 2020-09-10T17:39:53.251Z)
OS version: Darwin x64 19.6.0
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Extensions (13)
The text was updated successfully, but these errors were encountered: