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

Can I disable differential download? #4682

Closed
gschattenhofer opened this issue Feb 17, 2020 · 15 comments · Fixed by #7950
Closed

Can I disable differential download? #4682

gschattenhofer opened this issue Feb 17, 2020 · 15 comments · Fixed by #7950
Labels

Comments

@gschattenhofer
Copy link

  • electron-builder: 21.2.0

  • electron-updater: 4.2.0

  • Target: NSIS

I want to disable differential download on NSIS using electron-updater, so it always fallback to full download. Is there a way to do it?

@akorchev
Copy link
Contributor

I recently wanted to do the same. Checked the implementation and it seems there isn't currently a way to disable differential downloads. In my case I am still using the Nuts server for downloads and it doesn't support either blockmap files or HTTP ranges.

Your best bet would be to fork electron-updater.

@gschattenhofer
Copy link
Author

@akorchev Thanks for the suggestion. I would leave the fork solution as a last resource, don't want to deal with the maintenance and extra tests for it.

I'm currently considering deleting the blockmap after the publish and add a handler to the exception thrown. Any thoughts on that or warns are more than welcome.

@aabuhijleh
Copy link

I'm also interested in disabling this default behavior. I think this should be relatively simple to add as a property. @develar wdyt?

autoUpdater.differentialDownload = false

By setting this to false, electron-updater should automatically fallback to a full download and not try to download blockmaps or throw exceptions.

@aabuhijleh
Copy link

If you look at the electron-builder configuration documentation you can find this option differentialPackage. If you set that to false, a blockmap file will no longer be generated. However, electron-updater will still try to download the blockmap and if it fails, it falls back to a full download.

so this option

autoUpdater.differentialDownload = false

is still needed to prevent unnecessary download attempts.

@gschattenhofer
Copy link
Author

differentialPackage works only on NSIS WEB targets per the documentation.

@aabuhijleh
Copy link

If I don't add differentialPackage to NSIS target, I still get .blockmap files generated.

@Vaggal
Copy link

Vaggal commented Mar 11, 2020

@gschattenhofer

differentialPackage works only on NSIS WEB targets per the documentation.

I think this is not correct.

Per the documentation

differentialPackage Boolean - Defaults to true for web installer (nsis-web)

It just defaults to true for web installer. It doesn't mean that it only works on it. In my experience if you set it false, it will full download the package.

@stale
Copy link

stale bot commented May 10, 2020

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.

@stale stale bot added the backlog label May 10, 2020
@stale stale bot closed this as completed May 17, 2020
@kylegundersen
Copy link

kylegundersen commented Mar 27, 2021

remove-differential-installer
It was easy enough to remove. Just comment out the two lines above. Hopefully, this helps someone. BTW the differential updater makes the app lock up badly, so this is a must-do for the quality of life for your users. Good luck, and happy coding!

Also, if someone wants to take the time to variable this conditional, that would be great ;).

@MehmetDgn99
Copy link

remove-differential-installer It was easy enough to remove. Just comment out the two lines above. Hopefully, this helps someone. BTW the differential updater makes the app lock up badly, so this is a must-do for the quality of life for your users. Good luck, and happy coding!

Also, if someone wants to take the time to variable this conditional, that would be great ;).

you are a perfect man. thank you so much

@indutny-signal
Copy link
Contributor

Hey! Just curious, what was the reason you wanted to disable differential updates? Are they are worse in some ways?

@appurist
Copy link

@indutny-signal In my case it was because it was a government project with a strict update procedure so there were no downloads at all and it looked like this feature added considerably to the build process (whether that is true or not I don't know). So I wanted to disable them to see the difference, and because they weren't being used anyway.

@kylegundersen
Copy link

kylegundersen commented Mar 1, 2022

@indutny-signal In my case it was the fact that the differential downloader failed every time. The biggest problem is when it was checking if the differential could be applied. It froze my application's main process for a couple minutes which is unacceptable for end-users.

@indutny-signal
Copy link
Contributor

@kylegundersen oh no, thanks for sharing!

@guillaume-jeannic-cbp
Copy link

Why was this issue closed?
I also would like the option to never do the differential update.
In our case, first it never worked, and second it did crash our production application because of a bug in gitlab repository -> https://gitlab.com/gitlab-org/gitlab/-/issues/414807. A malformed 404 response when trying to get information about the curent version for the never working differential update was causing the updater to crash...

bronsonmock pushed a commit to bronsonmock/electron-builder that referenced this issue Dec 19, 2023
add new option to skip differential download attempt and default to full download

Closes electron-userland#4682
bronsonmock pushed a commit to bronsonmock/electron-builder that referenced this issue Dec 19, 2023
add new option to skip differential download attempt and default to full download

Closes electron-userland#4682
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants