Repository navigation
Check GitHub Releases for updates on Linux instead of the missing static manifest (#1216) - #1222
Open
alandebortolo wants to merge 1 commit into
Open
alandebortolo wants to merge 1 commit into
alandebortolo wants to merge 1 commit into
Conversation
Help > Check for Update always failed on Linux with HTTP 404: no static manifest is published under /upgrade/orca/linux/, and both version parsers accept only win/mac payloads, so a manifest alone would not help (Snapmaker#1216). On Linux the static fallback now reads the latest stable GitHub release and feeds the existing update dialog; Download opens the release page. An explicit orca_upgrade_url override is still honoured. Windows and macOS compile the same code as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1216.
What happens
On Linux, Help > Check for Update always ends in the dialog
request to server update soft fail with body:,error:,status:404, and the same request fails quietly at every start.request_version_from_config()postsappName: snapmaker-orcaon Linux. The config service has no such app (code 604000 in the issue), so the app falls back tocheck_new_version_sf().check_new_version_sf()asks for/upgrade/orca/linux/<lang>/version.json. Checked today:https://meta-cfg.snapmaker.com/upgrade/orca/win/en/version.jsonhttps://meta-cfg.snapmaker.com/upgrade/orca/mac/en/version.jsonhttps://meta-cfg.snapmaker.com/upgrade/orca/linux/en/version.jsonhttps://meta-cfg.snapmaker.com/upgrade/orca/linux/zh_CN/version.jsonplatform_typewinormac. For anything elsecheck_new_version_sf()logsdon't support linux upgradeand returns without showing a dialog, andrequest_version_from_config()rejects the payload (platform_type mismatch for this build, orunsupported platform_type). So with a manifest in place the menu item would do nothing at all on Linux.Change
On Linux,
check_new_version_sf()readshttps://api.github.com/repos/Snapmaker/OrcaSlicer/releases/latestinstead of the static manifest. The Linux builds (AppImage and both flatpaks) are already published there with every release, and that endpoint never returns a draft or a pre-release, which matches the stable-only rule of the manifest path.wxLaunchDefaultBrowser).orca_upgrade_urlset in the config: the override is still used, and a manifest-shaped answer still goes to the existing parser.The dialog shows the release title instead of the release notes. The notes on GitHub are Markdown with image links and the dialog renders plain text; the full notes are one click away on the release page.
Everything is inside
#if defined(__linux__). Windows and macOS compile exactly the same code as before. One file, 45 lines added, none changed.Tested
I did not build the app. I extracted the new block from the patched
GUI_App.cppas is and compiled it against the repo's ownnlohmann/json.hpp,Semver.hppandsemver.c, withget_version()copied from the same file and only the wx pieces stubbed. Inputs: the real answer of the GitHub endpoint saved today (latest isv2.4.1) and the real Windows manifest.2.4.1, URLhttps://github.com/Snapmaker/OrcaSlicer/releases/tag/v2.4.1, flagged as user-initiatedtag_namenull,tag_name"nightly", nohtml_url,html_urlnullnameandbodynullTo see the checks fail, I broke the block four ways (keep the leading
v,>=to>, drop the URL check, drop the version check). Each one failed an assertion; the unmodified block passes all 14 cases.The endpoint answers 200 to the user agent the app sends (
Snapmaker_Orca/<version>), without a token.Not tested
Httpclass (TLS, proxy). Onlycurlwith the same user agent.If you would rather keep Linux on your own servers, the alternative is a Linux manifest plus a
linuxbranch in both parsers. I can change the PR to that if you tell me what the manifest would contain for Linux (there is one file per platform today, and Linux has three).