Open alfredsgenkins opened 3 years ago
That may have been resolved through https://github.com/electron-userland/electron-builder/pull/5802 Please try latest electron-builder at 22.11.9
That may have been resolved through #5802 Please try latest electron-builder at 22.11.9
nothing happend
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.
I'm on v22.12.1 - same case (nothing fixed)
We are using electron@13.6.0
and electron-updater@4.6.1
and on macos we get the following logs:
Found version 5.3.0-alpha.6.20211026.3
Downloading update from ...
sysctl shell command to check for macOS Rosetta environment failed: Error: Command failed: sysctl sysctl.proc_translated
Update has already been downloaded to
And then I have a log line:
[UPDATE-CHECKER]: User chose to update now
from the following code
logger.info(`${AutoUpdateLogPrefix}: User chose to update now`);
setImmediate(() => {
app.removeAllListeners("window-all-closed");
WindowManager.getInstance().destroy();
autoUpdater.quitAndInstall(true, true);
});
And the windows close (because we are destroying them due to testing) but the quitAndInstall()
call doesn't do anything.
I am on macOS 10.15.7
We can confirm this issue. It might have something to do with missing administration privileges for being able to update the application. After entering user credentials for allowing the update of the app, then executing the update again it works.
@Nokel81 Is this a connected (or the same) bug that you fixed with #6390 ? Thanks!
@nicograef It might be. I have not had this problem since using that fix I provided.
We're seeing the same issue on our app. Update is downloaded, but never installed. Used to work before until recently.
@theolivenbaum Are you using electron-updater@4.6.2
?
Seems like 4.6.1 https://github.com/theolivenbaum/Electron.NET/blob/21427f0b449ba8e4d37e02b037685bb5e9a4d323/ElectronNET.Host/package-lock.json#L411
Was this fixed on 4.6.2? If so I'll give it a try tomorrow!
Yes, my PR was included in 4.6.2 according to the comment posted onto it
@alfredsgenkins I think I've figured this out.. after stumbling around the myriad threads on this issue, it's a simple configuration setting 😆 (https://www.electron.build/configuration/mac#MacConfiguration-target)
so just doing this:
"mac": {
...
"target": [
"default"
],
as the the auto updater relies on the .zip
, just having "dmg"
there won't sign the .zip
; but "default"
signs the .dmg
and .zip
.
the logs were able to point me in the right direction:
[2022-02-27 13:55:15.447] [info] Found version 0.0.1 (url: app-0.0.1.dmg)
[2022-02-27 13:55:15.448] [info] Downloading update from app-0.0.1.dmg
[2022-02-27 13:55:15.637] [info] Update has already been downloaded to /Users/user/Library/Application Support/Caches/app-updater/pending/update.zip).
[2022-02-27 13:55:15.657] [info] / requested
[2022-02-27 13:55:15.661] [info] /1645988115637-3819.zip requested
[2022-02-27 13:55:15.661] [info] /1645988115637-3819.zip requested by Squirrel.Mac, pipe /Users/user/Library/Application Support/Caches/app-updater/pending/update.zip
[2022-02-27 13:55:15.945] [warn] Error: ditto: Couldn't read PKZip signature
[2022-02-27 13:55:15.946] [error] Error: Error: ditto: Couldn't read PKZip signature
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.
Hi Everyone,
I had the same issue in MacOS and I managed to solve it.
Below is the code which was not working.
autoUpdater.on("update-downloaded", updateInfo => { autoUpdater.quitAndInstall(); })
It closed the app but it never relaunched it. So I checked both log files of the electron app as well as the ShipIt and I realized that the moment the download is done, it would send a request to install the new application (even if you don't call the quitAndInstall method).
So to fix the issue, I just exited the app with a bit of a delay as it seems there is some sort of race issue here.
autoUpdater.on("update-downloaded", updateInfo => { setTimeout(() => { autoUpdater.quitAndInstall(); app.exit(); }, 10000); })
I checked the logs in ShipIt at the same time and I saw that it began the installation process and right after it relaunched the app. So if you're on mac, try to exit (not quit) after the download is done. Mine works now.
I hope it helps.
I also have the same problem
^22.10.5
v14.17.0
^11.0.1
current
dmg
Hey!
This issue is similar by description to https://github.com/electron-userland/electron-builder/issues/2317, but I have not found any answers there. I decided to open new issue and provide more background.
My application on Mac shows the following notification:
But once I close and reopen the app back nothing happens. The old version is still displayed. I also want my application use the
quitAndInstall
pattern. For me the fact the the notification is displayed in the first place is strange.The background:
quitAndInstall
, I have ensure the safe exitHow my application handles an update:
I took the code sample from this issue and built my implementation on top if it: https://github.com/electron-userland/electron-builder/issues/1604
Why I think the signature is fine:
Despite me expecting the signature with the Developer ID, the app only shows notarization and hardening. Not sure why. The app however, only promts the this on first install, thus I assume it is OK:
How I sign my app:
I used following configuration in
package.json
:My notarization script is using
electron-notarize
and I sign it with following code:I build my app using following command:
What I also suspect:
The react boilerplate I use, contained the following code:
I heared that this could prevent app from closing. But I call
app.removeAllListeners('window-all-closed')
thus this should not be the case.In logs, I see following message (relating me to https://github.com/electron-userland/electron-builder/issues/486, but again, this appears to not break anything):
Any ideas, suggestions?