code-server icon indicating copy to clipboard operation
code-server copied to clipboard

404 when code-server is downloading a newer release

Open keiththomps opened this issue 6 years ago • 26 comments

When prompted to install a new version through the UI I'm receiving a 404 error downloading the newest release. It appears to be caused by the versions 3.30 and later being tagged with a v3.3.0 but the associated release file name doesn't include the v.

Here's the URL being used to download the newest release vs the newest release's actual URL:

Attempted (404 error): https://github.com/cdr/code-server/releases/download/v3.4.0/code-server-v3.4.0-linux-x86_64.tar.gz Actual: https://github.com/cdr/code-server/releases/download/v3.4.0/code-server-3.4.0-linux-x86_64.tar.gz

This could be "fixed" in the code here, but it might just be a consistency issue that can be addressed moving forward by adjusting the tag names and files to match.

  • Web Browser: Chrome
  • Local OS: macOS 10.15.4
  • Remote OS: CentOS 7.8.2003
  • Remote Architecture: x86_64
  • code-server --version: 3.2.0

keiththomps avatar May 29 '20 13:05 keiththomps

The same for me

hasip-timurtas avatar Jun 01 '20 18:06 hasip-timurtas

The same for me +1

liaocyintl-deprecated avatar Jun 02 '20 11:06 liaocyintl-deprecated

Should just work now!

nhooyr avatar Jun 02 '20 20:06 nhooyr

Published https://github.com/cdr/code-server/releases/tag/3.4.0

Sorry about this!

nhooyr avatar Jun 02 '20 20:06 nhooyr

I think this is a misunderstanding. The URL requested by code-server has a "v" before the version number, inside the file name. And that's what we need to update. A filename with "v3..4.0" in it.
Removing the "v" from the tag won't help unfortunately.

When this is fixed, these URLs should work: https://github.com/cdr/code-server/releases/download/v3.4.0/code-server-v3.4.0-linux-x86_64.tar.gz https://github.com/cdr/code-server/releases/download/v3.4.0/code-server-v3.4.0-linux-arm64.tar.gz

KolyaKorruptis avatar Jun 02 '20 21:06 KolyaKorruptis

It has a v because it’s filling the latest release tag into the template. With the v removed it should just work.

nhooyr avatar Jun 02 '20 21:06 nhooyr

Argh this is going to break the install script though. 🤦🏻‍♂️

nhooyr avatar Jun 02 '20 21:06 nhooyr

Fixing.

nhooyr avatar Jun 02 '20 21:06 nhooyr

In any case, it didn't find an arm64 release. 20200602_232548 20200602_232618

KolyaKorruptis avatar Jun 02 '20 21:06 KolyaKorruptis

Should be fixed as part of the install script fixes.

nhooyr avatar Jun 02 '20 21:06 nhooyr

i.e literally just fixed a few seconds ago

nhooyr avatar Jun 02 '20 21:06 nhooyr

It's still failing here. Requested URL: https://github.com/cdr/code-server/releases/download/3.4.0/code-server-3.4.0-linux-arm64.tar.gz Actual URL: https://github.com/cdr/code-server/releases/download/3.4.0/code-server-3.4.0-linux-arm64.tar

So close!

KolyaKorruptis avatar Jun 02 '20 21:06 KolyaKorruptis

****

macOS ungzipped it automatically. 🤦

nhooyr avatar Jun 02 '20 21:06 nhooyr

Hehe. Thank you for your patience.

KolyaKorruptis avatar Jun 02 '20 21:06 KolyaKorruptis

@KolyaKorruptis No thank you!

Please give it a shot now!

nhooyr avatar Jun 02 '20 21:06 nhooyr

I'm on it. It prompted for the update, I accepted and waited a while, then got a message "Failed to fetch". Same on the second try.

Then VSCode said it lost the connection. When I closed it and tried to run it again, it wouldn't start anymore. /bin/code-server: 25: exec: /usr/lib/code-server/../lib/node: not found Screenshot_20200603-000023_Termux

Maybe it's my weird setup. I'm on Ubuntu which runs inside Termux Proot on a Smartphone. At the end of the screenshot you can see the files in the code-server dir.

KolyaKorruptis avatar Jun 02 '20 22:06 KolyaKorruptis

It seems to have gotten the download anyway. But the installation went sideways somehow.

KolyaKorruptis avatar Jun 02 '20 22:06 KolyaKorruptis

I installed 3.4.0 manually and got the same error. Then I manually installed 3.3.1 and got the same error. Then I reverted to 3.2.0 which worked. I guess this is one of the breaking changes in v3.3.0 that I'm running into.

KolyaKorruptis avatar Jun 02 '20 22:06 KolyaKorruptis

Ahh I see. The problem is you're symlinking to the symlink. If you change your symlink in /bin/code-server to point to /usr/lib/code-server/bin/code-server it'll work.

nhooyr avatar Jun 02 '20 23:06 nhooyr

I'll be sure to fix recursive symlinks in the entry script in the next release.

nhooyr avatar Jun 02 '20 23:06 nhooyr