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

Electron-Updater differential update fails with operation overlaps previous operation #3485

Closed
retina-design opened this issue Nov 18, 2018 · 16 comments

Comments

@retina-design
Copy link

commented Nov 18, 2018

  • electron-builder: Version 20.36.2
  • electron-updater: Version 4.0.4
  • Target: nsis-web
  • System: Windows

The AutoUpdater gives me this error...
[2018-11-18 17:01:42.356] [error] Cannot download differentially, fallback to full download: Error: operation (block index: 23902, checksum: Vx/fVEzWD3gMPbOsQJC+QZlJ, kind: COPY) overlaps previous operation (checksum: Vx/fVEzWD3gMPbOsQJC+QZlJ): abs: 7267809 until 500356092 and 500206446 until 500238540

... using this configuration

"build": {
    "appId": "<appId>",
    "nsisWeb": {
      "oneClick": true,
      "perMachine": false,
      "differentialPackage": true
    },
    "publish": {
      "provider": "generic",
      "url": "https://<username>:<password>@<URL>"
    },
    "win": {
      "icon": "./lib/resources/icons/icon.ico",
      "target": "nsis-web"
    },
    "files": [
      "*.js",
      "build/**/*",
      "node_modules/**/*"
    ]
  },

The connection to the server seems to work as the updater can find the new version and successfully falls back to the full download. The package.7z exists in the {User}/AppData/Local/{name}-updater.

Thanks in advance.

@alxmiron

This comment has been minimized.

Copy link

commented Nov 19, 2018

Also got this error with nsis target

@develar

This comment has been minimized.

Copy link
Member

commented Nov 19, 2018

Please provide links to old and new executables and blockmaps.

@develar

This comment has been minimized.

Copy link
Member

commented Nov 19, 2018

Just to make clear — update is working, but instead delta-, full- download is performed.

@sandeep1995

This comment has been minimized.

Copy link

commented Nov 27, 2018

Facing exactly the same issue for nsis target. I also enabled my generic server to accept byte ranges.

@sandeep1995

This comment has been minimized.

Copy link

commented Nov 28, 2018

Also got this error with nsis target
@alxmiron Are you able to solve? @develar Is there any way out?

@alxmiron

This comment has been minimized.

Copy link

commented Nov 28, 2018

No. I just get full download each time instead of differential

@sandeep1995

This comment has been minimized.

Copy link

commented Nov 28, 2018

Yeah, I am also facing the same. I want diff download. Any luck on these? @alxmiron @retina-design

@zhaoterryy

This comment has been minimized.

Copy link
Collaborator

commented Nov 28, 2018

Please try using 20.34.0 for now.

@zhaoterryy zhaoterryy changed the title Electron-Updater fails with operation overlaps previous operation Electron-Updater differential update fails with operation overlaps previous operation Nov 28, 2018
@zhaoterryy zhaoterryy added the bug label Nov 28, 2018
@sandeep1995

This comment has been minimized.

Copy link

commented Nov 28, 2018

Please try using 20.34.0 for now.

@zhaoterryy Downgraded to 20.34.0 Still facing the same error. I am building for only nsis.
I am using minio server as a local s3 setup.

Here is the log

[2018-11-29 03:09:25.501] [info] Found version 5.0.8 (url: App-Name Setup 5.0.8.exe)
[2018-11-29 03:09:25.502] [info] Downloading update from App-Name Setup 5.0.8.exe
[2018-11-29 03:09:25.515] [error] updaterCacheDirName is not specified in app-update.yml Was app build using at least electron-builder 20.34.0?
[2018-11-29 03:09:25.529] [info] No cached update info available
[2018-11-29 03:09:25.535] [info] Download block maps (old: "http://192.168.43.222:5000/test-data/App-Name%20Setup%201.0.8.exe.blockmap", new: http://192.168.43.222:5000/test-data/App-Name%20Setup%205.0.8.exe.blockmap)
[2018-11-29 03:09:25.657] [error] Cannot download differentially, fallback to full download: Error: operation (block index: 2676, checksum: sClKbnS13fglyGVAr0iRCnBU, kind: COPY) overlaps previous operation (checksum: sClKbnS13fglyGVAr0iRCnBU):
abs: 46508973 until 56008949 and 55999891 until 56008949
rel: 0 until 9499976 and 9490918 until 9499976
    at validateAndAdd (C:\Program Files\App-Name\resources\app.asar\node_modules\electron-updater\src\differentialDownloader\downloadPlanBuilder.ts:99:13)
    at computeOperations (C:\Program Files\App-Name\resources\app.asar\node_modules\electron-updater\src\differentialDownloader\downloadPlanBuilder.ts:83:9)
    at GenericDifferentialDownloader.doDownload (C:\Program Files\App-Name\resources\app.asar\node_modules\electron-updater\src\differentialDownloader\DifferentialDownloader.ts:52:24)
    at GenericDifferentialDownloader.download (C:\Program Files\App-Name\resources\app.asar\node_modules\electron-updater\src\differentialDownloader\GenericDifferentialDownloader.ts:6:17)
    at C:\Program Files\App-Name\resources\app.asar\node_modules\electron-updater\src\NsisUpdater.ts:172:10
    at Generator.next (<anonymous>)
@zhaoterryy

This comment has been minimized.

Copy link
Collaborator

commented Nov 28, 2018

Downgrade electron-updater as well, to 3.2.3.

Just an FYI: Electron-updater and electron-builder versions are tied together, they need to be kept in sync. Check release logs in https://github.com/electron-userland/electron-builder/releases for electron-updater versions.

@develar

This comment has been minimized.

Copy link
Member

commented Nov 29, 2018

And no one still answered me... "Please provide links to old and new executables and blockmaps." Now I have time to investigate issue, but I don't have test data....

@sandeep1995

This comment has been minimized.

Copy link

commented Nov 29, 2018

@develar I would like to really help you out in this regard. But as our repository is closed source, I can't share the links.

Is there any other way to provide you the same?

@develar develar closed this in b7f8e8c Nov 29, 2018
@develar

This comment has been minimized.

Copy link
Member

commented Nov 29, 2018

Validation disabled for now, because assert message is clear that probably validation is too strict. Please try electron-updater 4.0.5.

@zhaoterryy Thanks for sorting issues out — participation of such VIP users like you, increase issue priority, nearly as donation :)

Is there any other way to provide you the same?

@sandeep1995 Is it possible to provide old and new blockmap files? These files contain only blake2 hashes and sizes.

@LurkingOctopus

This comment has been minimized.

Copy link

commented Mar 5, 2019

Was facing the same error for a while and finally found the right combination for my app! Hope this helps anyone still searching:

electron: 4.0.6
electron-updater: 3.2.3
electron-builder: 20.34.0

@gimdongwoo

This comment has been minimized.

Copy link

commented Mar 14, 2019

Please reopen this issue.

@liflovs

This comment has been minimized.

Copy link

commented Oct 22, 2019

Still a problem
"electron-builder": "^21.2.0",
"electron-updater": "^4.1.2",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.