desktop
desktop copied to clipboard
[Bug]: Network Error on wake from sleep
⚠️ Before submitting, please verify the following: ⚠️
- [X] This is a bug, not a question or a configuration issue.
- [X] This issue is not already reported on Github (I've searched it).
- [X] Nextcloud Server and Desktop Client are up to date. See Server Maintenance and Release Schedule and Desktop Releases for supported versions.
- [X] I agree to follow Nextcloud's Code of Conduct
Bug description
Nextcloud client sends a "Network Error" desktop notification when I wake my computer from sleep.
I believe this is caused by client trying to connect while Windows is still re-establishing network connectivity, which causes DNS queries to fail.
Steps to reproduce
- Install and configure the client
- Send the computer to Sleep
- Wake the computer
- You should receive a notification like this
- However everything still works just fine in maybe a minute
Expected behavior
Client should not throw an error in such scenario: this is a temporary error and everything will work just fine if system is given another 5-10 seconds to re-establish network connectivity.
Which files are affected by this bug
None
Operating system
Windows
Which version of the operating system you are running.
Windows 10 22H2 (19045.3930)
Package
Other
Nextcloud Server version
27.1.6
Nextcloud Desktop Client version
3.12.0
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 3.3.6 to 3.4.0)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
Are you using an external user-backend?
- [X] Default internal user-backend
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Nextcloud Server logs
No response
Additional info
No response
Desktop client logs
Confirmed. I have the same issue here on 3.12.0. My network card: Intel I219-V, Win10x64 22H2 fully updated. I connected to router via cable, so there is no Wifi issues here. I suppose network card can't get IP address immediately after awake. It needs couple of seconds for speed auto-negotiation and to get IP. Is it that Nextcloud detects there is no internet during that time? This error isn't raised in previous client versions.
Yup, got RTL8125 here, about 15m run to the router and get IP and DNS via DHCP. I think setting static network config would resolve the issue. Maybe disabling auto-negotiation and hard setting speed to 1Gbps would improve things (NIC supports 2.5G, router is 1G). And I bet laptop users see the same error.
I saw the error since about 10 to 14 days ago. On my laptop there was a new Nextcloud installation, so the newest client was installed. On my main tower computer the same message occured since a few days ago, possibly after an automatic update of the client.
I do not leave my computers running but put them in standby, so naturally they will restart / wakeup in no time with an already running Nextcloud client, but the internet connection might need 5 to 10 seconds, especially with WiFi. Even with an Ethernet direct connection the Nextcloud client calls an error immediately after waking up from standby.
This is a regression because I cannot recall having this error (or that much occurence) previously. Or maybe the client was always that quick with the status but never issued a system notification? Either way, a little extra verification like “was the computer just woken up from standby? If so, wait 15 seconds before alarming everyone about nothing” would be great.
“Just … wait, relax a bit” – you would say to any normal impatient person. Except this is impatient software.
...still occures with Nextcloud Desktop-Client 3.12.1 never happened on Release 3.11.1
...still occures with Nextcloud Desktop-Client 3.12.1 never happened on Release 3.11.1
same for me
This also happens in Linux, in this case Fedora 39. Nextcloud client version 3.12.1. On wake from sleep I get 2 network error notifications, one for each account I presume. So annoying. A second or two later after wifi connects the client works normally.
I am also experiencing this bug in client version 3.12.3 on Arch Linux. Every time the system starts, wakes from sleep, or I am connected to a network that cannot reach the Nextcloud server, the client creates desktop notifications about network errors. This did not happen in previous client versions.
I would rather have the option to disable network error messages entirely if they are going to be this verbose and misleading. Network connections may not be available at all times and the client should not assume that a missing network connection is an unusual situation. I would much prefer a notification if sync had not occurred in several days or something similar.
This also happens in Linux, in this case Fedora 39. Nextcloud client version 3.12.1. On wake from sleep I get 2 network error notifications, one for each account I presume. So annoying. A second or two later after wifi connects the client works normally.
Same for me.
Instead of disabling these notifications, I'd like to propose a shift to this logic:
- Notifications are issued only after Nextcloud Client lost connection and did not succeed to re-establish the connection for a reasonable timespan (say; 60 seconds). A user-configurable timespan would be nice.
- After a connection has been re-established successfully, Nextcloud Client removes the corresponding notification from the notification stack.
- Errors affecting multiple Nextcloud accounts are combined into a single notification.
My impression: the client always needed some time to pick up the connection after resume from sleep. But until 3.12.0 or 3.12.1 the only symptom was that it took around 30 sec. for the taskbar icon to become green. For us, that is no problem at all. Nobody manages to edit and save a document in the first 30 sec. after resume. So the only new behavior is the insistent error notification. It worries and irritates my end users and doesn't help with getting Nextcloud accepted. BTW I used MS 365 until 2 years ago and the OneDrive client also needed 20-30 sec. after resume from sleep.
I think @willemb2 is spot on - we really just need a way to disable these notifications.
As a workaround, we can completely disable the notification popups in the system settings, if we don't rely on some of them.
For example on Gnome Desktop:
Similar observed on macOS.
The 3.13.0 update renamed the notification from 'Network error' to 'Connection issue' but did not solve it :( I found a way to speed up the reconnect after resume from sleep: go to Settings, Network and quickly switch to 'no proxy' and back to 'system proxy'. It starts synchronizing immediately!
The 3.13.0 update renamed the notification
Maybe slightly more accurate, but does not resolve the issue. In the meantime I have simply disabled Nextcloud notifications at the desktop environment level. Which seems like an extreme solution, but it at least removes the misleading errors from the client.
I can reproduce it on Fedora Linux running on a laptop when it wakes up from sleep.
Similar observed on macOS.
I can confirm this on MacOS as well. This is quite annoying if Nextcloud is used on a mobile computer.
I have the same issue with the latest nextcloud desktop on windows and linux systems when resuming from standby. Does also happen sometimes when the system is roaming between wifi access points in areas with poor signal coverage and/or switches between wifi and cellular data for it's internet connection.
It's not mission critical but it's very annoying and turning off the notifications completely is not an option for me. I'd still like to have the nextcloud client to notify me when the connection is lost for a longer period of time. Whenever a sync is due because of locally modified elements, the notification can still be displayed with no delay. In every other case it's completely sufficient to silently retry connecting and delay this notification for a few minutes in my opinion.
Same here, Linux Mint (Ubuntu based). It was not the case in older versions. This is a bug that has been introduced perhaps 6 months back or so.
I don't get it why nobody takes care of this. Personally I just decided to stay at 3.11.2 until this is fixed. 🤷♂️ Maybe not the best decision regarding security but those notifications were just too annoying.
@Zaxooy I'm not famiar with the Github workflow either, but from the messages above I understand that @camilasan is working on something.
I think there are 2 issues that play a role here:
- The client needs unnecessary long time to recover from sleep/standby. This is 3,5 year old bug #4084 . That was never fixed, it was just closed by a github bot. I can still make it reconnect sooner by switching the proxy setting in the first 30 seconds after resume.
- A notification that was introduced late 2023 or early 2024 that comes too early.