-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
electron-updater@next breaks NSIS "per machine" quitAndInstall() when not using silent mode #6425
Comments
@mmaietta OK, so digging in and adding some extra logging, I figured out why In 4.3.9,
In 4.6.2,
Is there a reason the behavior of |
@mmaietta @hvuntokrul This commit breaks the Windows install for All Users (at least when not using the one-click installer and not using silent mode). By modifying the
Since I am not sure what problem the commit was addressing, I don't feel like I have enough information to create the necessary PR that both resolves my issue and doesn't break whatever issue the original commit was fixing. How can I help in resolving this issue so that I am not stuck with |
As it turns out, it looks like a better test is to only use elevate if the installer is running in silent mode (found this by testing
|
@robertpatrick thanks for the detailed investigation and for reviewing the PR! I honestly do not have expertise with nsis scripting, but using nsis install script for determining elevation certainly seems like the proper route instead of a js write-file attempt. If we're to move forward with #6438, which I'm in favor of, then I think the commit from #6073 should be reverted as part of the new PR. Thoughts? I currently don't have a manner to test the PR though as my Windows machine decided to go out-of-office on me |
@mmaietta Makes sense to me. I will make these changes and test them for you tomorrow and report back. |
@mmaietta OK, I applied PR #6438 to, and removed PR #6073 from, the
All four scenarios are working properly with these two changes. Let me know when I can get a release with these two changes! |
That's excellent news! Would you be willing to open a PR with your changes? Just would need to also mention credit to @krisdages for the work in PR #6438 |
@mmaietta Yes, I am willing and working on it. In following your CONTRIBUTING.md guide, it seems that Given that I am unable to run the tests locally, I am forced to submit the PR without running the test suites. |
The tests are also OS-specific, so many of them will fail locally if they're designed to be run on mac. It's been one of the confusing aspects of this project, but I don't know of another way to have snapshot tests without it being OS-specific. Linux tests can run on mac, but they won't have the same snapshot data. Thanks for the PR. Took a look, it looks solid. Waiting on all CI tests to run now. |
…nstall/updates (#6450) * fix(nsis): fix per-machine installs Add @krisdages changes from PR #6438 to elevate silent per-machine installs. Remove PR #6073 that incorrectly elevates all per-machine installs, breaking interactive per-machine installs. Closes #6425, #5468 Co-authored-by: Robert Patrick Co-authored-by: Kris Dages
@mmaietta i get that but the test framework already seems to have a mechanism (isMac, etc) to deal with that. The tests I saw failing were ones either looking for something in @develar ‘s GitHub space using the GitHub API that needed an API token or looking for something in S3 (that likely also needs a token). It would be great if we could either provide instructions for what tokens are required and how to provide them for the tests when running locally or mark those tests as CI-only tests so they don’t interfere with contributors trying to get feedback on their changes before submitting PRs. I would be willing to help if you all think it is something that should be done and are willing to help work toward that goal. |
Newer tests are leveraging electron-builder/test/src/ArtifactPublisherTest.ts Lines 86 to 91 in a945321
That should be enough for marking those tests effectively as CI-only, unless otherwise explicitly working on one of those env-specific tests locally, no? |
@mmaietta That sounds right but all that I can say is that |
I find a way to solve this problem:
these two step fixed my problem. |
When we move from electron-updater
latest
tonext
to pick up theautoInstallOnAppQuit
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:
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.
The text was updated successfully, but these errors were encountered: