microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.55k stars 263 forks source link

VSCode Server v1.84.2 not found for Windows 11 ARM64 #9204

Closed qt-kaneko closed 7 months ago

qt-kaneko commented 7 months ago

[01:34:43.169] Server download failed [01:34:43.170] Terminating local server [01:34:43.177] Resolver error: Error: Downloading VS Code Server failed. Please try again later.



Steps to Reproduce:

1. Connect to remote SSH from VSCode.
2. Oh, here it is.

<!-- Check to see if the problem is general, with a specific extension, or only happens when remote -->
Does this issue occur when you try this locally?: Not checked
Does this issue occur when you try this locally and all extensions are disabled?: Not checked
<!-- If your issue only appears in Codespaces, please visit: https://github.com/github/feedback/discussions/categories/codespaces-feedback -->

P.S.
- Also tried to download it manually, [1a5daa3a0231a0fbba4f14db7ec463cf99d7768e](https://update.code.visualstudio.com/1a5daa3a0231a0fbba4f14db7ec463cf99d7768e/server-win32/stable) really does not exists.
- Also tried to use latest available version (f1b07bd25dfad64b0167beb15359ae573aecd2cc), then it errors version mismatch.
5he1n commented 7 months ago

Bump Moreover, as for me, only Remote-Tunnel works for Windows on ARM host

5he1n commented 7 months ago

I have (I assume) same env and found a working workaround.

Local host - MacOS on M1 Remote host - Windows on ARM in Parallels

Inside Windows on ARM:

  1. install VSCode
  2. install Remote-SSH
  3. open as SSH-connection to 127.0.0.1.

It does correctly install vscode-server

Switch to MacOS:

"remote.SSH.useLocalServer": false
"remote.SSH.localServerDownload": "off"

Connect to Windows host through Remote-SSH. In logs:

Looking for existing server in C:\Users\shein\.vscode-server\bin\1a5daa3a0231a0fbba4f14db7ec463cf99d7768e
Found installed server
qt-kaneko commented 7 months ago

I have (I assume) same env and found a working workaround.

Local host - MacOS on M1 Remote host - Windows on ARM in Parallels

Inside Windows on ARM:

1. install VSCode

2. install Remote-SSH

3. open as SSH-connection to 127.0.0.1.

It does correctly install vscode-server

Switch to MacOS:

"remote.SSH.useLocalServer": false
"remote.SSH.localServerDownload": "off"

Connect to Windows host through Remote-SSH. In logs:

Looking for existing server in C:\Users\shein\.vscode-server\bin\1a5daa3a0231a0fbba4f14db7ec463cf99d7768e
Found installed server

Nope, I still receive 404 :( Edit: Maybe You have installed x86 version? Its performance was really bad for me. Edit 2: VSCode server that Tunnel downloads is also x86 😐

davidkhess commented 7 months ago

Same problem here. Seems that the spec of arch ia32 (32bit x86?) is nonsensical and may be the root of the problem.

5he1n commented 7 months ago

Seems that the spec of arch ia32 is nonsensical

Can confirm that also spotted it in my logs and was confused. So may be

davidkhess commented 7 months ago

Well, this is in the PowerShell script the extension is trying to run:

$p=$env:PROCESSOR_ARCHITECTURE
$arch=if (($p -eq 'AMD64') -or ($p -eq 'IA64')) { 'x64' } else { 'ia32' }                                         

That ain't gonna work when the processor architecture is ARM64.

5he1n commented 7 months ago

Later today will try to reproduce the thing that connecting Win x64 to Win arm 64 somehow works. (As for me)

Maybe it’s really downloading x64 server as @qt-kaneko suggested

5he1n commented 7 months ago

The interesting thing is that I had my VSCode server working some time ago when connecting from MacOS to Windows arm. Then update came and error 404 appeared.

3 days ago I was trying to find if someone have the same issue and found this thread. For some reason I decided to try connecting from Windows arm64 in Parallels to the same Windows arm64 and it downloaded working one.

Literally right now I moved .vscode-server to .vscode-server-backup and tried to connect the same way. And here we go, 404.

Seems like there is some difference between first-time connection with download and later-on connections with downloads.

davidkhess commented 7 months ago

Well, this is interesting. If I go back and check the architecture of older versions of vscode-server downloaded previously that are still on the box, it turns out that they are indeed x86 (i.e. ia32). So, my best guess is that the extension has been downloading the wrong one all of this time but Windows ARM has just been translating the x86 architecture on the fly and things worked anyway.

My guess is that for some reason at the moment, the x86 build of vscode server is not available for download in the usual spot.

I worked around this by patching the Remote SSH extension:

  1. I'm on a Mac, but it should be easily translatable to other host OSs:
  2. Go to the Remote SSH extension folder: ~/.vscode/extensions/ms-vscode-remote.remote-ssh-0.107.0 (in my case)
  3. Edit out/extension.js
  4. Change this area:
\n$arch = ${S?"'ia32'":"if (($p -eq 'AMD64') -or ($p -eq 'IA64')) { 'x64' } else { 'ia32' }"}\n

To this:

\n$arch = 'x64'\n
  1. Restart VS Code
  2. Reconnect to your host. It will attempt the x64 architecture which downloaded successfully for me.
5he1n commented 7 months ago

Can confirm, the working server I have installed is x64 indeed:

C:\Users\5he1n\.vscode-server\bin\1a5daa3a0231a0fbba4f14db7ec463cf99d7768e> .\node.exe -p "process.arch"
x64

The workaround is working too

davidkhess commented 7 months ago

@bamurtaugh re: your tagging and assignment – I think the lack of a x86 build is indeed a Code Server build / deployment issue, but the fact that the Remote SSH extension is looking for x86 instead of using x64 on arm64 is a bug in the extension itself.

Just my $0.02.

qt-kaneko commented 7 months ago

So will we finally have aarch64 build of code-server? VSCode supports ARM64 on Windows 11 as I see...

davidkhess commented 7 months ago

I poked around the code server download URLs and tried to see if there was an arm64 archive there - no luck.

Native ARM64 would be a nice improvement.

5he1n commented 7 months ago

As for me, using x64 server on arm is good enough in term of performance etc., but as atm there is a bug with installing even x64 server... Looking forward to have native vscode-server-aarch64 as VSCode itself has capability to be launched on arm machines

connor4312 commented 7 months ago

Duplicates https://github.com/microsoft/vscode-remote-release/issues/9179, should already be fixed in the ssh prerelease version

qt-kaneko commented 7 months ago

@connor4312, Is there any info when ARM64 version will be released (if it will)? (as I see, prerelease version installs x64)

connor4312 commented 7 months ago

Previously, before Node 20, Node.js didn't have official arm64 Windows builds. However, they do now. We'll bring this up in planning for our next iteration πŸ™‚