Closed r-barton closed 1 week ago
Checked it out. It downloads, but the file is apparently already deleted when the updater tries to remove the old version, causing the new version to not be moved. The new version actually exists fully downloaded in ~/.cache , but this failure causes no move.
@pierremtb could you investigate this
That particular error window appears when you exit the application after this failure (already mentioned by Ryan)
@lf94 Thanks! I'll have a deeper look tonight. I was able to reproduce, some console logs
Install: isSilent: true, isForceRunAfter: false
Error: Error: ENOENT: no such file or directory, unlink '/Users/pierremtb/Downloads/Zoo.Modeling.App-0.26.3-arm64-linux.AppImage'
at unlinkSync (node:fs:1884:11)
at AppImageUpdater.doInstall (/tmp/.mount_Zoo.Mo50mn43/resources/app.asar/node_modules/electron-updater/out/AppImageUpdater.js:76:29)
at AppImageUpdater.install (/tmp/.mount_Zoo.Mo50mn43/resources/app.asar/node_modules/electron-updater/out/BaseUpdater.js:61:25)
at /tmp/.mount_Zoo.Mo50mn43/resources/app.asar/node_modules/electron-updater/out/BaseUpdater.js:92:18
at App.<anonymous> (/tmp/.mount_Zoo.Mo50mn43/resources/app.asar/node_modules/electron-updater/out/ElectronAppAdapter.js:38:48)
at Object.onceWrapper (node:events:634:26)
at App.emit (node:events:531:35)
updater-error Error: ENOENT: no such file or directory, unlink '/Users/pierremtb/Downloads/Zoo.Modeling.App-0.26.3-arm64-linux.AppImage'
at unlinkSync (node:fs:1884:11)
at AppImageUpdater.doInstall (/tmp/.mount_Zoo.Mo50mn43/resources/app.asar/node_modules/electron-updater/out/AppImageUpdater.js:76:29)
at AppImageUpdater.install (/tmp/.mount_Zoo.Mo50mn43/resources/app.asar/node_modules/electron-updater/out/BaseUpdater.js:61:25)
at /tmp/.mount_Zoo.Mo50mn43/resources/app.asar/node_modules/electron-updater/out/BaseUpdater.js:92:18
at App.<anonymous> (/tmp/.mount_Zoo.Mo50mn43/resources/app.asar/node_modules/electron-updater/out/ElectronAppAdapter.js:38:48)
at Object.onceWrapper (node:events:634:26)
at App.emit (node:events:531:35) {
errno: -2,
code: 'ENOENT',
syscall: 'unlink',
path: '/Users/pierremtb/Downloads/Zoo.Modeling.App-0.26.3-arm64-linux.AppImage'
}
Also noticed that Ubuntu 24.04 is messing with appimages a bit too, had to run this https://github.com/electron/electron/issues/42510#issuecomment-2171583086
This is the line that fails https://github.com/electron-userland/electron-builder/blob/master/packages/electron-updater/src/AppImageUpdater.ts#L96
Note that running the exact command provided in the error output in a separate terminal works. Ran a watch command to check that .cache folder for any weirdo file name change but didn't see anything strange. Still unsure what's going on. Will dive in more today.
Side note: we have pretty much zero instructions from the download page for Linux, and after trying it out on a few different Ubuntu systems it's pretty annoying to have to copy paste this list of packages I ended up noting down somewhere. We should at least provide this list, but really find a better way to have it auto install. Will create separate issue for this.
sudo apt install zlib1g-dev libfuse2 libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libgtk-3-0 libgbm-dev libasound2 xdg-utils
Renaming the initial app image to something like ZMA.AppImage
doesn't change anything, still the same error. Was making sure because this is a different code path in the electron-updater code https://github.com/electron-userland/electron-builder/blob/6a6bed46c428b45105ada071a9cb89b5d4f93d9e/packages/electron-updater/src/AppImageUpdater.ts#L89
This is starting to make me go crazy. Stat-ing the file at the same time shows it exists and doesn't change. But mv somehow fails on stat
I was starting to wonder if we ever had the updater working on Linux AppImages (I know I never tested it personally, as we went from tauri to electron the only requirement was to keep the previous platforms Windows and macOS to migrate and keep updating to electron builds. But I knew you had tested it at some point @lf94)
Started to go back in time, updater tests on the Release PRs for 0.26.5, 0.26.4 fail in the same way, but 0.26.0 was working. So we had it working at some point post migration. I'll keep testing to pinpoint which release and find a way to bisect on commits after that.
The updater-test showed the issue on Cut Release 0.26.3, but not on Cut Release 0.26.2. Finally something to work with
Wellllll that's one bit in https://github.com/KittyCAD/modeling-app/compare/v0.26.2...v0.26.3 that is definitely smoking
Reverting that change at https://github.com/KittyCAD/modeling-app/pull/4501/commits/2f708d535d32dcb9ae1d62f74428117d8ca26e28, let's see what the updater-test bundles say once built
Describe the bug
When attempting to upgrade the modeling app on linux, I end up receiving an error
Steps to Reproduce
Expected Behavior
I've only noticed this happening with v0.26.3 to v0.26.4 version change, but would expect the same behavior with previous linux versions
Screenshots and Recordings
No response
Desktop OS
Ubuntu 22.04 LTS
Browser
Chrome
Version
v0.26.3 -> v0.26.4
Additional Context
No response