Auto-update fails with ENOENT: no such file or directory, rename
See original GitHub issue-
Version: electron-builder@20.38.3 electron-updater@4.0.6
-
Target: macOS 10.14.2
We’re seeing an error after the update is downloaded. This error is different from others open issues because it’s on rename, not chmod.
Error: ENOENT: no such file or directory, rename '/Users/username/Library/Application Support/Caches/tesla-updater/pending/temp-Command E-1.2.22-mac.zip' -> '/Users/username/Library/Application Support/Caches/tesla-updater/pending/Command E-1.2.22-mac.zip'
Our flow: The user hits a keyboard shortcut, we run autoUpdater.checkForUpdates();
. Note: the user may hit they keyboard shortcut a lot of times (triggering parallel downloads?) The download starts. The download finishes, and we call autoUpdater.quitAndInstall();
:
autoUpdater.on('update-downloaded', (updateInfo) => {
log.info(`autoUpdater - Version ${updateInfo.version} downloaded, notify, quitting, installing, and relaunching`);
const notification = new Notification({
title: `Restarting Command E`,
body: `Updating to version ${updateInfo.version}`,
});
notification.show();
setTimeout(() => {
log.info(`autoUpdater - Quitting and installing now`);
autoUpdater.quitAndInstall();
}, 3000);
});
Here’s the full error:
Any ideas? Thanks for the work you put into this amazing library.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:8 (2 by maintainers)
Top Results From Across the Web
NPM: ENOENT: no such file or directory, rename
When I got this error I looked for all running instances of node in my task manager (i use process explorer ...
Read more >How to fix: npm ERR! enoent ENOENT: no such file or ...
I recently struggled for a while with an npm error thrown when executing npm install of some package. The error message was npm...
Read more >Cordova force update on stuck clients due hash mismatch
... [autoupdate] Download failure: failed at injecting isDesktop and writing to disk: ENOENT: no such file or directory, ...
Read more >Auto Update - electron-builder
Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload...
Read more >VSTS Hosted agent (Windows) automatic agent update ...
How can I revert this change and prevent such automatic-updates going forward, ... ":"Failed find: ENOENT: no such file or directory, stat 'D:\\a\\1\\s\\CM....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
when you use both
autoUpdater.autoDownload = true;
andin same code, both code tries to dowload the updates. Hence, a conflict arises when trying to install and quit the app.
I am having this same issue in my application on both Windows and Linux as well.
Error: ENOENT: no such file or directory, chmod ‘/home/thefeeltrain/.cache/soonlauncher-updater/pending/temp-soonlauncher-4.4.1.AppImage’
This is also a copy of #3526