question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 2 years ago
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
robertpatrickcommented, Dec 2, 2021

@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 making pnpm 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 get pnpm test to run clean locally for the tests that can run.

1reaction
robertpatrickcommented, Nov 25, 2021

@mmaietta Makes sense to me. I will make these changes and test them for you tomorrow and report back.

Read more comments on GitHub >

github_iconTop Results From Across the Web

NSIS - electron-builder
If oneClick is false and perMachine is false (default): install mode installer page. allowElevation = true Boolean - assisted installer only. Allow requesting ......
Read more >
Make electron app oneClick for updates but not for first ...
I'm trying to update my electron app on windows with electron-updater. It all works except when ...
Read more >
Chapter 4: Scripting Reference
A NSIS Script File (.nsi) is just a text file with script code. Commands ... Each (non-silent) NSIS installer has a set of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found