nextcloud / desktop

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

[Bug]: Client not resuming sync after error, only manual resume possible. #6861

Open mark-orion opened 5 days ago

mark-orion commented 5 days ago

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

Bug description

When the nextcloud client encounters an error (red exclamation mark in the taskbar), the sync process does not resume. This can only be done by clickin on the "Sync now" button besides the "Some files could not be synced" message.

Steps to reproduce

Difficult to reproduce as it needs an error condition

Expected behavior

The client should always try to resume the sync process. Specially for fresh installations the initial sync process should be able to run unattended and without an need for manual intervention. The only error exception are authentication errors because these usually do not resolve automatically.

Which files are affected by this bug

No specific file

Operating system

Linux

Which version of the operating system you are running.

Ubuntu Studio 24.04

Package

Appimage

Nextcloud Server version

28.0.6

Nextcloud Desktop Client version

3.13.0

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

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

Are you using an external user-backend?

Nextcloud Server logs

2024-06-30 13:41:46:422 [ info nextcloud.gui.folder.manager /home/user/src/gui/folderman.cpp:959 ]: Etag poll timer timeout
2024-06-30 13:41:46:422 [ info nextcloud.gui.folder.manager /home/user/src/gui/folderman.cpp:963 ]: Folders to sync: 1
2024-06-30 13:41:46:422 [ info nextcloud.gui.folder.manager /home/user/src/gui/folderman.cpp:973 ]: Number of folders that don't use push notifications: 0
2024-06-30 13:41:58:423 [ warning nextcloud.sync.networkjob /home/user/src/libsync/abstractnetworkjob.cpp:369 ]:    Network job timeout QUrl("https://removed/")
2024-06-30 13:41:58:423 [ info nextcloud.sync.credentials.webflow /home/user/src/gui/creds/webflowcredentials.cpp:406 ]:    request finished
2024-06-30 13:41:58:423 [ warning nextcloud.sync.networkjob /home/user/src/libsync/abstractnetworkjob.cpp:221 ]:    QNetworkReply::OperationCanceledError "Connection timed out" QVariant(Invalid)
2024-06-30 13:41:58:423 [ warning nextcloud.sync.credentials.webflow /home/user/src/gui/creds/webflowcredentials.cpp:208 ]: QNetworkReply::OperationCanceledError
2024-06-30 13:41:58:423 [ warning nextcloud.sync.credentials.webflow /home/user/src/gui/creds/webflowcredentials.cpp:209 ]: "Operation canceled"
2024-06-30 13:41:58:423 [ info nextcloud.sync.networkjob.lscol /home/user/src/libsync/networkjobs.cpp:386 ]:    LSCOL of QUrl("https://removed/") FINISHED WITH STATUS "OperationCanceledError Connection timed out"
2024-06-30 13:41:58:423 [ warning nextcloud.sync.discovery /home/user/src/libsync/discoveryphase.cpp:646 ]: LSCOL job error "Operation canceled" 0 QNetworkReply::OperationCanceledError
2024-06-30 13:41:58:423 [ warning nextcloud.sync.discovery /home/user/src/libsync/discovery.cpp:2092 ]: Server error in directory "" 0
2024-06-30 13:41:58:423 [ warning nextcloud.gui.activity /home/user/src/gui/tray/usermodel.cpp:632 ]:   Item  "Nextcloud"  retrieved resulted in  "Server replied with an error while reading directory \"\" : Operation canceled"
2024-06-30 13:41:58:424 [ info nextcloud.sync.engine /home/user/src/libsync/syncengine.cpp:1018 ]:  Sync run took  299989 ms
2024-06-30 13:41:58:424 [ info nextcloud.gui.folder /home/user/src/gui/folder.cpp:1179 ]:   Client version 3.13.0 (build 22492)  Qt 5.15.12  SSL  OpenSSL 3.1.4 24 Oct 2023
2024-06-30 13:41:58:424 [ warning nextcloud.gui.folder /home/user/src/gui/folder.cpp:1186 ]:    SyncEngine finished with ERROR
2024-06-30 13:41:58:424 [ info nextcloud.gui.folder /home/user/src/gui/folder.cpp:417 ]:    Folder "" sync result:  OCC::SyncResult::SyncPrepare
2024-06-30 13:41:58:424 [ info nextcloud.gui.folder /home/user/src/gui/folder.cpp:1215 ]:   the last 4 syncs failed
2024-06-30 13:41:58:425 [ info nextcloud.gui.application /home/user/src/gui/owncloudgui.cpp:241 ]:  Sync state changed for folder  "removed/" :  "Error"

Additional info

No response

mark-orion commented 5 days ago

I just want to add a further observation: The problem seems to get triggered when the computer enters the "idle" state. I notice that when I log-in again after a night of unsuccessful synchronizing, the client will resume the synchronization at one point. It is important that I have set up the power management that the idle state is not sending the system to sleep or hibernate, but just locks out and blanks the screen.