Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

fix(updater): macOS in-place update can quit the app and leave a broken bundle

Đang mở
#1,587 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
52/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
dart
Lĩnh vực
desktop, release

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug P1 stability

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" || true swallows 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 failing cp after a successful mv aborts the script and leaves no app at $TARGET. There is no rollback from .old.
  • MacosSparkleInstaller calls exit(0) right after starting the script and never checks its result, so the user just sees the app close.
  • $TARGET.old is not removed on success; the extracted querya-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).
Ngôn ngữ chính
Dart
Star
23
Fork
1
Merge trung bình
32 phút
Pull request đã merge (30 ngày)
537

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của QueryaHub/Querya-Desktop

Tất cả issue của QueryaHub/Querya-Desktop

Issue tương tự

Thêm issue về Dart

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.