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

Cannot download differentially, fallback to full download: Error: Internal error, size mismatch #4358

Closed andyoknen closed 4 years ago

andyoknen commented 5 years ago

When upgrading from version to version there are problems with the download: Cannot download differentially, fallback to full download: Error: Internal error, size mismatch:

[2019-10-28 17:12:04.787] [info] First check updates...
[2019-10-28 17:12:04.798] [info] Checking for update
[2019-10-28 17:12:07.608] [info] Found version 0.0.49-beta (url: PocketnetSetup.exe)
[2019-10-28 17:12:07.616] [info] Downloading update from PocketnetSetup.exe
[2019-10-28 17:12:07.630] [info] No cached update info available
[2019-10-28 17:12:07.639] [info] Download block maps (old: "https://github.com/pocketnetapp/pocketnet.gui/releases/download/v0.0.48-beta/PocketnetSetup.exe.blockmap", new: https://github.com/pocketnetapp/pocketnet.gui/releases/download/v0.0.49-beta/PocketnetSetup.exe.blockmap)
[2019-10-28 17:12:09.055] [info] File has 3486 changed blocks
[2019-10-28 17:12:09.064] [error] Cannot download differentially, fallback to full download: Error: Internal error, size mismatch: downloadSize: 72061673, copySize: 52300607, newSize: 124339416
    at GenericDifferentialDownloader.doDownload (C:\Users\brangr\AppData\Local\Programs\Pocketnet\resources\app.asar\node_modules\electron-updater\out\differentialDownloader\DifferentialDownloader.js:121:13)
    at GenericDifferentialDownloader.download (C:\Users\brangr\AppData\Local\Programs\Pocketnet\resources\app.asar\node_modules\electron-updater\out\differentialDownloader\GenericDifferentialDownloader.js:20:17)
    at NsisUpdater.differentialDownloadInstaller (C:\Users\brangr\AppData\Local\Programs\Pocketnet\resources\app.asar\node_modules\electron-updater\out\NsisUpdater.js:278:10)
    at process._tickCallback (internal/process/next_tick.js:68:7)

I do not fully understand about the size of what the files were and why they differ.. I will be glad of any help.

andyoknen commented 5 years ago

I think I understand what the problem is, in the latest.yml for Windows is not added to the size of the blockmap file. Now I have another problem, the SHA512 hash does not match. This is partly due to the fact that differential loading does not take into account the file signature..

andyoknen commented 5 years ago

By the way, I use the regular way of signing exe (with pfx). Can be blockmap is created before the signing?

"certificateFile": ....,
"certificatePassword": .....,
"publisherName": ......,
"rfc3161TimeStampServer": "http://timestamp.globalsign.com/scripts/timstamp.dll",
"signingHashAlgorithms": [
    "sha256"
]
doylemark commented 4 years ago

any update on this?

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

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