-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Resolve shell environment failed on 1.62.1 #136791
Comments
I am having what appears to be the same issue with a SSH Remote workspace on the latest release. My .bashrc is sourced, but my .bash_profile no longer is. It seems the terminal no longer inherits the environment. Before updating VS Code today, I have never had this problem. (Is there any easy way to temporarily downgrade VS Code (on Windows), btw?) |
For the Windows user installer it would be: https://update.code.visualstudio.com/1.62.0/win32-x64-user/stable |
WSL2 Ubuntu seems to be having some severe regressions with the release of v1.62.1 - I just filed #136809 and I see that #136799 is also WSL2 ubuntu-related - each seems to be issues related to SSH/connections via either the terminal or otherwise. Hopeful someone at Microsoft can take a look soon! :) |
I am having the same issue with SSH Remote workspace after updating VS Code to 1.62.1 |
@deepak1556 Identified the fix in main: e08e4d3#diff-ba73d13771267ed61274b4094ee466e9ee2256307ae6cae5ef1161d0bfaebe67 Labelling as candidate for visibility. |
Also impacting tasks in WSL: #136799 |
Chiming in: took me a while to figure out why my Go setup that has been working for years suddenly wasn't working, and it's this bug; pathing sourced from |
@briankintz: Worked great, thank you! And this indeed confirms that 1.62.1 was the culprit in my case. (SSH, not WSL) |
Fixed in #136877 |
When will this go live? I had to restore 1.60 on my machine after messing around with shell setup for a long while. |
That actually worked before. The problem I had was that clicking on a launch item that used npm, then that shell was not a login shell and it was trying to find npm on the windows side. |
@richtera can you check if the issue is present in latest insiders https://code.visualstudio.com/insiders which already contains the fix. |
@deepak1556 Ok that works. I guess both shell problems are related. Thank you. |
yup thanks for testing! |
Confirmed my problems both with the shell and with tasks are fixed in the latest insiders build. Thanks @deepak1556! |
I guess this is the same problem #136838 |
Argh, first time I needed to use a remote env in months and wouldn't you know it I hit this release. And the fix is coming out today even, but in a timezone after my workday is up! |
What's the correct way to start a VSCode WSL instance that inherits the profile? Sometimes when I just call wsl.exe code . it does not inherit it. |
@Stanzilla It should. Check out the WSL log for the entry |
A lot of time I have to remove the code that distinguishes login and non-login shells in bashrc, otherwise some things like nvm, conda and so on won't get initialized. I think it might be worth it to review which parts of the system pass --login to bash or zsh during startup of Visual Studio Code. |
Hmmm, I am seeing this failing again in 1.62.2. My launch.json file no longer works, although everywhere else in terminal and javascript debugging terminal the environment is correct. It looks like the current version no longer opens up the terminal first so I can't see what's happening. I will enable remote.WSL.debug to see if that helps. |
Using remote.WSL.debug now shows (edited to show the whole log, it's not so large) [2021-11-16 08:20:49.486] [remoteagent] [info]
*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*
[2021-11-16 08:20:49.486] [remoteagent] [info] Extension host agent started.
[2021-11-16 08:20:49.693] [remoteagent] [info] Deleted from disk ms-azuretools.vscode-docker /home/andy/.vscode-server/extensions/ms-azuretools.vscode-docker-1.17.0
[2021-11-16 08:20:49.965] [remoteagent] [info] [::ffff:172.24.192.1][1419c1fa][ManagementConnection] New connection established.
[2021-11-16 08:20:49.966] [remoteagent] [info] [::ffff:172.24.192.1][427f594b][ExtensionHostConnection] New connection established.
[2021-11-16 08:20:59.478] [remoteagent] [error] ptyHost was unable to resolve shell environment {}
[2021-11-16 08:20:59.479] [remoteagent] [error] ExtensionHostConnection#buildUserEnvironment resolving shell environment failed {}
[2021-11-16 08:20:59.500] [remoteagent] [info] [::ffff:172.24.192.1][427f594b][ExtensionHostConnection] <332> Launched Extension Host Process.
[2021-11-16 08:21:03.626] [remoteagent] [error] ExtensionHostConnection#buildUserEnvironment resolving shell environment failed {}
[2021-11-16 09:46:29.962] [remoteagent] [info] [::ffff:172.24.192.1][b8ecfbff][ExtensionHostConnection] New connection established.
[2021-11-16 09:46:29.964] [remoteagent] [error] ExtensionHostConnection#buildUserEnvironment resolving shell environment failed {}
[2021-11-16 09:46:29.967] [remoteagent] [info] [::ffff:172.24.192.1][b8ecfbff][ExtensionHostConnection] <2800> Launched Extension Host Process.
[2021-11-16 09:46:29.998] [remoteagent] [info] [::ffff:172.24.192.1][4f87aba8][ManagementConnection] New connection established.
[2021-11-16 09:46:34.453] [remoteagent] [error] ExtensionHostConnection#buildUserEnvironment resolving shell environment failed {}
[2021-11-16 09:46:57.102] [remoteagent] [info] [::ffff:172.24.192.1][fab8d065][ManagementConnection] New connection established.
[2021-11-16 09:46:57.181] [remoteagent] [info] [::ffff:172.24.192.1][0e39568f][ExtensionHostConnection] New connection established.
[2021-11-16 09:46:57.183] [remoteagent] [error] ExtensionHostConnection#buildUserEnvironment resolving shell environment failed {}
[2021-11-16 09:46:57.186] [remoteagent] [info] [::ffff:172.24.192.1][0e39568f][ExtensionHostConnection] <4134> Launched Extension Host Process.
[2021-11-16 09:47:00.523] [remoteagent] [error] ExtensionHostConnection#buildUserEnvironment resolving shell environment failed {}
[2021-11-16 10:57:22.773] [remoteagent] [info] [::ffff:172.24.192.1][1419c1fa][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[2021-11-16 10:57:23.839] [remoteagent] [info] [::ffff:172.24.192.1][427f594b][ExtensionHostConnection] <332> Extension Host Process exited with code: 0, signal: null.
[2021-11-16 10:57:25.380] [remoteagent] [info] [::ffff:172.24.192.1][fab8d065][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[2021-11-16 10:57:26.427] [remoteagent] [info] [::ffff:172.24.192.1][0e39568f][ExtensionHostConnection] <4134> Extension Host Process exited with code: 0, signal: null.
[2021-11-16 10:57:29.017] [remoteagent] [info] [::ffff:172.24.192.1][4f87aba8][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[2021-11-16 10:57:30.069] [remoteagent] [info] [::ffff:172.24.192.1][b8ecfbff][ExtensionHostConnection] <2800> Extension Host Process exited with code: 0, signal: null.
[2021-11-16 10:57:30.069] [remoteagent] [info] Last EH closed, waiting before shutting down
[2021-11-16 10:57:33.099] [remoteagent] [info] [::ffff:172.24.192.1][00e79969][ManagementConnection] New connection established.
[2021-11-16 10:57:33.196] [remoteagent] [info] [::ffff:172.24.192.1][0b2efabe][ExtensionHostConnection] New connection established.
[2021-11-16 10:57:33.198] [remoteagent] [error] ExtensionHostConnection#buildUserEnvironment resolving shell environment failed {}
[2021-11-16 10:57:33.203] [remoteagent] [info] [::ffff:172.24.192.1][0b2efabe][ExtensionHostConnection] <7935> Launched Extension Host Process.
[2021-11-16 10:57:40.647] [remoteagent] [info] [::ffff:172.24.192.1][00e79969][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[2021-11-16 10:57:41.713] [remoteagent] [info] [::ffff:172.24.192.1][0b2efabe][ExtensionHostConnection] <7935> Extension Host Process exited with code: 0, signal: null.
[2021-11-16 10:57:41.713] [remoteagent] [info] Cancelling previous shutdown timeout
[2021-11-16 10:57:41.713] [remoteagent] [info] Last EH closed, waiting before shutting down
[2021-11-16 10:57:42.140] [remoteagent] [info] [::ffff:172.24.192.1][ba818ac8][ManagementConnection] New connection established.
[2021-11-16 10:57:42.422] [remoteagent] [info] [::ffff:172.24.192.1][63d1584a][ExtensionHostConnection] New connection established.
[2021-11-16 10:57:42.423] [remoteagent] [error] ExtensionHostConnection#buildUserEnvironment resolving shell environment failed {}
[2021-11-16 10:57:42.427] [remoteagent] [info] [::ffff:172.24.192.1][63d1584a][ExtensionHostConnection] <8990> Launched Extension Host Process.
[2021-11-16 10:58:54.645] [remoteagent] [error] ExtensionHostConnection#buildUserEnvironment resolving shell environment failed {}
[2021-11-16 11:00:08.029] [remoteagent] [error] ExtensionHostConnection#buildUserEnvironment resolving shell environment failed {}
[2021-11-16 11:02:41.715] [remoteagent] [info] New EH opened, aborting shutdown
[2021-11-16 11:05:57.204] [remoteagent] [info] [::ffff:172.24.192.1][ba818ac8][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
[2021-11-16 11:05:58.259] [remoteagent] [info] [::ffff:172.24.192.1][63d1584a][ExtensionHostConnection] <8990> Extension Host Process exited with code: 0, signal: null.
[2021-11-16 11:05:58.260] [remoteagent] [info] Last EH closed, waiting before shutting down
[2021-11-16 11:06:01.707] [remoteagent] [info] [::ffff:172.24.192.1][ec64ed7f][ManagementConnection] New connection established.
[2021-11-16 11:06:01.711] [remoteagent] [info] [::ffff:172.24.192.1][5eb8c6ec][ExtensionHostConnection] New connection established.
[2021-11-16 11:06:01.712] [remoteagent] [error] ExtensionHostConnection#buildUserEnvironment resolving shell environment failed {}
[2021-11-16 11:06:01.717] [remoteagent] [info] [::ffff:172.24.192.1][5eb8c6ec][ExtensionHostConnection] <11294> Launched Extension Host Process.
[2021-11-16 11:06:19.201] [remoteagent] [error] ExtensionHostConnection#buildUserEnvironment resolving shell environment failed {} |
It works fine in the insider build
The failure is from this exact version.
what's interesting is that after upgrading the insider build to the latest version the normal version started to work again. |
I'm on 1.63.0-insider on WSL2 on windows 10 and still getting this problem when trying to run live-server (which I installed as an npm package using nvm, not a VSCode extension) from a terminal in VSCode Insiders
Remote Server Logs:
|
The shell environment no longer resolves correctly in remote terminals in 1.62.1.
A possible workaround is to manually source the shell env in remote terminals
Another workaround is to downgrade to
1.62.0
"update.mode": "none"
and install1.62.0
:After updating from 1.62.0 to 1.62.1, the full shell environment under WSL2 isn't loaded.
The remote server log shows the following errors:
Rolling back to 1.62.0 solves the problem
The text was updated successfully, but these errors were encountered: