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

[Bug]: Network Error on wake from sleep #6487

Open
5 of 8 tasks
Genda1ph opened this issue Feb 24, 2024 · 24 comments
Open
5 of 8 tasks

[Bug]: Network Error on wake from sleep #6487

Genda1ph opened this issue Feb 24, 2024 · 24 comments

Comments

@Genda1ph
Copy link

Genda1ph commented Feb 24, 2024

⚠️ 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?

  • 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

@SerjPo
Copy link

SerjPo commented Feb 24, 2024

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.

@Genda1ph
Copy link
Author

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.

@qwertfisch
Copy link

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.

@samfuin
Copy link

samfuin commented Mar 7, 2024

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

@dsebire
Copy link

dsebire commented Mar 11, 2024

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

same for me

@dominalien
Copy link

dominalien commented Mar 28, 2024

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.

@electrickite
Copy link

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.

@ColiZei
Copy link

ColiZei commented Mar 29, 2024

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.

@veitw
Copy link

veitw commented Apr 1, 2024

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.

@willemb2
Copy link

willemb2 commented Apr 7, 2024

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.

@electrickite
Copy link

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

@mcnesium
Copy link

mcnesium commented Apr 8, 2024

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

@jlfranklin
Copy link

Similar observed on macOS.

@willemb2
Copy link

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!

@electrickite
Copy link

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.

@eldar
Copy link

eldar commented May 2, 2024

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

@b-pfl
Copy link

b-pfl commented May 3, 2024

Similar observed on macOS.

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

@seteq
Copy link

seteq commented May 13, 2024

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.

@camilasan camilasan self-assigned this Jun 24, 2024
camilasan added a commit that referenced this issue Jun 24, 2024
Fix for #6448 and #6487.

Signed-off-by: Camila Ayres <[email protected]>
camilasan added a commit that referenced this issue Jun 25, 2024
@rekcodocker
Copy link

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.

@Zaxooy
Copy link

Zaxooy commented Jul 11, 2024

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.

@willemb2
Copy link

@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 Client does not recover from standby #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.

@SerjPo
Copy link

SerjPo commented Sep 16, 2024

hey guys!
Good news! It looks like it is fixed now. I just noticed this issue was referenced in 6994 and that was fixed in recent Release 3.14.0.

I just updated Nextcloud-3.11.2 -> 3.14.0 and can confirm it fixed (only a single sleep->resume transition test for now).
Good, no need to limit yourself to 3.11.2 anymore.
They did it after 7 month. I did not hope it will be fixed at all actually as there no any mentions here from devs for a long time and status is still "need triage". But happy as it works now!

@dsebire
Copy link

dsebire commented Sep 17, 2024

I did not hope it will be fixed at all actually as there no any mentions here from devs for a long time and status is still "need triage"

I've opened a bug report 3 years ago.
this bug causes data loss.
so it's a bit much than "annoying"
even if it is in a particular environement, it has never been fixed.
I've uninstalled this nextcloud instance as a solution.
nextcloud/server#28291

@Zaxooy
Copy link

Zaxooy commented Sep 23, 2024

I can confirm: This seems to be fixed. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests