fix(updater): macOS in-place update can quit the app and leave a broken bundle
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Start with buildMacAppReplaceScript in lib/core/updater/installers/update_install_utils.dart and MacosSparkleInstaller.install; trace how the script is launched and how failures are reported on the next start. Add tests for script quoting and failure paths, as the issue requests. Done means pre-flight checks, rollback and cleanup work, and failures are reported without leaving the app unavailable.
Written by the indexing model from the issue text.
Description
Problem
buildMacAppReplaceScript (lib/core/updater/installers/update_install_utils.dart) and MacosSparkleInstaller.install can quit the app without installing anything, or corrupt the bundle.
mv "$TARGET" "$TARGET.old" || trueswallows failures. When the move fails (no write access to/Applications, read-only DMG volume, App Translocation after running from Downloads),cp -R "$NEW" "$TARGET"copies into the existing bundle: a nested.app, a broken seal, "damaged" from Gatekeeper.- With
set -e, a failingcpafter a successfulmvaborts the script and leaves no app at$TARGET. There is no rollback from.old. MacosSparkleInstallercallsexit(0)right after starting the script and never checks its result, so the user just sees the app close.$TARGET.oldis not removed on success; the extractedquerya-update-*temp directory is never cleaned.
Expected
Check before exiting that the target's parent is writable and the bundle is not translocated / on a read-only volume; if not, tell the user (and offer the download). Replace atomically with rollback from .old, remove .old on success, clean the temp dir, and report a script failure on next start.
Tasks
- Pre-flight writable / translocation / read-only check before
exit(0). - Remove
|| true, add rollback, remove.old. - Clean the extract dir.
- Unit tests for the script builder (quoting, failure paths).
- Dominant language
- Dart
- Stars
- 23
- Forks
- 1
- Avg merge
- 45m
- Merged PRs (30d)
- 529
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QueryaHub/Querya-Desktop
-
bug P3 ux
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
QueryaHub/Querya-Desktop#1837 ·
Maintainers usually reply within 1 day
-
bug mysql P3
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
QueryaHub/Querya-Desktop#1823 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QueryaHub/Querya-Desktop#1777 ·
Maintainers usually reply within 1 day
-
enhancement ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
QueryaHub/Querya-Desktop#1689 ·
Maintainers usually reply within 1 day
-
ui(dialogs): make destructive query and DML preview dialogs adaptive and prevent table name overflowOpenbug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
QueryaHub/Querya-Desktop#1642 ·
Maintainers usually reply within 1 day
All issues in QueryaHub/Querya-Desktop
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
fossasia/badgemagic-app#2016 ·
Maintainers usually reply within 1 day
-
direct-code
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aaronified/fluenough#849 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PATILYASHH/XPENC#179 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
AppFlowy-IO/AppFlowy#9094 ·