-
Notifications
You must be signed in to change notification settings - Fork 666
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
[OCIS/OAUTH] Windows client requesting login whenever computer awakens from deep sleep #11980
Comments
@sfadschm Can you include a bit more of the log file before that first line, so we can check what went on there? Also, what is the time of "sleep" and the "wake up" time? |
@erikjv Extended the gist accordingly. It looks like 8:33 was the time that the computer went into deep sleep. Before that, there is a long period of "Host XXX not found" log entries, likely because WLAN was inactive during sleep. Unfortunately, there does not seem to be any indication in the Windows setting that tell after which time the OS goes into "deep sleep". "Closing the lid" is simply set to "sleep", yet behaviour differs depending on whether it is opened/woken up 30 mins later (no OC issue, Win11 password prompt shows up immediately) or after a longer time of ~2 h (OC logs out). |
It appears that the "deep sleep" I was talking about is actually called "hibernate" in Windows. I will check BIOS setting to see if that is scheduled after a certain time of "sleep". |
Addendum: Unfortunately, logs were turned off. Will add some more if it happens again. |
Next time it happens, can you include The last few (20?) lines before the |
Updated the GIST again to include anything between the last "#### Discovery End ####" and the first "#### Discovery Start ####". The first "ConnectionValidator::StatusNotFound" appears on line 69. Here goes the link again: Will add another gist when it appears again. |
What happens in sequence is:
(The previous 2 attempts are in the log file right in front of this snippet.) The fix is not to retry those jobs when there is no network available, or to not invalidate the credentials when the network disappeared. |
Thanks for the analysis ! The described sequence of events sounds like what Windows "modern standby" is intended to do, so seems legit. Rechecking connection after a failed attempt seems like the more natural approach to me. |
Btw. What is the lifetime of the authentication token? Because this error on some days occured 3-5 times. Such short lifetime appears a little over the top on a first glance. |
A draft fix has been implemented by @erikjv - feel free to grab the client from here - https://github.com/owncloud/client/actions/runs/11892365157?pr=11984 |
Note: this also has a new feature that you might be interested in: in the settings there is now an option "Move remotely deleted files to the local trash bin instead of deleting them". |
Will test it for a few days and give feedback if the error occurs again. The implementation looks robust however. The trash bin feature sounds great! |
No occurence so far. |
Pre-submission Checks
Describe the bug
With the Windows client being connected to a live OCIS instance, the client request a new login via OAUTH / Browser whenever the computer awakes from deep sleep.
Here, "deep sleep" is my amateur description of what Windows11 does when you close the laptop lid and leave the computer in the sleep state for a longer time period.
Expected behavior
Credentials should be stored and not need to re-authenticate.
Steps to reproduce the issue
Screenshots
No response
Logs
Log have been collected and I believe this is the crucial part right after the computer wakes up, leading to "OCC::ConnectionValidator::CredentialsNotReady":
https://gist.github.com/sfadschm/21d18d9306627f951f101d03625d6766
Client version number
ownCloud 5.3.1.14018 f15fd5
Libraries Qt 6.4.3, OpenSSL 3.1.2 1 Aug 2023
Using virtual files plugin: wincfapi
OS: windows-10.0.22631
QPA: windows
Desktop environment (Linux only)
No response
Client package version and origin (Linux only)
No response
Installation path (Windows only)
C:\Program Files\ownCloud
Server information
ownCloud Infinite Scale
Edition Community
Version 5.0.6
Web client version 8.0.4
on
Ubuntu 20.04.6 LTS
installed via
Docker container
Additional context
No response
The text was updated successfully, but these errors were encountered: