Skip to content

404 when code-server is downloading a newer release #1746

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

Closed
keiththomps opened this issue May 29, 2020 · 26 comments
Closed

404 when code-server is downloading a newer release #1746

keiththomps opened this issue May 29, 2020 · 26 comments
Milestone

Comments

@keiththomps
Copy link

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
@hasip-timurtas
Copy link

The same for me

@liaocyintl-deprecated
Copy link

liaocyintl-deprecated commented Jun 2, 2020

The same for me +1

@nhooyr
Copy link
Contributor

nhooyr commented Jun 2, 2020

Should just work now!

@nhooyr
Copy link
Contributor

nhooyr commented Jun 2, 2020

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

Sorry about this!

@KolyaKorruptis
Copy link

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

@nhooyr
Copy link
Contributor

nhooyr commented Jun 2, 2020

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

@nhooyr
Copy link
Contributor

nhooyr commented Jun 2, 2020

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

@nhooyr
Copy link
Contributor

nhooyr commented Jun 2, 2020

Fixing.

@KolyaKorruptis
Copy link

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

@nhooyr
Copy link
Contributor

nhooyr commented Jun 2, 2020

Should be fixed as part of the install script fixes.

@nhooyr
Copy link
Contributor

nhooyr commented Jun 2, 2020

i.e literally just fixed a few seconds ago

nhooyr added a commit that referenced this issue Jun 2, 2020
@nhooyr
Copy link
Contributor

nhooyr commented Jun 2, 2020

****

macOS ungzipped it automatically. 🤦

@KolyaKorruptis
Copy link

Hehe. Thank you for your patience.

@nhooyr
Copy link
Contributor

nhooyr commented Jun 2, 2020

@KolyaKorruptis No thank you!

Please give it a shot now!

@KolyaKorruptis
Copy link

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
Copy link

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

@KolyaKorruptis
Copy link

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.

@nhooyr
Copy link
Contributor

nhooyr commented Jun 2, 2020

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
Copy link
Contributor

nhooyr commented Jun 2, 2020

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

@KolyaKorruptis
Copy link

I updated again from 3.2.0 and everything just worked flawlessly, presumably due to your fix for recursive symlinking. Thank you!

@nhooyr
Copy link
Contributor

nhooyr commented Jun 3, 2020

Glad its working for you!

Oddly enough though I haven't merged my change in and replaced the releases so I'm not sure why it started working for you.

@KolyaKorruptis
Copy link

Not sure then. I just replaced the symlink, as you suggested, but only after a successful update.

@nhooyr nhooyr added this to the v3.4.1 milestone Jun 4, 2020
@nhooyr nhooyr mentioned this issue Jun 4, 2020
@nhooyr
Copy link
Contributor

nhooyr commented Jun 4, 2020

New release is out!

@nhooyr nhooyr closed this as completed Jun 4, 2020
@HuJK
Copy link

HuJK commented Jul 19, 2020

It told me Do not use, scroll down to v3.4.1, what happen If I use it? Because I use a script to auto update code-server

curl -s https://api.github.com/repos/cdr/code-server/releases/latest \
| grep "browser_download_url.*linux-x86_64.tar.gz" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -i - -O code-server.tar.gz

and it seems work fine. Just curious will it cause any problem that idk if I use 3.4.1 instead of v3.4.1?

@nhooyr
Copy link
Contributor

nhooyr commented Jul 19, 2020

@HuJK Only the tags with v prefixed will be kept in future versions. There isn't anything that'll go wrong now but please don't rely on them to avoid breakage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants