Electron-builder: Cannot download differentially..: Error: Maximum allowed size is 5 MB

Created on 20 Dec 2018  ·  24Comments  ·  Source: electron-userland/electron-builder


  • Version:
    "electron-builder": "^20.38.4",
    "electron-updater": "^4.0.7",

  • Target: "target": "NSIS",
    "arch": [ "x64" ]



Old and new blockmaps are the same ??
Where can i define the Size which is mentioned in the following error "Cannot download differentially, fallback to full download: Error: Maximum allowed size is 5 MB**"

Checking for update
Found version 1.0.6 (url: dallasspur-setup-1.0.6.exe)
Downloading update from dallasspur-setup-1.0.6.exe
updater cache dir: C:\Users\harry\AppData\Local\dallasspur-updater
No cached update info available
**Download block maps (old: "https://api.github.com/repos/harryhahn/DallasTrack/releases/assets/10233924.blockmap", new: https://api.github.com/repos/harryhahn/DallasTrack/releases/assets/10233924.blockmap)
c
at Object.responseHandler (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\node_modules\builder-util-runtime\src\httpExecutor.ts:207:26)
at ClientRequest.request.createRequest.response (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\node_modules\builder-util-runtime\src\httpExecutor.ts:267:17)
at ClientRequest.emit (events.js:182:13)
at URLRequest.ClientRequest.urlRequest.on (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\electron.asar\browser\api\net.js:207:12)
at URLRequest.emit (events.js:182:13)
From previous event:
at ElectronHttpExecutor.downloadToBuffer (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\node_modules\builder-util-runtime\src\httpExecutor.ts:178:60)
at C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:145:46
at Generator.next ()
From previous event:
at downloadBlockMap (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:144:29)
at C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:166:85
at Generator.next ()
From previous event:
at NsisUpdater.differentialDownloadInstaller (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:134:173)
at Object. (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:34:42)
at Generator.next ()
From previous event:
at Object.task (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:31:11)
at C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:609:25
From previous event:
at NsisUpdater.executeDownload (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:544:68)
at NsisUpdater.executeDownload (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\BaseUpdater.ts:27:18)
at NsisUpdater.doDownloadUpdate (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:27:17)
at NsisUpdater.downloadUpdate (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:419:19)
at C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:382:49
at Generator.next ()
at runCallback (timers.js:696:18)
at tryOnImmediate (timers.js:667:5)
at processImmediate (timers.js:649:5)
From previous event:
at NsisUpdater.doCheckForUpdates (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:359:34)
at NsisUpdater.checkForUpdates (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:220:35)
at App. (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\main.js:88:15)
at App.emit (events.js:187:15)
Error: Error: Cannot download "https://api.github.com/repos/harryhahn/DallasTrack/releases/assets/10233924", status 404: Not Found
at ClientRequest.request.createRequest.response (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\node_modules\builder-util-runtime\src\httpExecutor.ts:247:26)
at ClientRequest.emit (events.js:182:13)
at URLRequest.ClientRequest.urlRequest.on (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\electron.asar\browser\api\net.js:207:12)
at URLRequest.emit (events.js:182:13)
From previous event:
at ElectronHttpExecutor.download (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\electronHttpExecutor.ts:23:73)
at Object. (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:35:35)
From previous event:
at Object.task (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:31:11)
at C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:609:25
From previous event:
at NsisUpdater.executeDownload (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:544:68)
at NsisUpdater.executeDownload (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\BaseUpdater.ts:27:18)
at NsisUpdater.doDownloadUpdate (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:27:17)
at NsisUpdater.downloadUpdate (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:419:19)
at C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:382:49
at Generator.next ()
at runCallback (timers.js:696:18)
at tryOnImmediate (timers.js:667:5)
at processImmediate (timers.js:649:5)
From previous event:
at NsisUpdater.doCheckForUpdates (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:359:34)
at NsisUpdater.checkForUpdates (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:220:35)
at App. (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\main.js:88:15)
at App.emit (events.js:187:15)
Unhandled rejection Error: Cannot download "https://api.github.com/repos/harryhahn/DallasTrack/releases/assets/10233924", status 404: Not Found
at ClientRequest.request.createRequest.response (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\node_modules\builder-util-runtime\src\httpExecutor.ts:247:26)
at ClientRequest.emit (events.js:182:13)
at URLRequest.ClientRequest.urlRequest.on (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\electron.asar\browser\api\net.js:207:12)
at URLRequest.emit (events.js:182:13)
From previous event:
at ElectronHttpExecutor.download (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\electronHttpExecutor.ts:23:73)
at Object. (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:35:35)
From previous event:
at Object.task (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:31:11)
at C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:609:25
From previous event:
at NsisUpdater.executeDownload (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:544:68)
at NsisUpdater.executeDownload (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\BaseUpdater.ts:27:18)
at NsisUpdater.doDownloadUpdate (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:27:17)
at NsisUpdater.downloadUpdate (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:419:19)
at C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:382:49
at Generator.next ()
at runCallback (timers.js:696:18)
at tryOnImmediate (timers.js:667:5)
at processImmediate (timers.js:649:5)
From previous event:
at NsisUpdater.doCheckForUpdates (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:359:34)
at NsisUpdater.checkForUpdates (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\node_modules\electron-updater\src\AppUpdater.ts:220:35)
at App. (C:\Users\harry\AppData\Local\Programs\dallasspur\resources\app.asar\main.js:88:15)
at App.emit (events.js:187:15)

bug electron-updater

Most helpful comment

I solved the problem downgrading the electron-updater and builder versions.

downgrade to the following versions:
electron: 4.0.6
electron-updater: 3.2.3
electron-builder: 20.34.0

The important thing of this, is that it works and your proyect on GitHub can continue being PRIVATE.

All 24 comments

Yes, I am having a similar issue with a 404 triggering on the fetch to the release asset

Same issue, any luck ?

I have the same issue... How to solve this?

Interestingly this error is thrown only from a private github repo. Make it public and this error is gone.. which doesnt make any sense..

@orgertot what problem did you have? Error: Maximum allowed size is 5 MB or status 404: Not Found

Logger keeps sending the error, but after making the repo public it updates...

@pmcarlos Error: Maximum allowed size is 5 MB

Pinging @develar
This problem will effect more and more users because of githubs new free private repos..

I, too, am hitting the 5 MB error on NSIS target updates from a private repo -- and making it public isn't an option. Anybody come across a workaround yet?

Same issue for me too

Same issue for me too ++

Exactly same issue here too.

I solved the problem downgrading the electron-updater and builder versions.

downgrade to the following versions:
electron: 4.0.6
electron-updater: 3.2.3
electron-builder: 20.34.0

The important thing of this, is that it works and your proyect on GitHub can continue being PRIVATE.

将electron-updater回退到3.2.3之后,提示需要升级到4.0才能使用 @melbin

Unfortunately the downgrade to electron-builder: 20.34.0 workaround is not a solution if you want to sign your target. Because you will run into another issue. Hope this will be solved soon.

We too are having this problem and downgrading the package versions had no effect.

@melbin Downgrading electron-updater to 3.2.3 still fails to download differential updates, but does at least fall back to downloading the newest release _in full_. However, I don't get notifications when the updates are ready to install (only on Windows -- macOS still notifies just fine).

Note that downgrading electron-builder had no effect on this issue for me.

@DoomyTheFroomy I was still able to sign all executables on a Mac (using my solution for code signing the Windows executable with an EV hardware token on macOS). What other issue did you run into?

@Littlebigdondon yes exactly this error. I haven’t seen your workaround but I didn't wanted change here everything just for a workaround. Hopefully they are solving the issue pretty fast.
Offtopic Perhaps someone can show an introduction which url's the generic endpoint have to support. I think the private github repository has too many issues.

I solved the problem downgrading the electron-updater and builder versions.
downgrade to the following versions:
electron: 4.0.6
electron-updater: 3.2.3
electron-builder: 20.34.0
The important thing of this, is that it works and your proyect on GitHub can continue being PRIVATE.

I can confirm this works for my private repo.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

My project repo is public, yet I still have this issue. Using:

"electron": "^4.2.8",
"electron-builder": "^21.1.5",
"electron-updater": "^4.1.2",

I have still the issue

[2019-08-27 21:37:03.555] [error] Cannot download differentially, fallback to full download: Error: Maximum allowed size is 5 MB

"electron-builder": "^21.2.0",
"electron-updater": "^4.1.2",
"electron": "^6.0.2"

And I don't want to downgrade. Any solution?

Downgrading it solves the 5mb error, but results in another issue with publishing the bundle to Github(my repo is private as well). Any ideas ?

This happens to me also, I have a private repo.

this is what the logs say:

[2020-10-21 16:11:16.992] [info] Checking for update
[2020-10-21 16:11:21.052] [info] Found version 2.3.0 (url: Setup_2.3.0.exe)
[2020-10-21 16:11:22.534] [info] Downloading update from Setup_2.3.0.exe
[2020-10-21 16:11:22.552] [info] Download block maps (old: "https://api.github.com/repos/zeejay09/<private-repo>/releases/assets/27290254.blockmap", new: https://api.github.com/repos/zeejay09/<private-repo>/releases/assets/27290254.blockmap)
[2020-10-21 16:11:23.170] [error] Cannot download differentially, fallback to full download: Error: Maximum allowed size is 50 MB
    at Object.responseHandler (C:\<Installation path>\resources\app.asar\node_modules\builder-util-runtime\out\httpExecutor.js:241:26)
    at ClientRequest.<anonymous> (C:\<Installation path>\resources\app.asar\node_modules\builder-util-runtime\out\httpExecutor.js:303:17)
    at ClientRequest.emit (events.js:310:20)
    at SimpleURLLoaderWrapper.<anonymous> (electron/js2c/browser_init.js:101:6157)
    at SimpleURLLoaderWrapper.emit (events.js:310:20)

but when i set the repo to public, this error is gone but I cannot private the repo.

"electron-updater": "^4.3.5",
"electron": "^10.1.3",
"electron-builder": "^22.8.1",
Was this page helpful?
0 / 5 - 0 ratings