Updater not updating
See original GitHub issue- Version: electron-builder version=21.2.0 os=18.7.0 electron-updater=4.1.2
- Target: macos
Building for macos, and have the app working fine, signed and notarized. Using GitHub to host the release. At some point auto-updater was working fine, but I see that it is not working now.
It finds the update just fine. It downloads it. I find the file in the Cache (~/Library/Application Support/Caches/privicy-pal-updater/pending/PrivicyPal-0.1.12-mac.zip) as a zip and here (~/Library/Caches/com.privicy.pal.ShipIt/update.FVpudS6/PrivicyPal.app).
I have added logs, to log level silly:
[2019-10-08 14:20:08.121] [info] Checking for update
[2019-10-08 14:20:10.077] [info] Found version 0.1.12 (url: PrivicyPal-0.1.12-mac.zip, PrivicyPal-0.1.12.dmg)
[2019-10-08 14:20:10.079] [info] Downloading update from PrivicyPal-0.1.12-mac.zip, PrivicyPal-0.1.12.dmg
[2019-10-08 14:20:10.082] [debug] updater cache dir: /Users/steven.roussey/Library/Application Support/Caches/privicy-pal-updater
[2019-10-08 14:20:10.311] [info] Update has already been downloaded to /Users/steven.roussey/Library/Application Support/Caches/privicy-pal-updater/pending/PrivicyPal-0.1.12-mac.zip).
[2019-10-08 14:20:10.479] [info] / requested
[2019-10-08 14:20:10.483] [info] /1570569610312-5606.zip requested
[2019-10-08 14:20:10.483] [info] /1570569610312-5606.zip requested by Squirrel.Mac, pipe /Users/steven.roussey/Library/Application Support/Caches/privicy-pal-updater/pending/PrivicyPal-0.1.12-mac.zip
[2019-10-08 14:20:34.450] [info] Proxy server for native Squirrel.Mac is closed (was started to download https://github.com/privicy/privicypal-releases/releases/download/v0.1.12/PrivicyPal-0.1.12-mac.zip)
But no errors.
The app does not update. Code here:
autoUpdater.on('update-downloaded', (event) => {
updateProgress('progress.appupdater.update-downloaded', 100);
const response = dialog.showMessageBoxSync(ApiMain.getUserInterface(), {
type: 'question',
buttons: ['Now', 'Later'],
defaultId: 0,
message: `Version ${event.releaseName} is available, do you want to install it now?`,
title: 'Update available',
});
if (response === 0) {
// required for timing issue
setImmediate(() => {
// prevent close handlers from quitting on window close
app.removeAllListeners('window-all-closed');
const browserWindows = BrowserWindow.getAllWindows();
browserWindows.forEach(function(browserWindow) {
browserWindow.removeAllListeners('close');
});
autoUpdater.quitAndInstall();
});
}
});
I kick things off like this:
const checker = () => {
autoUpdater.checkForUpdatesAndNotify();
setTimeout(checker, 8 * 3600 * 1000);
};
setTimeout(checker, 15000);
The update will not install when quitting, and it will not install via quitAndInstall
, and it shows no error messages anywhere I can find.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
Troubleshoot problems updating Windows - Microsoft Support
To check for updates, select Start > Settings > Windows Update > Check for updates. To get help, in the search box on...
Read more >Fix Chrome update problems & failed updates - Google Support
If you're having problems updating Chrome on your computer, you might see: Update failed: Updates are disabled by administrator; Update failed (Error: 3...
Read more >Windows Update Not Working, Stuck at Checking for updates ...
Method 1: Run Windows Update troubleshooter · Click the Start menu button at the bottom left corner of the desktop. · Type troubleshooting...
Read more >Windows Update not Working or Loading: Easily Diagnose & Fix
What to do if Windows Update is not working? · 1. Run the Windows Update troubleshooter · 2. Use System Restore to roll...
Read more >6 Ways to Fix Windows Update Not Working Windows 11/10
Secure Your Computer Data Is the Most Important Thing · Fix 1. Restart Windows Update Service · Fix 2. Run Windows Update troubleshooter...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What was the fix here? Having a similar issue
@johnryan It’s too long so can’t remember what i did. I was likely intended to add some hash to version code and the builder failed to parse it. the problem was related with some configs inside package.json or somewhere else. check the version code or non english characters. when packaging, the builder parsing version code under windows and darwin seems to be different. One can work, the other can not.