Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: ENOENT: no such file or directory, rename #2927

Closed
govi2010 opened this issue May 19, 2018 · 10 comments
Closed

Error: ENOENT: no such file or directory, rename #2927

govi2010 opened this issue May 19, 2018 · 10 comments

Comments

@govi2010
Copy link

govi2010 commented May 19, 2018

Which version of electron-builder are you using?

  • 20.13.4:

Which version of electron-updater are you using ?

  • 2.21.10

What target are you building for?

  • Windows:

somehow file get deleted after renaming.
I am attaching my logs file

[2018-05-19 16:56:31.101] [info] Checking for update
[2018-05-19 16:56:32.534] [info] Generated new staging user ID: 7672894f-c36e-5a65-bb2b-518ac8acc279
[2018-05-19 16:56:33.870] [info] Found version 6.5.7 (url: giddh-app Setup 6.5.7.exe)
[2018-05-19 16:56:33.872] [info] Downloading update from giddh-app Setup 6.5.7.exe
[2018-05-19 16:56:33.882] [info] Downloading update from giddh-app Setup 6.5.7.exe
[2018-05-19 16:56:33.906] [info] No cached update available
[2018-05-19 16:56:33.906] [info] No cached update available
[2018-05-19 17:10:00.126] [info] New version 6.5.7 has been downloaded to C:\Users\govi2\AppData\Roaming\giddh-app\installer-6.5.7.exe
[2018-05-19 17:10:12.298] [error] Error: Error: ENOENT: no such file or directory, rename 'C:\Users\govi2\AppData\Roaming\giddh-app\temp-installer-6.5.7.exe' -> 'C:\Users\govi2\AppData\Roaming\giddh-app\installer-6.5.7.exe'
    at C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\src\BaseUpdater.ts:84:13
From previous event:
    at NsisUpdater.executeDownload (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\out\BaseUpdater.js:164:7)
    at C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:31:23
From previous event:
    at NsisUpdater.doDownloadUpdate (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\out\NsisUpdater.js:181:7)
    at C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:361:25
    at Generator.next (<anonymous>)
From previous event:
    at NsisUpdater.downloadUpdate (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\out\AppUpdater.js:539:7)
    at C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:337:49
From previous event:
    at NsisUpdater.doCheckForUpdates (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\out\AppUpdater.js:502:7)
    at C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:279:25
    at Generator.next (<anonymous>)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
From previous event:
    at NsisUpdater._checkForUpdates (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\out\AppUpdater.js:433:7)
    at NsisUpdater.checkForUpdates (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:217:35)
    at NsisUpdater.checkForUpdatesAndNotify (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:231:41)
    at new e (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\index.js:1:884)
    at e.openWindows (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\index.js:1:4917)
    at App.<anonymous> (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\index.js:1:2095)
    at emitTwo (events.js:131:20)
    at App.emit (events.js:214:7)
[2018-05-19 17:10:37.248] [info] Install on explicit quitAndInstall
[2018-05-19 17:10:37.251] [error] Error: Error: No valid update available, can't quit and install
    at C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\src\BaseUpdater.ts:112:26
    at Generator.next (<anonymous>)
    at Generator.tryCatcher (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\bluebird\js\release\util.js:16:23)
    at PromiseSpawn._promiseFulfilled (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\bluebird\js\release\generators.js:97:49)
    at C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\bluebird\js\release\generators.js:201:15
    at NsisUpdater.install (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\out\BaseUpdater.js:198:7)
    at C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\src\BaseUpdater.ts:17:36
    at Generator.next (<anonymous>)
    at Generator.tryCatcher (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\bluebird\js\release\util.js:16:23)
    at PromiseSpawn._promiseFulfilled (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\bluebird\js\release\generators.js:97:49)
    at C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\bluebird\js\release\generators.js:201:15
    at NsisUpdater.quitAndInstall (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\node_modules\electron-updater\out\BaseUpdater.js:86:7)
    at App.<anonymous> (C:\Users\govi2\AppData\Local\Programs\giddh-app\resources\app.asar\index.js:1:4165)
    at emitOne (events.js:116:13)
    at App.emit (events.js:211:7)

@govi2010
Copy link
Author

Is anyone maintaining this project? because I have not heard anything from anyone ?
I am ready to contribute if there is something need to be fixed.

@govi2010
Copy link
Author

@develar can you guide me on this issue , So we can get this fixed if that is bug ?

@develar
Copy link
Member

develar commented Jul 27, 2018

electron-updater 3.4.0

@ronsc
Copy link

ronsc commented Sep 13, 2018

@govi2010 @develar How to fixed this issue ? Thx.

@theotherdon
Copy link

@ronsc I'm encountering a similar error and trying to figure out how to fix it. I saw that there was another error before this one that appears to be related to this. The solution doesn't seem applicable to me as I'm not using nuts, but maybe it will help you out.

@ronsc
Copy link

ronsc commented Oct 30, 2018

@DoNalD-S Thx for advised.

@NisStrom
Copy link

This issue still exists with electron-updater 4.3.4.
I see in the AppData Folder, that it had downloaded the exe correctly and renamed it correctly. Running it a second time it works just fine, the difference then, 2 exes are created like this:

  • 0-temp-....
    -temp-....

I do not see a n electron-updater 3.4.0 release nor do I see in the changelog that this issue has been fixed.

We are running angular on electron we are implementing our own httpExecutor, because we cannot make use of electronHttpExecutor. Therefore the DifferentialDownloader does not work correctly, but that should not be a problem. It correctly logs the following error:
NsisUpdater.js:315 Cannot download differentially, fallback to full download.

I do not think this might be the causing issue, since the error happens with EXE which is so small, that it does not need to be downloaded differential.

@NisStrom
Copy link

Found the issue:

The error happens if autoUpdater.autoDownlad is true (which is default). It downloads the exe already on checkForUpdate and renames it then. It however does not download the package.7z. Hence, we still need to call autoUpdater.downloadUpdate(). This then tries t rename the exe again but it has already been done before.

It seems autoDownload is for NSIS only, if usins NSIS-Web autoDownload has to be false.

@LeonardoRick
Copy link

@NisStrom can you show us how to disable it?

@kylefoo
Copy link

kylefoo commented Sep 22, 2021

@NisStrom can you show us how to disable it?

autoUpdater.autoDownload = false;
should do it

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

No branches or pull requests

7 participants