Skip to content
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

auto_update fails on deserializing release step #11114

Closed
1 task done
Eiji7 opened this issue Apr 27, 2024 · 1 comment
Closed
1 task done

auto_update fails on deserializing release step #11114

Eiji7 opened this issue Apr 27, 2024 · 1 comment
Labels
defect [core label] discoverability Feedback for discoverability of features, settings, etc installer / updater Feedback for installation and update process linux

Comments

@Eiji7
Copy link

Eiji7 commented Apr 27, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

The problem is most probably clear for devs, but the error message is "cryptic" for people trying to compile and run Zed.

[2024-04-28T01:13:33+03:00 ERROR auto_update] auto-update failed: error:error deserializing release

Caused by:
    expected value at line 1 column 1

Firstly I started to think that there is a bug in the code or the response is empty, but after I have found the source of problem it's obvious that some code has been called when it was not expected. It should be fixed (not soon I guess) or it should fail much sooner with a proper message.

The error happens in async fn update(this: Model<Self>, mut cx: AsyncAppContext) -> Result<()> which is located in src/auto_update.rs file in auto_update crate.

The following request is called: https://zed.dev/api/releases/latest?asset=Zed.dmg&os=linux&arch=x86_64

The API responds with 400 error and Failed to find a matching asset for os 'linux' and architecture 'x86_64' message.

To make sure that people would not be confused now and in the future (other platforms) there needs to be some kind of if condition on OS, so the code returns early with a proper message that specific feature is temporary not supported for specific OS/arch.

Some notes on auto-updating on Linux:

  1. I guess that by default it should be disabled as this would most probably be handled by package managers anyway
  2. It should be also disabled by default when compiling from source as the update in such case is as simple as git pull and same cargo run --release call
  3. The auto-update feature may be considered in cases like AppImage support
  4. In case you are interested I have created an issue describing how to create and maintain Gentoo ebuild repository: Official Gentoo repository z411/trackma#720

Environment

Zed: v1.0.0 (Zed Dev d2569af)
OS: Linux 1.0.0
Memory: 62.5 GiB
Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

@Eiji7 Eiji7 added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels Apr 27, 2024
@Moshyfawn Moshyfawn added discoverability Feedback for discoverability of features, settings, etc installer / updater Feedback for installation and update process linux and removed triage Maintainer needs to classify the issue labels Apr 29, 2024
@JosephTLyons JosephTLyons removed the admin read Pending admin review label Apr 30, 2024
@jirutka
Copy link

jirutka commented Jun 2, 2024

I’m packaging Zed for Alpine Linux and just ran into the same problem.

I guess that by default it should be disabled as this would most probably be handled by package managers anyway

I totally agree; I‘m about to create a separate issue for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] discoverability Feedback for discoverability of features, settings, etc installer / updater Feedback for installation and update process linux
Projects
None yet
Development

No branches or pull requests

5 participants