nextcloud / desktop

💻 Desktop sync client for Nextcloud
https://nextcloud.com/install/#install-clients
GNU General Public License v2.0
2.97k stars 784 forks source link

[Bug]: updating client on Windows requires reboot no matter what. #5369

Open razorbackgeek opened 1 year ago

razorbackgeek commented 1 year ago

⚠️ Before submitting, please verify the following: ⚠️

Bug description

When updating the existing Nextcloud client on Windows 10 PC it will prompt for the update. During update, it will ask to close explorer, or you must restart PC. I let it close explorer automatically. Install finishes, requires reboot anyway. After several attempts at getting around this, including manually closing explorer before upgrading it still requires a reboot.

Steps to reproduce

1.Use the setup wizard to upgrade to current release. 2.Let it automatically close explorer, or you can manually close explorer. 3.A reboot is still required even though you took the steps to avoid reboot.

Expected behavior

The expected behavior is to not have to reboot after installing the update. This has happened on multiple updates all have required a reboot regardless of outcome.

Which files are affected by this bug

Client install package

Operating system

Windows

Which version of the operating system you are running.

Windows 10

Package

Appimage

Nextcloud Server version

23.0.1

Nextcloud Desktop Client version

3.6.6

Is this bug present after an update or on a fresh install?

Updated from a minor version (ex. 3.4.2 to 3.4.4)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

Nextcloud Server logs

No response

Additional info

No response

Xansala commented 1 year ago

Confirmed also from my side. This is the behavior for a couple of versions already.

farhills commented 1 year ago

Confirmed on my systems (windows 10 22H2) for the last few updates as well, 3.7.3 being the latest.

tstreibl commented 1 year ago

same on Windows 11 during installation of 3.7.4

r2evans commented 1 year ago

This is a running problem, including https://github.com/nextcloud/desktop/issues/4377 and others. I just confirmed it on 3.8. The problem was allegedly fixed in 3.5.4, though by the description I'm not certain if it was supposed to not require a reboot on 3.5.4 or after 3.5.4, but since I've seen "you must restart your system" every time I've upgraded, it seems to be a misunderstanding of the problem.

Please, can one of the devs (NC or volunteer) acknowledge the issue?

My concerns are at various levels of the process:

The only progress made over the last year has been to keep it from immediately/unavoidably rebooting the machine, which while a great step-forward, is only one of many steps to improve the user experience.

I truly understand that unless we're paying for a contract with NC, the fact that we're able to use the software at all is a liberty, not a right or entitlement. Thank you! I truly mean that. I feel though that many in the user-base that have meaningful bugs and UX issues are ignored so that (for instance) Hub 4 can be released tying into ChatGPT without going back to resolve system-rebooting problems from well before ChatGPT was a thing.

Please help me to understand why rebooting a system is considered necessary.

RoyalCyan commented 1 year ago

I had this exact bug for years. Currently I had to update to version 3.8.1 and it still required me to reboot my PC even after I consented to restarting explorer. I don't understand how is it still happening if it was supposed to be fixed in 3.5.1?

r2evans commented 1 year ago

@claucambra, you closed the previous issue #4377, do you know of other efforts to try to resolve this? I believe it is clear that the need for a reboot has not been resolved (it is not occurring spontaneously anymore, this is good).

ristein commented 1 year ago

I just updated to v3.8.2 and clicked on "Do not close applications, a reboot will be required." and when asked to reboot I clicked on "No" (aka "I will do it later") and the app seems to be working just fine without any force close explorer or reboot. another issue that has been active: https://github.com/nextcloud/desktop/issues/4305

r2evans commented 1 year ago

Nope, @razorbackgeek the bug still appears on one of my laptops. I'm happy that @ristein was able to experience a reboot-free upgrade, though!

I just booted up the computer and allowed NC to update to 3.8.2. The "just booted" comment is to reflect that nothing else was running. It complained about Windows Explorer being open, so I allowed it to close Windows Explorer (and attempt to restart). Unfortunately, when the upgrade was done, Explorer is not restarted, and I have the "You must restart your system for the configuration changes..." modal dialog.

This has been tracked and closed in #3551, #4305, and #4377 (at least) and while (as I acknowledged before) it no longer reboots spontaneously, the need for a reboot is still unavoidable.

I wonder if there's a security policy in Win11 (perhaps Win10) that is preventing NC from being able to shift libraries/executables with a running kernel.

ristein commented 1 year ago

I have the "You must restart your system for the configuration changes..." modal dialog

I also had that Dialog, I just clicked No.

munrobasher commented 1 year ago

My client and myself have had this issue since we started using NextCloud a few years ago. Consider the time impact of 50 people having to restart their computer... couple of minutes each?

r2evans commented 1 year ago

I have the "You must restart your system for the configuration changes..." modal dialog

I also had that Dialog, I just clicked No.

Yes, I see that too. Two other things:

  1. Earlier in the installation process, it said that "open applications had to be closed", including (and today, only) Windows Explorer. If I choose to not close the app, it says that "a reboot will be required" for changes to take effect. If I choose to close the app (and restart later), it never restarts the application(s) leaving me without a window-manager in Windows, requiring me to go to Task Manager and manually "Run new task" to get my windows desktop functional again. Both are "poor".
  2. Assuming I stopped the app (and therefore should not be required to restart), when it is done it then asks to reboot now or, if not, I will need to reboot manually for the configuration changes to take effect. There is no mention of which (if any) "configuration changes", and frankly I doubt that anything has actually been changed (full opacity of the installation/upgrade process), but it clearly insinuates that a reboot really is required even if it doesn't force you to do it.

As I said several comments earlier, the good news is that it no longer reboots spontaneously, and that issue was fixed a while ago. But it still states that a reboot is required. So either (a) a reboot is required, and all of these issues complaining about reboots are still valid; (b) the reboot is not required, and nobody has bothered to update the documentation and real-time dialogs; or (c) there are some corner-cases where a reboot is actually required, and either nobody knows when they are in effect or cares to notify the rest of us.

So the problem of "requires reboot" is still present, at least if you believe the dialogs. There are plenty of other (non-NC) applications/drivers that say similar things and give you the option to reboot now or reboot later, and often those are legitimate (and credible/believable) needs to reboot. But this? There has been no acknowledgement of the core issue. If it's not required, don't say it. If it is, please make it not required or clearly explain why.

tsa96 commented 1 year ago

I really can't emphasise enough how annoying this is, to the extend I'm considering just uninstalled the desktop software and only using the web interface.

If there's a genuine reason a reboot is required (especially given how rare it is for software to need to do this nowadays), a short sentence as to why in the update dialogue would help, along with removing the phrasing about "maybe" rebooting. I'm not going to run an update if it's going to restart my computer whilst I'm in the middle of working, nor if it's "maybe" going to restart my computer. If anything that feels even worse!

geirawsm commented 1 year ago

Updated to 3.9.0 just now. Got the same "restart-bug" despite allowing it to close Windows Explorer.

budzi-2bi commented 1 year ago

I also have the same problem, I just updated to 3.9.3 and it complained that it needs to close explorer.exe (did this for the last few automatic updates). Good thing is that you can refuse to close the apps, and then refuse to restart the computer (it all works ok from what I can see) but it is still very annoying.

Tegenwind commented 1 year ago

My experience is slightly different, in that if I consent it to close explorer, it does not actually reboot my computer, but won't re-open explorer.exe after finishing the installation. This leaves an end-user with an empty desktop that requires the know-how to manually start explorer.exe from there.

I've been using the options "Do not close explorer" and "restart later" for quite a while now and everything seems to work normally without rebooting, raising the question if both given options are actually necessary at all.

I've been on Windows 11 since last year, but I think my experience on Windows 10 was exactly the same before that.

bmercernccer commented 1 year ago

Same experience with Windows 10 just now. I don't understand the need for a reboot, as I know other shell integrations don't require one, but if this is an unresolvable limitation, can we at least provide more honest user instructions and say that a reboot will be required? Having to go through the disruptive process of closing and restarting Explorer, only to be told I have to reboot anyway makes me feel like my time has been wasted.

munrobasher commented 1 year ago

One suspects the installler is re-writing all the files which is what triggers a reboot. Surely it should be possible to do an update of the changes files which might just require the client to be restarted? Without delving deeply into the source code, I'm of course guessing.

useross commented 9 months ago

Same here. Nowadays, restarting the PC is no longer state of the art. I have also seen, that there have been multiple issues during the last years #5166 #5251 #3551 and some more.

Is it possible to fix this and write some unit-tests, to prevent breaking this fix again? In case of the fix including some good unit-tests work pretty well, i will spend 100 €.

castillo92 commented 9 months ago

The problem continue in Nextcloud CLient v3.11

Setup Wizard request close Explorer.exe and then try to launch again, but this not occurr. And final step of setups, it prompt restart.

To avoid this bug, I always not close Explorer.exe and not restart. It works, but I keep on mind some day could break some funcionalities, like File Explorer integration, until a reboot occurs.

Setup Wizard - Request close

Clonkex commented 8 months ago

Why does it need to restart Explorer at all? Other shell integrations manage to update seamlessly without restarting Explorer let alone the entire computer, so what is Nextcloud doing so wrong? Owncloud didn't have this problem when I was using that a year ago. It warned me it was about to ask for admin permissions to update, asked for admin permissions and then updated quietly in the background. No restarting of anything. I almost never update Nextcloud because it's such a pain to do.

munrobasher commented 8 months ago

It's very annoying still and the latest v3.11.0 has caused nightmare problems with a handful of upgrades. It was stuck synchronising something (can't tell as client was not responding) and worse, caused File Explorer to not respond either. It required turn off of folder redirection, uninstall (and reboot), install (and reboot), logon and wait for initial sync. The reboots just made this entire experience even more annoying and time consuming. To give an idea of how annoying, the client has raised a ticket with me to look at replacing Nextcloud with something else. Not hearing from the devs as to why this issue cannot be resolved doesn't give you a warm feeling.

dustojnikhummer commented 7 months ago

Why does it need to restart Explorer at all? Other shell integrations manage to update seamlessly without restarting Explorer let alone the entire computer, so what is Nextcloud doing so wrong? Owncloud didn't have this problem when I was using that a year ago. It warned me it was about to ask for admin permissions to update, asked for admin permissions and then updated quietly in the background. No restarting of anything. I almost never update Nextcloud because it's such a pain to do.

From my experience, it doesn't. If you tell it to just do it anyway without restarting Explorer it still works.

r2evans commented 7 months ago

Interesting points, both from @Clonkex and @dustojnikhummer. I feel like this may no longer be an issue technologically, so if they just removed the warning and kill_explorer.exe function (my name), everything would continue to work unabated. They could finally close this issue and all of the other related issues (whether still-open or incorrectly-closed).

I agree with "almost never update", it's such an unnecessarily-disruptive experience that I cringed whenever the update process started for whatever reason. The user-experience should never be this disruptive.

munrobasher commented 7 months ago

I've been asked to go in to one of my clients to "Talk about IT". They use Nextclient and I know that replacing it is on the agenda for discussion - the disruption caused by frequent updates/restarts is one of their gripes. Plus the millisecond Excel bug which is still not fixed.

tomsik-radek commented 7 months ago

Interesting points, both from @Clonkex and @dustojnikhummer. I feel like this may no longer be an issue technologically, so if they just removed the warning and kill_explorer.exe function (my name), everything would continue to work unabated. They could finally close this issue and all of the other related issues (whether still-open or incorrectly-closed).

I agree with "almost never update", it's such an unnecessarily-disruptive experience that I cringed whenever the update process started for whatever reason. The user-experience should never be this disruptive.

I don't even mind the explorer pop-up (assuming it would be fixed so Explorer started properly), but the "you need to reboot" prompt after that just needs to die.

r2evans commented 7 months ago

@tomsik-radek , I wonder if that's really needed? What if we don't kill explorer (i.e., the installation's "will need to restart later") and choose to not restart. Is anything not working? (Sry, no longer using windows on my personal laptop.) I wonder if this is all about aesthetics, and NC just hasn't cleaned up the #techdebt to remove the annoyance modals?

tomsik-radek commented 7 months ago

@tomsik-radek , I wonder if that's really needed? What if we don't kill explorer (i.e., the installation's "will need to restart later") and choose to not restart. Is anything not working? (Sry, no longer using windows on my personal laptop.) I wonder if this is all about aesthetics, and NC just hasn't cleaned up the #techdebt to remove the annoyance modals?

I got the pop-up earlier today. Let it kill explorer (didn't start again, strike 1 for normal users) and asked me to reboot. I didn't, and it has been working for around 5 hours now. But I'm also a very light user, so maybe I just didn't encounter a potential issue. Either way, standalone apps like nextcloud shouldn't need a reboot. If some files are held by the OS, create a second process, stop nextcloud, overwrite files, and then start it again.

r2evans commented 7 months ago

Okay, perhaps somebody else on this channel can try it next time?

When you update the Windows nextcloud client, try to not kill explorer.exe, and not reboot.

Once that is done, keep working as long as you can tolerate (hours, maybe a few days), and then comment back here with: (1) confirmation that you did not kill explorer and did not reboot; (2) files-sync still works; (3) explorer extensions like context-menu and VFS still works; and (4) please include your time-since-NC-update.

ristein commented 7 months ago

@r2evans as I said 9 months ago, this is working fine, I am doing it like this since then, no issues

Clonkex commented 7 months ago

I have been doing exactly that. Not letting it kill explorer, not restarting the PC, and it works fine. I very rarely restart my PCs (work or home) because I always have tonnes of things open (including explorer windows, so any attempt by NC to restart explorer is a no-go for me). That fact that I rarely restart my PCs also indicates that NC has continued working fine for a long time after updating without restarting anything.

I updated NC just now in order to test, and can absolutely confirm it's working perfectly without restarting anything.

The whole thing just feels really jank. Why do I have to tell it twice not to restart explorer? Why do I have to see the installer at all? Why does it put an icon on my desktop every single time?

I honestly still don't get what's so special about NC. Literally no other file-syncing software is as intrusive as NC when it comes to updates. I've used OneDrive, Google Drive, Dropbox, OwnCloud and NextCloud. Out of all of them, OwnCloud and NextCloud are the only ones to require any user interaction whatsoever to update (OC asks for elevated permissions), and NextCloud is the only one that requires me to explicitly click through an installer and decide whether to restart explorer or my computer.

munrobasher commented 7 months ago

I don't think you'll get any disagreement from any IT support or end user on this one. Just needs fixing please Nextcloud! If there is some file that is intrinsically linked into explorer.exe like this:

explorer.exe -> nextcloud.exe

Then can't this be changed to:

explorer.exe -> nextcloudstub.exe -> nextcloud.exe

And nextcloudstub.exe never changes? Maybe I'm not getting it...

farhills commented 7 months ago

@claucambra @allexzander

Apologies for the direct ping, but I think this issue needs to be acknowledged by the dev team (even if the solution is blocked for whatever reason). I've been subscribed to this particular issue for a year, and previous issues on the topic go back to 3.4 or earlier (3+ years).

Most of us in the discussion here are admins in some capacity, but the issue touches every single Windows user. My site has 6 users, and it's a battle to have them update Windows and restart their machines once a week (or four). Keeping the NC clients up to date with the current reboot headaches has been virtually impossible.

But if the answer is 'won't fix' or 'can't fix', then we'll respect the decision and move on with life. Please give us closure! 😃

Thanks!

munrobasher commented 7 months ago

Agreed... I've only got two clients with Nextcloud and I suspect that during the "special meeting" I've been asked to attend next week, we'll be taking Nextcloud out. Which is sad but one can only wait so long.

r2evans commented 7 months ago

@razorbackgeek, would you consider editing your initial issue post with a note to say that the consensus is currently "don't kill explorer, don't reboot, all works fine"?

@farhills and "this particular for a year": for the record, there are other issues (closed, many with no resolution) for the same problem. This issue covers multiple years. https://github.com/nextcloud/desktop/issues/831, https://github.com/nextcloud/desktop/issues/3551, https://github.com/nextcloud/desktop/issues/4377

tomsik-radek commented 7 months ago

I have been doing exactly that. Not letting it kill explorer, not restarting the PC, and it works fine. I very rarely restart my PCs (work or home) because I always have tonnes of things open (including explorer windows, so any attempt by NC to restart explorer is a no-go for me). That fact that I rarely restart my PCs also indicates that NC has continued working fine for a long time after updating without restarting anything.

I updated NC just now in order to test, and can absolutely confirm it's working perfectly without restarting anything.

The whole thing just feels really jank. Why do I have to tell it twice not to restart explorer? Why do I have to see the installer at all? Why does it put an icon on my desktop every single time?

I honestly still don't get what's so special about NC. Literally no other file-syncing software is as intrusive as NC when it comes to updates. I've used OneDrive, Google Drive, Dropbox, OwnCloud and NextCloud. Out of all of them, OwnCloud and NextCloud are the only ones to require any user interaction whatsoever to update (OC asks for elevated permissions), and NextCloud is the only one that requires me to explicitly click through an installer and decide whether to restart explorer or my computer.

Yes, I forgot about the icon. That one is also annoying. Surely there has to be a silent installer for Nextcloud, right? (I install mine through Winget) so update through those.

farhills commented 7 months ago

I did some snooping around, it looks like there may be some hope. #6003 was assigned 3 weeks ago, and is on the dev roadmap for 2024 Spring. I'd suggest following that issue as it seems to be the most likely solution for us right now.

RegisPerdreau commented 2 months ago

Hi, I think the bug or lack of functionality is still pending. With version 3.13, windows 11, the Nextcloud installer asks to close Explorer and Nextcloud Desktop and can't close both even if the previous version is 3.12.5. So the last choice is to reboot as usual.