desktop icon indicating copy to clipboard operation
desktop copied to clipboard

[Bug]: Network Error on wake from sleep

Open Genda1ph opened this issue 1 year ago • 19 comments

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

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

  1. Install and configure the client
  2. Send the computer to Sleep
  3. Wake the computer
  4. You should receive a notification like this image
  5. 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

nxc-error.zip

Genda1ph avatar Feb 24 '24 21:02 Genda1ph

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.

SerjPo avatar Feb 24 '24 22:02 SerjPo

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.

Genda1ph avatar Feb 25 '24 08:02 Genda1ph

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.

qwertfisch avatar Feb 28 '24 15:02 qwertfisch

...still occures with Nextcloud Desktop-Client 3.12.1 never happened on Release 3.11.1

samfuin avatar Mar 07 '24 18:03 samfuin

...still occures with Nextcloud Desktop-Client 3.12.1 never happened on Release 3.11.1

same for me

dsebire avatar Mar 11 '24 12:03 dsebire

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.

dominalien avatar Mar 28 '24 05:03 dominalien

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.

electrickite avatar Mar 29 '24 03:03 electrickite

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.

ColiZei avatar Mar 29 '24 07:03 ColiZei

Instead of disabling these notifications, I'd like to propose a shift to this logic:

  1. 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.
  2. After a connection has been re-established successfully, Nextcloud Client removes the corresponding notification from the notification stack.
  3. Errors affecting multiple Nextcloud accounts are combined into a single notification.

veitw avatar Apr 01 '24 22:04 veitw

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.

willemb2 avatar Apr 07 '24 13:04 willemb2

I think @willemb2 is spot on - we really just need a way to disable these notifications.

electrickite avatar Apr 07 '24 14:04 electrickite

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:

nextcloud-settings

mcnesium avatar Apr 08 '24 08:04 mcnesium

Similar observed on macOS.

jlfranklin avatar Apr 21 '24 14:04 jlfranklin

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!

willemb2 avatar Apr 29 '24 21:04 willemb2

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.

electrickite avatar Apr 30 '24 00:04 electrickite

I can reproduce it on Fedora Linux running on a laptop when it wakes up from sleep.

eldar avatar May 02 '24 10:05 eldar

Similar observed on macOS.

I can confirm this on MacOS as well. This is quite annoying if Nextcloud is used on a mobile computer.

b-pfl avatar May 03 '24 10:05 b-pfl

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.

seteq avatar May 13 '24 19:05 seteq

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.

rekcodocker avatar Jun 30 '24 12:06 rekcodocker

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 avatar Jul 11 '24 20:07 Zaxooy

@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:

  1. 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.
  2. A notification that was introduced late 2023 or early 2024 that comes too early.

willemb2 avatar Jul 12 '24 12:07 willemb2