Skip to content

Install/Backup button sends a cancel while a download or upload is running #156

Description

@eliasbakken

Found by reading the code while testing v1.1.0-RC8-2-g23a2bb6. Not reproduced on a board.

Install/Backup button fires a cancel during a download or upload

In App.vue:

  • isInstallButtonDisabled() returns false whenever state != "IDLE" ("this button means Cancel").
  • installButtonText() only says Cancel for INSTALLING/BACKUPING.
  • onInstallButtonClick() calls cancel_installation (or cancel_backup) for any non-IDLE state.

During DOWNLOADING/UPLOADING, with an image already selected (seen live: Install stayed enabled while an upload ran), the button reads Install, is enabled, and clicking it sends cancel_installation = pkill -f xz -9. With nothing to kill, that returns exit 1 and shows an error toast. In backup mode it calls cancel_backup, which sets state CANCELLED and deletes images/<state.Filename>, where state.Filename is the file currently being downloaded or uploaded.

pkill -f xz -9

Used by both cancelInstallation and cancelBackup, it matches any process whose command line contains "xz", including anything handling a *.img.xz filename.

Suggest: disable the button unless state is IDLE or the matching operation, and cancel by PID or process group, not by pattern.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions