It seems that the electron process with the given versions is blocked somehow while updating, ShipIt is not able to replace the application files. The update cannot be applied unless you completely quit the application and wait for ShipIt to be finished.
If ShipIt is not completely finished and you start the Application again the app will be broken.
I downgraded electron-builder to 20.26.0 and electron-updater to 3.0.3 (our last working configuration) and everything works fine with those versions.
I have the same problem.
After the new version is downloaded in background I get Error: No update available, can't quit and install. The app stop and I need to restart to complete the update.
Do you use custom update workflow (explicit quitAndInstall?)?
I my case yes. We use a custom workflow over ipc to show the state for our users... Something like this:
autoUpdater.addListener('error', function (event, error) {
mainWindow.webContents.send('update:error', error);
});
autoUpdater.addListener('checking-for-update', function () {
mainWindow.webContents.send('update:checking');
});
autoUpdater.addListener('update-available', function () {
mainWindow.webContents.send('update:available');
});
autoUpdater.addListener('update-not-available', function () {
mainWindow.webContents.send('update:unavailable');
});
autoUpdater.addListener('update-downloaded', function (event, releaseNotes, releaseName, releaseDate, updateURL) {
mainWindow.webContents.send('update:downloaded');
});
autoUpdater.addListener('download-progress', (progress) => {
mainWindow.webContents.send('update:progress', progress);
});
ipcMain.on('update:restart', (event, args) => {
autoUpdater.quitAndInstall();
});
ipcMain.on('update:start', (event, args) => {
autoUpdater.checkForUpdates()
.then((result: UpdateCheckResult) => {
// console.log("UPDATER", result);
mainWindow.webContents.send('update:log', result);
})
.catch(error => {
console.error('UPDATER', error);
mainWindow.webContents.send('update:error', error);
});
});
I might be able to make a small example to reproduce this error on macOS if this will help you.
@develar Yes! I use the explicit quit on update-downloaded emitter. Like:
autoUpdater.on('update-downloaded', () => {
autoUpdater.quitAndInstall(true,true);
})
@develar I'm having the same issue with auto-updating. I have a couple .jar files in my app and when I try to update, the app is not updated for mac. I tried allowing the app to install by just quitting the application and by explicitly calling quitAndInstall. The only way I can get auto-update to work is by zipping those .jar files. However, quitAndInstall method still fails with Error: No update available, can't quit and install
I hope this info helps
Duplicates #3269