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.62k stars 1.74k forks source link

Cannot download differentially: __installer.exe missing #3364

Closed jamesjessian closed 5 years ago

jamesjessian commented 6 years ago

Hi, I'm attempting to use electron-updater for the first time (previously used Squirrel for windows) but I am getting an error in the logs when it is attempting to "download differentially". I am using an S3 bucket. The error is:

[2018-10-04 16:09:24.332] [error] Cannot download differentially, fallback to full download: Error: ENOENT: no such file or directory, open 'C:\Users\James\AppData\Roaming\my-app\__installer.exe'
    at C:\Users\James\AppData\Local\Programs\my-app\resources\app.asar\node_modules\electron-updater\src\differentialDownloader\DifferentialDownloader.ts:119:29
    at Generator.next (<anonymous>)
From previous event:
    at GenericDifferentialDownloader.doDownloadFile (C:\Users\James\AppData\Local\Programs\my-app\resources\app.asar\node_modules\electron-updater\src\differentialDownloader\DifferentialDownloader.ts:118:82)
    at GenericDifferentialDownloader.downloadFile (C:\Users\James\AppData\Local\Programs\my-app\resources\app.asar\node_modules\electron-updater\src\differentialDownloader\DifferentialDownloader.ts:92:17)
    at GenericDifferentialDownloader.doDownload (C:\Users\James\AppData\Local\Programs\my-app\resources\app.asar\node_modules\electron-updater\src\differentialDownloader\DifferentialDownloader.ts:79:17)
    at C:\Users\James\AppData\Local\Programs\my-app\resources\app.asar\node_modules\electron-updater\src\differentialDownloader\GenericDifferentialDownloader.ts:6:16
    at Generator.next (<anonymous>)

It appears to be looking for the latest installer as __installer.exe which does not exist in my AppData\Roaming\my-app\ folder.... but there is a MyApp Setup 0.0.5.exe in the AppData\Roaming\my-app\__update__\ directory... perhaps it should be looking there instead?

It does successfully download the full version for update, but obviously the delta update would be better.

Thanks for advice.

mpfau commented 6 years ago

same problem over here

ddio commented 5 years ago

Hi @bishbashbosh123 , do you use different name in package.json name and build.productName?

I also got this issue because installer.exe is put into other directory when using different name. #3375 also report similar issue. installer.exe is put in build.productName directory, but differential downloader is looking for name directory.

artemv commented 5 years ago

@ddio as for me I've tried to use the same name in electron-buildr.json' productName and package.json' name - same issue. But in my case the name is a scoped NPM package like @my-scope/my-package.

zhaoterryy commented 5 years ago

Does this only occur on first update? Try version 20.30.0 or greater. The fix for this issue was introduced in 20.29.1.

develar commented 5 years ago

Duplicates #3400

bennettatoms commented 5 years ago

Hi there!

First of all, thank you for all your work on electron-builder (it's remarkable!), and for being so responsive to the issues raised. We're using electron-builder v20.34.0 and just got the same error trying to auto-update for the first time on a windows machine. Mac auto-updating seems to be working fine, but on the windows box we got:

[error] Cannot download differentially, fallback to full download: Error: ENOENT: no such file or directory, open 'C:\Users\ThisGuy\AppData\Local\OurElectronApp\installer.exe'

The only directory I see inside 'C:\Users\ThisGuy\AppData\Local\OurElectronApp\' is pending.

Any advice? @develar

skorunka commented 4 years ago

Having the same issue as described by @bennettatoms

Cannot download differentially, fallback to full download: Error: ENOENT: no such file or directory, open 'C:\Users\skoru\AppData\Local\electron-updater\installer.exe'

bennettatoms commented 4 years ago

FWIW, @skorunka , we are now on version 21.2.0 and have not been having any issues with our windows builds.

Lazare-42 commented 3 years ago

Hello !

I too would like to start by thanking the Electron-updater team for it's work.

We have the same issue as @bennettatoms . To add something to it, electron-updater raises :

[error] Cannot download differentially, fallback to full download: Error: ENOENT: no such file or directory, open 'C:\Users\ThisGuy\AppData\Local\OurElectronApp\installer.exe'

When in fact that exe file is located at:

'C:\Users\ThisGuy\AppData\Local\ourElectronApp-updater\installer.exe'

Lazare-42 commented 3 years ago

Oops, never mind, this issue was solved by a simple "npm audit fix" on my side.

reddybhavanish commented 7 months ago

@jamesjessian @mpfau any update on this issue ? My application is of size over 600 mb. Facing the same issue.

mpfau commented 2 months ago

@reddybhavanish sorry, but I am not working on this issue anymore so I can't help you