Symptom
On Ubuntu with the .deb install, Restart to update opens the system authentication dialog for the admin password. While the password is being typed, GNOME shows "Switchboard is not responding" over it and the focus jumps to that dialog, repeatedly. Once the password is accepted the update goes through and the app recovers.
Cause
updater-install (main.js:3104-3109) calls autoUpdater.quitAndInstall() with the windows still mapped.
- On a
.deb, electron-updater 6.8.9 installs before quitting. BaseUpdater.quitAndInstall runs install(), then app.quit(). DebUpdater.doInstall runs dpkg -i through LinuxUpdater.runCommandWithSudoIfNeeded, which wraps it in pkexec (the first of gksudo, kdesudo, pkexec, beesu found) via spawnSyncLog, a synchronous spawn (node_modules/electron-updater/out/LinuxUpdater.js:34-51, DebUpdater.js).
- The main process is therefore blocked for as long as the polkit dialog is open. Its windows stop answering the compositor's ping, and mutter raises the "not responding" dialog, which takes the focus.
Wanted
Typing the password is not interrupted: no "not responding" dialog while the authentication prompt is open, and the update then completes and relaunches as today.
Directions to weigh in the specification
- Unmap or destroy every window before calling
quitAndInstall on Linux. The blocked process then has no window to ping. This is the smallest change. Measure whether a hidden window is still pinged.
- Install outside the blocked process. On quit, start a detached helper that runs
pkexec dpkg -i <file> and relaunches the app; then the app exits at once. The app is gone while the password is typed, at the cost of owning the install step that electron-updater does today.
What must hold either way:
- The unsaved-edits guard (
unsavedGuard.confirmQuit) still runs before anything is hidden.
- The ActivityWatch flush still runs.
- A cancelled authentication (
pkexec exit 126) leaves the app running with its windows back. Today electron-updater dispatches an error in that case and the app stays open.
- AppImage, Windows and macOS updates are unchanged.
Symptom
On Ubuntu with the
.debinstall, Restart to update opens the system authentication dialog for the admin password. While the password is being typed, GNOME shows "Switchboard is not responding" over it and the focus jumps to that dialog, repeatedly. Once the password is accepted the update goes through and the app recovers.Cause
updater-install(main.js:3104-3109) callsautoUpdater.quitAndInstall()with the windows still mapped..deb, electron-updater 6.8.9 installs before quitting.BaseUpdater.quitAndInstallrunsinstall(), thenapp.quit().DebUpdater.doInstallrunsdpkg -ithroughLinuxUpdater.runCommandWithSudoIfNeeded, which wraps it inpkexec(the first ofgksudo,kdesudo,pkexec,beesufound) viaspawnSyncLog, a synchronous spawn (node_modules/electron-updater/out/LinuxUpdater.js:34-51,DebUpdater.js).Wanted
Typing the password is not interrupted: no "not responding" dialog while the authentication prompt is open, and the update then completes and relaunches as today.
Directions to weigh in the specification
quitAndInstallon Linux. The blocked process then has no window to ping. This is the smallest change. Measure whether a hidden window is still pinged.pkexec dpkg -i <file>and relaunches the app; then the app exits at once. The app is gone while the password is typed, at the cost of owning the install step that electron-updater does today.What must hold either way:
unsavedGuard.confirmQuit) still runs before anything is hidden.pkexecexit 126) leaves the app running with its windows back. Today electron-updater dispatches an error in that case and the app stays open.