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.
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 wheneverstate != "IDLE"("this button means Cancel").installButtonText()only says Cancel for INSTALLING/BACKUPING.onInstallButtonClick()callscancel_installation(orcancel_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 callscancel_backup, which sets state CANCELLED and deletesimages/<state.Filename>, wherestate.Filenameis the file currently being downloaded or uploaded.pkill -f xz -9Used by both
cancelInstallationandcancelBackup, it matches any process whose command line contains "xz", including anything handling a*.img.xzfilename.Suggest: disable the button unless state is IDLE or the matching operation, and cancel by PID or process group, not by pattern.