electron-updater@next breaks NSIS "per machine" quitAndInstall() when not using silent mode
See original GitHub issue- Electron-Builder Version: 22.14.7
- Node Version: 16.13.0
- Electron Version: 15.3.1
- Electron Type (current, beta, nightly): current
- Electron-Updater Version: 4.6.2
- Target: Windows NSIS
When we move from electron-updater latest
to next
to pick up the autoInstallOnAppQuit
fix for MacOS, it breaks the previously working auto-updater for NSIS when installing for “All Users” (works fine if installed using the “Only for Me” option).
What I am seeing is a little strange in that the very first time I run the installer (unsigned and built locally), the quitAndInstall() call works as expected. However, if I uninstall the application and then install again, the quitAndInstall() call gets to the point of causing Windows to pop up the UAC dialog asking for permission but then nothing else happens (that is, the Installer dialog does not appear). If I run the app again and call quitOnInstall(), it works as expected. After that first time, this behavior is repeatable every single time.
In looking at the log file (produced by our logger that we pass onto the autoUpdater), the log entries are always the same:
info: Checking for update
info: Found version 1.0.0 (url: WebLogic-Kubernetes-Toolkit-UI-Setup-1.0.0.exe)
info: Downloading update from WebLogic-Kubernetes-Toolkit-UI-Setup-1.0.0.exe
debug: updater cache dir: C:\Users\rhpat\AppData\Local\wktui-updater
info: Update has already been downloaded to C:\Users\rhpat\AppData\Local\wktui-updater\pending\WebLogic-Kubernetes-Toolkit-UI-Setup-1.0.0.exe).
info: Download complete, install type: now
info: Install on explicit quitAndInstall
info: Install: isSilent: false, isForceRunAfter: true, installPathRequiresElevation: true
info: isAdminRightsRequired is set to true, run installer using elevate.exe
If I don’t change anything other than to drop back to electron-updater@latest, everything works as expected the first time, every time. If it will help, I can pass you an installer built with electron-updater@next that reproduces the bad behavior. Please let me know what I can do to help move this forward.
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (9 by maintainers)
Top GitHub Comments
@mmaietta That sounds right but all that I can say is that
pnpm test
generates a dozen or more failures when creating an environment as specified in CONTRIBUTING.md. It seems like makingpnpm test
work locally would help people like me that want to contribute and not submit PRs that cause unit tests to fail. Clearly, some tests won’t run locally but at least we should getpnpm test
to run clean locally for the tests that can run.@mmaietta Makes sense to me. I will make these changes and test them for you tomorrow and report back.