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

macOS auto-update without extra zip file #2199

Open
develar opened this issue Oct 13, 2017 · 34 comments
Open

macOS auto-update without extra zip file #2199

develar opened this issue Oct 13, 2017 · 34 comments

Comments

@develar
Copy link
Member

develar commented Oct 13, 2017

There is no any reason to require ZIP file. DMG should be enough.

Stay tuned — delta updates using DMG files are coming next week :)

@Ajeey
Copy link
Contributor

Ajeey commented Oct 13, 2017

Will it matter if I have installed my app via pkg?

@develar
Copy link
Member Author

develar commented Oct 13, 2017

You can ask us to support pkg but... #1728 (comment) Depends on user demand / donation.

@develar
Copy link
Member Author

develar commented Oct 19, 2017

To make clear — when this feature will be implemented, it will be very easy to support virtually any format, including pkg. Not because our position about DMG is changed, but because of backward compatibility (need to support both zip and DMG, so, old clients will be able to update).

develar added a commit to develar/electron-builder that referenced this issue Oct 31, 2017
develar added a commit to develar/electron-builder that referenced this issue Nov 1, 2017
develar added a commit to develar/electron-builder that referenced this issue Nov 2, 2017
develar added a commit to develar/electron-builder that referenced this issue Nov 2, 2017
develar added a commit to develar/electron-builder that referenced this issue Nov 3, 2017
develar added a commit to develar/electron-builder that referenced this issue Nov 3, 2017
@farfromrefug
Copy link

@develar i think this feature has broken zip auto update. Right now i am building my app with only zip on mac, and since this my latest.yml is not generated anymore
I pinpointed the issue to come from here:

mapper(name, outDir => new ArchiveTarget(name, outDir, this, targets.some(it => it === "dmg") && (electronUpdaterCompatibility == null || semver.satisfies("2.16.0", electronUpdaterCompatibility))))

The ArchiveTarget is called with isWriteUpdateInfo to false, so my latest.yml is not generated anymore

@develar
Copy link
Member Author

develar commented Nov 13, 2017

@farfromrefug By intention. If you need auto-update on macOS, you build both dmg and zip. Why do you build only zip and not dmg?

@farfromrefug
Copy link

Because i dont need dmg :D What's hard is that you broke support for it while it was there.
Also as i only use zip for now (even thinking about 7z to get smaller) building dmg and zip makes the build longer...

Now i am not against switching to dmg! But does it mean i can only use dmg ,and update files will still be built ? If so, do the distrib updater my clients have within their app already know how to install dmg updates?

Thanks

@develar
Copy link
Member Author

develar commented Nov 13, 2017

I was not aware about such use case. Fix will be today evening CET (better if you will duplicate your comment as a new issue).

@farfromrefug
Copy link

@develar no problem, thanks for fixing this
Will create a new issue about the dmg thing

@XuluWarrior
Copy link
Contributor

What is the current status of this issue?
I see a number of WIP commits from about a month ago but I get "Unhandled rejection Error: ZIP file not provided" when running against GitHub release with a DMG but no ZIP file.

@ilyaLibin
Copy link

ilyaLibin commented Feb 4, 2018

Hi @develar
Are there any updates on that issue? Getting the same error.
Unhandled rejection Error: ZIP file not provided

@mark-buer
Copy link

Adding the following to my electron builder config allowed me to proceed:

mac:
  electronUpdaterCompatibility: '>=2.15'
win:
  electronUpdaterCompatibility: '>=2.15'

@develar
Copy link
Member Author

develar commented Feb 6, 2018

Feature is not implemented yet. zip is still required for macOS auto-updates.

@damianobarbati
Copy link

Same as @ilyaLibin. Any update on this?

@brunolemos
Copy link

Bumping this issue, I see no reason to have both .zip and .dmg for users to download. I'd like to keep only .dmg so they can easily drag to Applications.

@vladimiry
Copy link
Contributor

Friendly ping from my side :)

jkawamoto added a commit to GooBox/file-share-desktop that referenced this issue Mar 9, 2019
Until this issue is fixed electron-userland/electron-builder#2199,
a zip file is requied for auto update.
@Delagen
Copy link

Delagen commented Jan 12, 2021

Any news?

@LukeXF
Copy link

LukeXF commented Apr 10, 2021

Any update? 2017 feels like a while ago now!

1 similar comment
@LukeXF
Copy link

LukeXF commented Apr 10, 2021

Any update? 2017 feels like a while ago now!

@acnebs
Copy link

acnebs commented May 15, 2021

@develar I'd like to see this feature and am happy to work on a PR towards this goal. Seemed like you were actively working on it a few years ago, is there somewhere we can start?

Or is the reason it was never implemented because it is a difficult problem to solve?

I haven't actually tried using it, but this project claims to do differential updates on mac.

https://github.com/imjsElectron/electron-differential-updater

@ashgrover
Copy link

ashgrover commented Jun 22, 2021

I'm running into this issue as well. For now, I'm building both dmg and zip so that auto-update works even if the app was installed using dmg. Would be nice if we didn't have to build zip file.

@mmaietta
Copy link
Collaborator

@acnebs I'm happy to review any PR.
It's relatively simple to get a local dev env set up too 🙂
https://github.com/electron-userland/electron-builder/blob/master/CONTRIBUTING.md#to-setup-a-local-dev-environment

undergroundwires added a commit to undergroundwires/privacy.sexy that referenced this issue Oct 13, 2021
For fully automatic macOS updates, electron-updater requires:
  1. Distributing macOS file as .zip (electron-userland/electron-builder#2199)
  2. Code signing for the application

privacy.sexy as of today lacks both the distribution and code signing.
This commit introduces auto-updates through automatically checking for
updates, downloading them but requiring user to drag application icons
to Applications by opening dmg file.

This commit also fixes:
  1. Progress state in update progress bar not being shown.
  2. Downloading updates were being triggered even though it was not
desired as downloads are being handled using different based on OS and
user choice.

In the end it refactors the code for handling updates of two different
kinds, and making message dialog use enums for results instead of
response integers as well as setting default and cancel button behavior.
Refactorings make behaviors more explicit and extends the control.
@lidel
Copy link
Contributor

lidel commented Dec 13, 2021

This is extremely frustrating to realize that disabling zip package format will break autoupdates in dmg.
I've updated docs in #6496 to save other folks from that fate.

lidel added a commit to lidel/electron-builder that referenced this issue Dec 13, 2021
This is the bare minimum to save  people from breaking auto update on macos, as noted in
electron-userland#2199 (comment)
mmaietta pushed a commit that referenced this issue Dec 20, 2021
This is the bare minimum to save  people from breaking auto update on macos, as noted in
#2199 (comment)
@taratatach
Copy link
Contributor

@lidel's warning was removed from the doc by the very next release… Could we get this back into the documentation as nothing warns us about the necessity of generating the zip file?
I created a new PR to bring back the warning into the doc: #7188

taratatach added a commit to cozy-labs/cozy-desktop that referenced this issue Oct 12, 2022
  Although our users install Cozy Desktop via the `dmg` target on macOS,
  the `zip` target is still required for the updater to work.
  Indeed, if the generated zip file isn't published, the updater will
  fail as it is looking for its presence.

  The issue has been reported a long time ago in
  electron-userland/electron-builder#2199 but
  there is no recent work on any potential solution.
taratatach added a commit to cozy-labs/cozy-desktop that referenced this issue Oct 12, 2022
  Although our users install Cozy Desktop via the `dmg` target on macOS,
  the `zip` target is still required for the updater to work.
  Indeed, if the generated zip file isn't published, the updater will
  fail as it is looking for its presence.

  The issue has been reported a long time ago in
  electron-userland/electron-builder#2199 but
  there is no recent work on any potential solution.
taratatach added a commit to cozy-labs/cozy-desktop that referenced this issue Oct 12, 2022
  Although our users install Cozy Desktop via the `dmg` target on macOS,
  the `zip` target is still required for the updater to work.
  Indeed, if the generated zip file isn't published, the updater will
  fail as it is looking for its presence.

  The issue has been reported a long time ago in
  electron-userland/electron-builder#2199 but
  there is no recent work on any potential solution.
taratatach added a commit to cozy-labs/cozy-desktop that referenced this issue Oct 13, 2022
  Although our users install Cozy Desktop via the `dmg` target on macOS,
  the `zip` target is still required for the updater to work.
  Indeed, if the generated zip file isn't published, the updater will
  fail as it is looking for its presence.

  The issue has been reported a long time ago in
  electron-userland/electron-builder#2199 but
  there is no recent work on any potential solution.
taratatach added a commit to cozy-labs/cozy-desktop that referenced this issue Oct 13, 2022
  Although our users install Cozy Desktop via the `dmg` target on macOS,
  the `zip` target is still required for the updater to work.
  Indeed, if the generated zip file isn't published, the updater will
  fail as it is looking for its presence.

  The issue has been reported a long time ago in
  electron-userland/electron-builder#2199 but
  there is no recent work on any potential solution.
taratatach added a commit to cozy-labs/cozy-desktop that referenced this issue Oct 13, 2022
Although our users install Cozy Desktop via the `dmg` target on macOS,
the `zip` target is still required for the updater to work.
Indeed, if the generated zip file isn't published, the updater will
fail as it is looking for its presence.

The issue has been reported a long time ago in
electron-userland/electron-builder#2199 but
there is no recent work on any potential solution.
LarrMarburger pushed a commit to LarrMarburger/privacy.sexy that referenced this issue Nov 16, 2023
For fully automatic macOS updates, electron-updater requires:
  1. Distributing macOS file as .zip (electron-userland/electron-builder#2199)
  2. Code signing for the application

privacy.sexy as of today lacks both the distribution and code signing.
This commit introduces auto-updates through automatically checking for
updates, downloading them but requiring user to drag application icons
to Applications by opening dmg file.

This commit also fixes:
  1. Progress state in update progress bar not being shown.
  2. Downloading updates were being triggered even though it was not
desired as downloads are being handled using different based on OS and
user choice.

In the end it refactors the code for handling updates of two different
kinds, and making message dialog use enums for results instead of
response integers as well as setting default and cancel button behavior.
Refactorings make behaviors more explicit and extends the control.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests