electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.71k stars 1.74k forks source link

Linux AppImage update unable to move downloaded file #8698

Open flexopticalHenno opened 3 days ago

flexopticalHenno commented 3 days ago

Building the app works fine, but when the app finds an update, it downloads it to the cache folder, removes the old AppImage and then fails to move the downloaded file to the original AppImage location. The error states (translated) "mv: Executing stat not possible for '/home/username/.cache/app-name-updater/pending/APP Name.1.2.3-latest.4.AppImage': File not found". Copying the failed command into a terminal moves that file successfully.

Stack trace includes AppImageUpdater.doInstall in AppImageUpdater:88:42 and AppImageUpdater.install in BaseUpdater.js:61:25 and AppImageUpdater.quitAndInstall in BaseUpdater.js:15:34

The app name contains spaces, so the issue may be related to the fix that was introduced in https://github.com/electron-userland/electron-builder/commit/1c14820b97fad802b300dd93ccd4d6a10a72360f

The update was still working with electron-builder 25.0.3 and electron-updater 6.3.2. Tested on Ubuntu 24.04 and Debian 12 VMs.

beyondkmp commented 1 day ago

This should be caused by https://github.com/electron-userland/electron-builder/blob/6a6bed46c428b45105ada071a9cb89b5d4f93d9e/packages/electron-updater/src/AppImageUpdater.ts#L96