vscode-azure-account
vscode-azure-account copied to clipboard
Bug report: Unable to launch Azure Cloud Shell
VSCode: Version: 1.75.0 Commit: e2816fe719a4026ffa1ee0189dc89bdfdbafb164 Date: 2023-02-01T15:29:17.766Z Electron: 19.1.9 Chromium: 102.0.5005.194 Node.js: 16.14.2 V8: 10.2.154.23-electron.0 OS: Linux x64 5.15.0-58-generic Sandboxed: No
System: Kernel: 5.15.0-58-generic x86_64 bits: 64 compiler: gcc v: 11.3.0 Desktop: Cinnamon 5.6.7 tk: GTK 3.24.33 wm: muffin dm: LightDM Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Extension: [0.11.3] - 2023-01-18
Error: Unable to launch Azure Cloud Shell
Error Message:
The terminal process "/home/user/.vscode/extensions/ms-vscode.azure-account-0.11.3/bin/node.sh '/proc/self/exe', '-e', 'require('/home/user/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher').main()', '--ms-enable-electron-run-as-node'" terminated with exit code: 1.
Steps to Reproduce:
- Try to launch Azure Cloud Shell (either PowerShell or Bash) within vscode terminal
Same issue here. Version: 1.76.2 Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884 Date: 2023-03-14T17:57:21.103Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Linux x64 6.2.7-200.fc37.x86_64 Sandboxed: Yes
Extension: [0.11.3] - 2023-01-18
Error: /proc/self/exe: require('/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher').main(): No such file or directory
This has worked in the past but not for the past month or two.
There was a change related to Cloud Shell in the latest release (v0.11.3). Could you try reverting to v0.11.2 and seeing if it works?
Same result going back 2 versions. Restarted the system between both instances.
Same result going back 2 versions. Restarted the system between both instances.
Ok, thanks for that info.
Updated to March 2023 (version 1.77). Same error on both 0.11.3 and 0.11.2
Version: 1.77.0 Commit: 7f329fe6c66b0f86ae1574c2911b681ad5a45d63 Date: 2023-03-29T10:05:35.165Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Linux x64 6.2.8-200.fc37.x86_64 Sandboxed: Yes
Issue still persist
Can you verify that the files in the error message exist?
-
/home/user/.vscode/extensions/ms-vscode.azure-account-0.11.3/bin/node.sh
-
/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher
Thanks.
Also this seems to be Linux specific.
Also this seems to be Linux specific.
Yes, I have the same setup on my Windows PC and it works without issue.
Can you verify that the files in the error message exist?
/home/user/.vscode/extensions/ms-vscode.azure-account-0.11.3/bin/node.sh
/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher
Thanks.
Yes, affirmative, the file does exist
- /home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/bin/node.sh
- /home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher.js
Can you verify that the files in the error message exist?
/home/user/.vscode/extensions/ms-vscode.azure-account-0.11.3/bin/node.sh
/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher
Thanks.
Yes, those files exist.
$ ls /home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/bin/node.sh /home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/bin/node.sh
$ ls /home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher ls: cannot access '/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher': No such file or directory
$ ls /home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher.js /home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher.js
In the past I tried removing that .js file extension and it gave the same error. I just tried again and it, also, gave the same error.
Could it be an issue with the permissions on the cloudConsoleLauncher file?
The file is currently -rw-r--r--. 1
What permissions would you like me to set and test?
I just checked and my file also has -rw-r--r-- 1
(Darwin). So I'm not sure permissions is the issue.
Might be a long shot, but we are using a small bash helper script to start the shell.
It has a shebang of #!/bin/bash
. Is it possible that the shebang is wrong for your system?
Try running that script and see if there are any errors.
$ sudo ausearch -m AVC,USER_AVC -ts recent
<no matches>
$ ps -p $$
PID TTY TIME CMD
7274 pts/0 00:00:00 bash
[user@machine bin]$ ./node.sh
[user@machine bin]$
Can you try running the following command? Make sure to substitute {user}
with your username. You also might need to change the path to the node executable. Find that with which node
or which nodejs
.
/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/bin/node.sh /usr/bin/node -e "console.log(require('/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher'))"
On my machine, I get the following output:
{
Errors: { DeploymentOsTypeConflict: 'DeploymentOsTypeConflict' },
getUserSettings: [Function: getUserSettings],
provisionConsole: [Function: provisionConsole],
resetConsole: [Function: resetConsole],
connectTerminal: [Function: connectTerminal],
main: [Function: main]
}
I'm trying to emulate the command that's failing as much as possible to see if we can reproduce the error outside of VS Code.
Initially, I did not have nodejs installed, so the command returned this:
$ /home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/bin/node.sh /usr/bin/node -e "console.log(require('/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher'))"
/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/bin/node.sh: line 2: /usr/bin/node: No such file or directory
I installed nodejs from the fedora repo and now I get this:
$ /home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/bin/node.sh /usr/bin/node -e "console.log(require('/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.3/dist/cloudConsoleLauncher'))"
{
Errors: { DeploymentOsTypeConflict: 'DeploymentOsTypeConflict' },
getUserSettings: [Function: getUserSettings],
provisionConsole: [Function: provisionConsole],
resetConsole: [Function: resetConsole],
connectTerminal: [Function: connectTerminal],
main: [Function: main]
}
I should add that it still doesn't work from with-in vscode
Updated to 1.77.1. Same error on both 0.11.3 and 0.11.2
Version: 1.77.1 Commit: b7886d7461186a5eac768481578c1d7ca80e2d21 Date: 2023-04-04T23:20:37.202Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Linux x64 6.2.9-200.fc37.x86_64 Sandboxed: Yes
Updated to v0.11.4. Same error other than the path reference to 0.11.4. Also, I'm now working on a clean Fedora 38 workstation.
Version: 1.77.3 Commit: 704ed70d4fd1c6bd6342c436f1ede30d1cff4710 Date: 2023-04-12T09:16:52.732Z Electron: 19.1.11 Chromium: 102.0.5005.196 Node.js: 16.14.2 V8: 10.2.154.26-electron.0 OS: Linux x64 6.2.14-300.fc38.x86_64 Sandboxed: Yes
Version: 1.81.1 Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794 Date: 2023-08-09T22:18:39.991Z Electron: 22.3.18 ElectronBuildId: 22689846 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Linux x64 6.4.13-200.fc38.x86_64
Azure Account: v0.11.5 Azure CLI Tools: v0.5.0
The terminal process "/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.5/bin/node.sh '/proc/self/exe', '-e', 'require('/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.5/dist/cloudConsoleLauncher').main()', '--ms-enable-electron-run-as-node'" failed to launch (exit code: 1).
cmd:
$ /home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.5/bin/node.sh /usr/bin/node -e "console.log(require('/home/{user}/.vscode/extensions/ms-vscode.azure-account-0.11.5/dist/cloudConsoleLauncher'))"
result:
{ main: [Function: main] }
Has this issue been resolved yet - I am having exactly the same issue with Azure Account v0.11.6 on Ubuntu?
I did a dnf system-upgrade to Fedora 36 recent, but otherwise, the issue still exists.
Version: 1.85.2 Commit: 8b3775030ed1a69b13e4f4c628c612102e30a681 Date: 2024-01-18T06:40:19.222Z Electron: 25.9.7 ElectronBuildId: 26354273 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Linux x64 6.6.12-200.fc39.x86_64
Azure Account: v0.11.6 Azure CLI Tools: v0.6.0
Did a full reinstall/ wiped out all the hidden folders for VS code.
Reinstalled the Azure Tools and Azure CLI Tools Extensions.
Same as reported by others:
Version: 1.87.1 (Universal) Commit: 1e790d77f81672c49be070e04474901747115651 Date: 2024-03-06T00:23:16.418Z Electron: 27.3.2 ElectronBuildId: 26836302 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin x64 23.2.0
Azure Account: v0.11.6 Azure CLI Tools: v0.6.0
I'll just add that the same error happens in macOS as well, so... I'm guessing that, currently, the Azure Cloud Shell only works in Windows? Or has anyone been able to launch it in Linux or macOS?
I'll just add that the same error happens in macOS as well, so... I'm guessing that, currently, the Azure Cloud Shell only works in Windows? Or has anyone been able to launch it in Linux or macOS?
Failing for me with the error below in MacOS with latest versions of everything
The terminal process "/Users/barracoder/.vscode/extensions/ms-vscode.azure-account-0.11.6/bin/node.sh '/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)', '-e', 'require('/Users/barracoder/.vscode/extensions/ms-vscode.azure-account-0.11.6/dist/cloudConsoleLauncher').main()', '--ms-enable-electron-run-as-node'" failed to launch (exit code: 9).
Still the same issue:
The terminal process "/Users/mrumpf/.vscode/extensions/ms-vscode.azure-account-0.11.6/bin/node.sh '/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)', '-e', 'require('/Users/mrumpf/.vscode/extensions/ms-vscode.azure-account-0.11.6/dist/cloudConsoleLauncher').main()', '--ms-enable-electron-run-as-node'" failed to launch (exit code: 9).
When you run the command in the shell you can see that the option "--ms-enable-electron-run-as-node" is causing the return code 9:
/Users/mrumpf/.vscode/extensions/ms-vscode.azure-account-0.11.6/bin/node.sh "/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)" -e "require('/Users/mrumpf/.vscode/extensions/ms-vscode.azure-account-0.11.6/dist/cloudConsoleLauncher').main()" --ms-enable-electron-run-as-node
/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin):
bad option: --ms-enable-electron-run-as-node
When you run the command without the option you get:
/Users/mrumpf/.vscode/extensions/ms-vscode.azure-account-0.11.6/bin/node.sh "/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)" -e "require('/Users/mrump/.vscode/extensions/ms-vscode.azure-account-0.11.6/dist/cloudConsoleLauncher').main()"
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^
Error: connect ECONNREFUSED ::1:80
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
errno: -61,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '::1',
port: 80
}
Node.js v18.18.2
The issue is caused by the following if block at cloudConsole.ts#L291 The change was introduced here: #136987
A workaround is to modify the JavaScript file and change the version number 1.62.1
in the if statement to a value that will never be reached, avoiding that the flag will be passed to the cloudConsoleLauncher.js
file:
cd ~/.vscode/extensions/ms-vscode.azure-account-0.11.6/dist
vi extension.bundle.js
// search for "1.62.1"
// change the version to 10.62.1
// save the file :x
// restart vscode
After that change I was able to login to Azure cloud shell with the Azure Account extension:
Hi all, I have an updated extension VSIX that contains a fix for this issue. If some of you could try it out and confirm the fix for me, that'd be a huge help. Please provide system information in your replies.
azure-account-0.11.6-preview.vsix.zip
Steps to install extension development build:
- Download and unzip the VSIX
- From the command palette (
F1
orCommand/Ctrl + Shift + P
), run the "Extensions: Install from VSIX..." command. - Select the downloaded .VSIX file, then reload VS Code as prompted.
I tested the version from above and it worked after reloading VSCode. Thank you, looking forward to see a 0.11.7 release soon!