Skip to content
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

Do not require restarting the PC after installing with MSI installer #3551

Closed
allexzander opened this issue Jul 15, 2021 · 63 comments
Closed
Assignees
Labels
enhancement enhancement of a already implemented feature/code feature: 📥 install and update

Comments

@allexzander
Copy link
Contributor

How to use GitHub

  • Please use the 👍 reaction to show that you want to have the same feature implemented.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Feature description

Rebooting PC after installing the Nextcloud desktop client is really overkill.

MSI can be scripted to kill and run a process without restarting. Since we need to restart only just to allow Explorer.exe to reload and initialize context menus and overlay icons, we can simply kill it and run again it when the shell extension installation is complete.

@allexzander allexzander added the enhancement enhancement of a already implemented feature/code label Jul 15, 2021
@allexzander allexzander self-assigned this Jul 15, 2021
@github-tomster
Copy link

really kill explorer.exe 😿
https://docs.microsoft.com/en-us/windows/win32/rstmgr/about-restart-manager
do a graceful restart of explorer.exe 🤷🏻‍♂️

@eibex
Copy link

eibex commented Mar 19, 2022

Now Nextcloud doesn't even ask if you want to restart, it just does forcefully.

@nroach44
Copy link

Yep, can confirm that when upgrading through winget, or the "we need to update" prompt, a restart is unceremoniously triggered without ANY warning.

This is very user hostile - giving us no warning is completely unacceptable.

Please consider:

  • Restarting explorer gracefully (instead of killing it and failing to start it like 3.4.x did)
  • Giving 60+ seconds of restart warning
  • Not performing the application upgrade until the next restart (like Windows update does)
  • Notifying us that a restart is needed
  • Logging out the current user instead of restarting the whole damned computer and leaving us to potentially deal with any dual-boot or other issues (see bitlocker with a PIN) that may ensue from that?

@allexzander
Copy link
Contributor Author

allexzander commented May 14, 2022

@eibex @nroach44 Nothing's been changed in terms of installation for a while. How do you trigger the installer? Via command line? Could you provide more info on how to reproduce this?
In fact, we do not control the popup as of now, it is a standard action performed by Windows. Somehow it may have decided to not provide it. Weird. Need more info.

Just double-checked after reading this, and the prompt is still there in 3.5.0...
image

@eibex
Copy link

eibex commented May 14, 2022

I am on Windows 10 and update by clicking the button on the settings page of Nextcloud. I have never used the command line/powershell to update the program.

The pop-up started appearing after v3/v3.1 as far as I can remember.

@nroach44
Copy link

@allexzander
I started NextCloud and it popped up saying "an update is about to start..." so I clicked through and then suddenly the machine just rebooted. On the other case, a winget upgrade --all downloaded and installed the MSI and the same thing happened.

The process msiexec.exe has initiated the restart of computer $COMPUTER on behalf of user NT AUTHORITY\SYSTEM for the following reason: No title for this reason could be found
Reason Code: 0x80030002
Shut-down Type: restart
Comment: The Windows Installer initiated a system restart to complete or continue the configuration of 'Nextcloud'.

@nroach44
Copy link

One thing to note is that at no point was I prompted for the reboot, so this may only happen on "silent" upgrades.

@nroach44
Copy link

nroach44 commented May 14, 2022

Logs:
Log: Application
Source: RestartManager
Type: Warning
Application 'C:\Windows\explorer.exe' (pid 2180) cannot be restarted - Application SID does not match Conductor SID..

Source: RestartManager
Type: Information
Machine restart is required.

Source: RestartManager
Type: Error
Application or service 'Windows Explorer' could not be shut down.

Source: MsiInstaller
Type: Information
Windows Installer requires a system restart. Product Name: Nextcloud. Product Version: 3.4.4.20220318. Product Language: 1033. Manufacturer: Nextcloud GmbH. Type of System Restart: 1. Reason for Restart: 2.

Source: MsiInstaller
Type: Information
The Windows Installer initiated a system restart to complete or continue the configuration of 'Nextcloud'.

@allexzander
Copy link
Contributor Author

@eibex @nroach44 I see, so it's the installer that gets started automatically during the autoupdate. In my scenario, it was an MSI file that I started manually. Thanks for the details.

@eibex
Copy link

eibex commented May 16, 2022

@allexzander I should have mentioned that specifically for 3.4.4 to 3.5.0 I manually started the MSI file (as I outlined in #4506) and the pop-up still appeared. I cannot now remember whether the computer restarted by itself even if I pressed "No", but I believe it did as mentioned in a few other bug threads.

@eibex
Copy link

eibex commented May 18, 2022

For 3.5.1 no pop-up appeared, but the computer rebooted without asking for anything

@allexzander
Copy link
Contributor Author

@eibex @nroach44 Indeed, the issue is annoying and is quick to fix. It's done now in #4566, however, expect the force reboot to be removed when updating from the next patch 3.5.2 to the subsequent 3.5.3 a, the parameter that prevents force reboot is added into an MSI and is also added into a calling code of the running desktop client.
TL;DR; Expect the reboot issue to be fixed after updating to 3.5.2 and onwards.

@SommerEngineering
Copy link

@allexzander Okay, thanks for your explanation 🙂 So, it was expected that today, when I updated 3.5.1 to 3.5.2, the forced reboot happend once again? But next, when the update 3.5.3 gets released, it should not happen again?

@eibex
Copy link

eibex commented Jul 29, 2022

Forced reboot happened while upgrading from 3.5.2 to 3.5.3

@nroach44
Copy link

Can confirm:
Windows Installer requires a system restart. Product Name: Nextcloud. Product Version: 3.2.4.20210706. Product Language: 1033. Manufacturer: Nextcloud GmbH. Type of System Restart: 1. Reason for Restart: 2.

@allexzander
Copy link
Contributor Author

@eibex @nroach44 My bad. Apparently, this was not backported :(

Likely, we won't have any more bug-fix releases for 3.5, so, the fix will be available in 3.6.1.

@Kraligor
Copy link

Just my two cents, but you should really, really consider breaking procedure and implement it as emergency fix. It doesn't look like a huge issue from a technical POV but if I were your service manager I'd probably categorize it as critical because behavior like that has the potential to seriously hurt Nextcloud as a brand. Especially when users (who typically don't browse incident reports) are forced to experience it over and over again.

@markusdd
Copy link

I totally agree.
I had people coming back to me, being furious, because they had their PC restarted in the middle of a call or had their work interrupted.

There is >zero< justification doing that for something like Nextcloud. No one expects that.

@ghost
Copy link

ghost commented Jul 30, 2022

I totally agree. I had people coming back to me, being furious, because they had their PC restarted in the middle of a call or had their work interrupted.

And rightfully so. Just that it is not even your fault, but Nextcloud's.

I am seriously puzzled by who decided that a forced reboot is a good idea for a software that they want to be used in production environments. We might simply be annoyed, but deal with it. People who are not as tech-savvy and just want to work associate Nextcloud with trouble by now as this has been happening for several updates.

Regaining trust is tough... An emergeny fix would be a first step.

@tflidd
Copy link

tflidd commented Dec 18, 2022

Still see the "issue" on a machine on Windows 10 Pro, NC Client 3.6.2->3.6.4 it asked to restart explorer.exe and after the installation it even asked to reboot the system (or dalay to do it later). I think it said it was a MSI-Install-Package...

I manage to update certain things like sync clients when I reboot anyway.

@hristian-carabulea
Copy link

Updated to Version 3.9.0. I had to reboot PC, that is I had to close all my open applications and stop what I was doing.

Can you finally stop this aggressive behavior of Nextcloud updates or I have to dump it? Megasync or Onedrive will suffice for me. I do not necessarily need to use storage on my own server any longer.

Thank you.

@markusdd
Copy link

yup. it is absolutely beyond me why nextcloud still prompts for reboots.
for this type of applications this makes 0 sense. This is a folder sync app, not a Kernel update.

100% the biggest annoyance right now.

@captainwasabi
Copy link

Not a nextcloud dev, but I think I can explain this. Under certain circumstances the shell overlays (the little green checkboxes) that are displayed on the file icons will not refresh properly until you reboot. Just select "reboot later" and it's always worked for me. IIRC this is a M$ thing that has been a loooooong standing issue (so long that guaranteed it'll never change).

@Magneticdud
Copy link

Updated to Version 3.9.0. I had to reboot PC, that is I had to close all my open applications and stop what I was doing.

Can you finally stop this aggressive behavior of Nextcloud updates or I have to dump it? Megasync or Onedrive will suffice for me. I do not necessarily need to use storage on my own server any longer.

Thank you.

It's NOT the same bug. I just tried it. It asked "do you want to reboot? Yes/No", and it's possible to click No if you don't want it.

The original bug instead was "forced reboot without even a warning to the user"

@hristian-carabulea
Copy link

OK, thanks.

@gbakeman
Copy link

Anyone think this is worth another issue/investigation into? I thought the issue just boils down to restarting the shell (kind of a hack?) I think I've seen installers do this as efficiently as possible by offering to kill explorer.exe and restarting it. That looses any open explorer windows but still better than a full logout or reboot. I don't know if there's any better-practice way of doing this.

@Magneticdud
Copy link

Magneticdud commented Jun 15, 2023

It already asks to kill explorer.exe and if you deny it suggests a reboot

edit: yesterday on a windows 11 pc it did that, today on another windows 10 pc, it did not prompt to restart explorer, just to reboot

@markusdd
Copy link

Wrong. Even with explorer restart it does suggest the reboot.

At least that should be fixed.

@Magneticdud
Copy link

Wrong. Even with explorer restart it does suggest the reboot.

It suggests and asks for a reboot, which can be conveniently denied by the user.

This issue is not related, as it was about a forced reboot without a confirmation or even a warning, at the time it just rebooted.

@markusdd
Copy link

It should not be doing that nonetheless.

I think what people obviously do not wish to understand is that this is a HUGE irritation for the average user.

It is affecting nextcloud in ways Devs do not seem to want to understand.
To me it is merely an annoyance and chance for an inconvenient misclick.

I think the fundamental problem is that this behavior overall has to end, as I thionk even relaunching explorer is a bad solution.
If nextcloud is to be the european counterpart to google drive, iCloud and Dropbox, (which I think is maissively and critically important) it has to strive for the same convenience and user experience.

My little self hosted home setup does not matter, but I have experience with on-prem hosted nextcloud installs for hundreds of people and this update process is the NUMBER ONE problem people have with nexctloud.

This imho needs attention before almost anything else when it comes to the windows client.

@platima
Copy link

platima commented Jun 15, 2023 via email

@Magneticdud
Copy link

are you seriously comparing a free product made by 50 employees and many volunteers to a paid product coded by a corporation with 165000 employees and an annual revenue of $400 billion?

Apple/Google/Dropbox have the resources to test all the quirks that can happen if you don't restart explorer.exe

btw, if you click on "yes, you can reboot", then you can't complain "the computer did exactly was it was told"

@platima
Copy link

platima commented Jun 15, 2023 via email

@markusdd
Copy link

are you seriously comparing a free product made by 50 employees and many volunteers to a paid product coded by a corporation with 165000 employees and an annual revenue of $400 billion?

Apple/Google/Dropbox have the resources to test all the quirks that can happen if you don't restart explorer.exe

btw, if you click on "yes, you can reboot", then you can't complain "the computer did exactly was it was told"

See, and this answer is why we can't have nice things.

As if Google Drive is maintained by 165k people. I would not be surprised if the core team for Google Drive is smaller than nextclouds.

Also: Nextcloud is a paid appllication when used by corps and I personally had a setup under my fingers where we paid for 200+ seats.

The issue is that nextcloud behaves as it wants to take on the whole world, but does not get the basics right.
See Nextcloud Talk, which is an attempt to go at Teams, Zooms etc. . You wanna know how many people work on that?

Stop working on new features, but concentrate on what the app is really needed for. And for 95% of people this is well synced, convenient cloud storage. With a client that does not behave like WIndows 95 that needed a reboot when you plugged in a USB device.

I am seriously cheering for NC and I recommended this project to everyone and have always suggested to pay for support or donate to move it forward.

But if the answer to critical feedback like this is nothing but excuses, then I cannot help it.
I contribute to open source where I can, but I am a hardware dev. I cannot help with codebases like this.
The only thing I can do is donate, spread the word and give feedback. If the latter is not wanted, ok fine.
But the the EU will once again remain without critical stuff like this and we depend on the US and the Chinese.

@nroach44
Copy link

To bring this back on-topic (albeit on a bug that has been fixed), the issues that I see with updates on the Windows agents are

  • Updates are completely interactive. Can they be done in the background somehow? Can some kind of A/B system (see Chrome, Android) be set-up?
  • The Shell extension isn't (cannot be?) unloaded prior to removing the file from disk. Can it be? If not, can we upgrade the file and just leave it until explorer restarts?
  • MSI (?) determines that the only way to handle the shell extension issue is a reboot.
  • The reboot prompt may steal focus during typing and cause an unintended action to occur. Probably MSI again.
  • When the update offers to restart explorer, it leaves it closed, and / or still requires a restart regardless. Can this be smarter, or can it only require a log out and back in? I'm aware that this is probably handled by MSI at the moment.

At this point I'd make the argument that while MSI is nice for integration from the sysadmin's perspective, but it really seems to be forcing undesirable behaviours.

A workaround may be to schedule the MSI install (through task scheduler?) when no users are logged in or before shutdown. This would require less work than swapping out the installer entirely, but would obviously be a stop-gap.

@allexzander how fixable are some of these issues? I'm not so phased about them myself because I'm technical and used to them, but I know non-technical people who are driven up the wall by these behaviours.

@captainwasabi
Copy link

So I install and refuse the reboot and have NEVER had a problem and it may be days before I actually reboot. (potentially until M$ Update forces it in the middle of the night then tries to pretend it didn't)

The part about the installer stealing focus and unintentionally allowing a reboot is a problem that a million other apps have (I'm typing along and thunderbird pops up a notification, all my typing after it popped up is gone to the ether.) This happens all the time. Is it annoying, yes. If the installer would make not allowing the reboot be the default that would be great. Changing the message at the beginning of the install to EMPHASIZE to NOT work on anything else while the install is in progress would be 100% acceptable (This is what I do anyway, this is what everyone should always do with ANY installer or any other program that escalates privs. While the privs are escalated it can watch what you are doing).

@platima
Copy link

platima commented Jun 15, 2023 via email

@ChrisMagnuson
Copy link

I have recently started installing the windows client on our computers at the office to migrate from using older style file shares but having each of our user's have to reboot each time there is an update is not good which has so far been the case with each update.

Maybe this isn't always the case with every update, will have to see over time but this is really rough, prompting for the update isn't great but I can give that a pass as other applications do that as well but requiring a reboot after each update is a really bad workflow.

@captainwasabi
Copy link

@ChrisMagnuson I ALWAYS say no. The reboot, afaik, is just to refresh the icon overlays because the MIGHT need it. I have never had a problem.

@kleajmp
Copy link

kleajmp commented Aug 28, 2024

@ChrisMagnuson & @captainwasabi
Indeed the demanded restart was never necessary for me ether, the developers should leave that question out.
Sometimes the updater has a problem closing "explorer.exe" but in that case I have to close it manually with a taskmanager or the update just doesn't go trough. Then I would see no need for a restart after

@SamSirry
Copy link

the developers should leave that question out.

Please feel free to open a new issue for this, so that your request can be tracked.

My personal opinion is that giving the user the option to decide is OK for now.
The setup asks for rebooting because hot-replacing a library that's being used by Explorer is not possible.
Ignoring the question might work without issues. Also logging out/in may work in most situations, but rebooting produces successful results 100% of the time. (For a free popular product, providing support could be overwhelming, hence, it's better to ask to reboot).

@q-wertz
Copy link
Contributor

q-wertz commented Aug 30, 2024

@SamSirry I don't know much about the Windows process, but there are two "restarts" that are asked for during the upgrade:

  1. Restarting explorer (which I always confirm)
  2. Restarting PC

Isn't 1. enough as in my understanding this "fixes"

The setup asks for rebooting because hot-replacing a library that's being used by Explorer is not possible.

@captainwasabi
Copy link

@kleajmp Basically the question and alerts are there so that if you DO have a problem when you upgrade you do remember that a reboot is going to fix it, rather than calling tech support. Yes yes, 90% of people are just gonna call IT anyway, and IT has an 80's era phone answering machine that just says "Have you tried turning it off and on again?" over and over and over again.

This whole issue started because it WASN'T asking to reboot, It was just rebooting. That problem is solved in a 100% satisfactory way. The rest of this I just nonsense. You can always open an issue and submit a PR and see if it flies.

@Kraligor
Copy link

@captainwasabi Satisfactory, yes. 100%, no. For my personal taste, it's still too intrusive. Nobody needs a reboot--yes/no prompt. Just give me a pop-up telling me "Please reboot Windows at the earliest convenience.--OK". I don't want an app to reboot my computer at all. 90+% of cases will be users who have other applications open and need to close them before restarting, making a "convenient" yes/no prompt the exact opposite. They might accidentally click Yes and lose data (or just hit Enter--the focus is on Yes by default if memory serves), at a minimum they will feel pressured to do a restart that would be unneccessary in most cases.

@ChrisMagnuson
Copy link

ChrisMagnuson commented Sep 14, 2024 via email

@Poikilos
Copy link

Poikilos commented Sep 14, 2024

I suggest kindly upvote #5251 since though the MSI has a confirmation now, it still says it must reboot always.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement enhancement of a already implemented feature/code feature: 📥 install and update
Projects
None yet
Development

No branches or pull requests