Nextcloud Desktop 3.1.2 receives an authentication failure after being connected for some time

Nextcloud server version: 20.0.4
Client operating system: Windows 10.0.18363
Nextcloud client version: 3.1.2

Issue:

Nextcloud Desktop 3.1.2 receives an authentication failure after about 1-3 hours of being connected.

Is there a setting or something that allows me to work around this issue?

Is this the first time you’ve seen this error? No.

Steps to replicate it:

  1. Launch Nextcloud Desktop.
  2. Login via webflow using Firefox.
  3. Identify connected status is green in the systray.
  4. Wait.
  5. Identify that connected status is gray indicating “Disconnected”.

Output of Nextcloud Desktop log:

2021-01-18 19:28:48:298 [ info nextcloud.gui.folder ]:	Trying to check "https://domain.tld/sub/remote.php/dav/files/ncusername/" for changes via ETag check. (time since last sync: 365 s)
2021-01-18 19:28:48:299 [ debug nextcloud.gui.folder.manager ]	[ OCC::FolderMan::slotRunOneEtagJob ]:	Scheduling "https://domain.tld/sub/remote.php/dav/files/ncusername/" to check remote ETag
2021-01-18 19:28:48:300 [ info nextcloud.sync.accessmanager ]:	6 "PROPFIND" "https://domain.tld/sub/remote.php/dav/files/ncusername/" has X-Request-ID "b73bb17d-5e0d-4cdd-90ce-eba77e03f90c"
2021-01-18 19:28:48:300 [ debug nextcloud.sync.cookiejar ]	[ OCC::CookieJar::cookiesForUrl ]:	QUrl("https://domain.tld/sub/remote.php/dav/files/ncusername/") requests: (QNetworkCookie("oc_sessionPassphrase=RZdMViHgrmnVFFGS66%2FB%2Bs3lubYsitV25Ny1i2zZIckF3yNs7yBc7fug22Z0WvxAKoelQUXYrqc0qTXIKv%2BlAGFtqqwygCeekRlaChnMLbBAk1wxruyfX0W3jddkoKGB; secure; HttpOnly; domain=domain.tld; path=/nc"), QNetworkCookie("nc_sameSiteCookielax=true; secure; HttpOnly; expires=Fri, 31-Dec-2100 23:59:59 GMT; domain=domain.tld; path=/nc"), QNetworkCookie("nc_sameSiteCookiestrict=true; secure; HttpOnly; expires=Fri, 31-Dec-2100 23:59:59 GMT; domain=domain.tld; path=/nc"), QNetworkCookie("ocf7gtbbntob=q9nq8hfji6rp0oaai58tc3fh85; secure; HttpOnly; domain=domain.tld; path=/nc"))
2021-01-18 19:28:48:301 [ info nextcloud.sync.networkjob ]:	OCC::RequestEtagJob created for "https://domain.tld/nc" + "/" "OCC::Folder"
2021-01-18 19:28:48:690 [ debug nextcloud.sync.connectionvalidator ]	[ OCC::ConnectionValidator::checkAuthentication ]:	# Check whether authenticated propfind works.
2021-01-18 19:28:48:691 [ info nextcloud.sync.accessmanager ]:	6 "PROPFIND" "https://domain.tld/sub/remote.php/dav/files/ncusername/" has X-Request-ID "6c85be10-e39d-49ae-9d56-2dc9f1584e90"
2021-01-18 19:28:48:692 [ debug nextcloud.sync.cookiejar ]	[ OCC::CookieJar::cookiesForUrl ]:	QUrl("https://domain.tld/sub/remote.php/dav/files/ncusername/") requests: (QNetworkCookie("oc_sessionPassphrase=RZdMViHgrmnVFFGS66%2FB%2Bs3lubYsitV25Ny1i2zZIckF3yNs7yBc7fug22Z0WvxAKoelQUXYrqc0qTXIKv%2BlAGFtqqwygCeekRlaChnMLbBAk1wxruyfX0W3jddkoKGB; secure; HttpOnly; domain=domain.tld; path=/nc"), QNetworkCookie("nc_sameSiteCookielax=true; secure; HttpOnly; expires=Fri, 31-Dec-2100 23:59:59 GMT; domain=domain.tld; path=/nc"), QNetworkCookie("nc_sameSiteCookiestrict=true; secure; HttpOnly; expires=Fri, 31-Dec-2100 23:59:59 GMT; domain=domain.tld; path=/nc"), QNetworkCookie("ocf7gtbbntob=q9nq8hfji6rp0oaai58tc3fh85; secure; HttpOnly; domain=domain.tld; path=/nc"))
2021-01-18 19:28:48:692 [ info nextcloud.sync.networkjob ]:	OCC::PropfindJob created for "https://domain.tld/nc" + "/" "OCC::ConnectionValidator"
2021-01-18 19:28:49:480 [ debug nextcloud.sync.credentials.webflow ]	[ OCC::WebFlowCredentials::slotAuthentication ]:	Requires authentication
2021-01-18 19:28:50:627 [ info nextcloud.sync.credentials.webflow ]:	request finished
2021-01-18 19:28:50:629 [ warning nextcloud.sync.networkjob ]:	QNetworkReply::AuthenticationRequiredError "Host requires authentication" QVariant(int, 401)
2021-01-18 19:28:50:629 [ warning nextcloud.sync.credentials.webflow ]:	QNetworkReply::AuthenticationRequiredError
2021-01-18 19:28:50:630 [ warning nextcloud.sync.credentials.webflow ]:	"Host requires authentication"
2021-01-18 19:28:50:630 [ info nextcloud.gui.account.manager ]:	Saving account "https://domain.tld/nc"
2021-01-18 19:28:50:631 [ info nextcloud.gui.account.manager ]:	Saving  0  unknown certs.
2021-01-18 19:28:50:631 [ info nextcloud.gui.account.manager ]:	Saving cookies. "C:/Users/USER-NAME/AppData/Local/Nextcloud/cookies0.db"
2021-01-18 19:28:50:632 [ debug nextcloud.sync.cookiejar ]	[ OCC::CookieJar::save ]:	"C:/Users/USER-NAME/AppData/Local/Nextcloud/cookies0.db"
2021-01-18 19:28:50:638 [ info nextcloud.gui.account.manager ]:	Saved account settings, status: QSettings::NoError
2021-01-18 19:28:50:639 [ info nextcloud.gui.account.state ]:	AccountState state change:  "Connected" -> "Signed out"
2021-01-18 19:28:50:639 [ info nextcloud.gui.socketapi ]:	Sending SocketAPI message --> "UNREGISTER_PATH:C:\\Users\\USER-NAME\\Nextcloud" to QLocalSocket(0x1d4a5705a70)
2021-01-18 19:28:50:652 [ info nextcloud.gui.socketapi ]:	Sending SocketAPI message --> "UNREGISTER_PATH:C:\\Users\\USER-NAME\\Nextcloud" to QLocalSocket(0x1d4a5705f70)
2021-01-18 19:28:50:703 [ info nextcloud.gui.socketapi ]:	Sending SocketAPI message --> "UNREGISTER_PATH:C:\\Users\\USER-NAME\\Nextcloud" to QLocalSocket(0x1d4a5706390)
2021-01-18 19:28:50:753 [ info nextcloud.gui.socketapi ]:	Sending SocketAPI message --> "UNREGISTER_PATH:C:\\Users\\USER-NAME\\Nextcloud" to QLocalSocket(0x1d4a57066b0)
2021-01-18 19:28:50:782 [ info nextcloud.gui.socketapi ]:	Sending SocketAPI message --> "UNREGISTER_PATH:C:\\Users\\USER-NAME\\Nextcloud" to QLocalSocket(0x1d4a5706590)
2021-01-18 19:28:50:825 [ info nextcloud.gui.folder.manager ]:	Account "ncusername@domain.tld" disconnected or paused, terminating or descheduling sync folders
2021-01-18 19:28:50:826 [ info nextcloud.gui.account.state ]:	Invalid credentials for "https://domain.tld/nc" checking for remote wipe request
2021-01-18 19:28:50:830 [ info nextcloud.gui.folder.manager ]:	Account "ncusername@domain.tld" disconnected or paused, terminating or descheduling sync folders
2021-01-18 19:28:50:831 [ info nextcloud.sync.networkjob.etag ]:	Request Etag of QUrl("https://domain.tld/sub/remote.php/dav/files/ncusername/") FINISHED WITH STATUS "AuthenticationRequiredError Host requires authentication"
2021-01-18 19:28:50:831 [ debug nextcloud.sync.networkjob ]	[ OCC::AbstractNetworkJob::slotFinished ]:	Network job OCC::RequestEtagJob finished for "/"
2021-01-18 19:28:50:835 [ info nextcloud.sync.account ]:	appPassword deleted from keychain
2021-01-18 19:28:50:848 [ warning nextcloud.sync.credentials.keychainchunk ]:	Unable to delete "Nextcloud_ncusername:https://domain.tld/sub/:0" chunk "0" "Password entry not found"
2021-01-18 19:28:52:628 [ warning nextcloud.gui.remotewipe ]:	"There was an error accessing the 'token' endpoint: <br><em>Error transferring https://domain.tld/sub/index.php/core/wipe/check - server replied: Not Found</em>"
2021-01-18 19:29:16:751 [ warning nextcloud.sync.networkjob ]:	Network job timeout QUrl("https://domain.tld/sub/remote.php/dav/files/ncusername/")
2021-01-18 19:29:16:752 [ info nextcloud.sync.credentials.webflow ]:	request finished
2021-01-18 19:29:16:752 [ warning nextcloud.sync.networkjob ]:	QNetworkReply::OperationCanceledError "Connection timed out" QVariant(Invalid)
2021-01-18 19:29:16:752 [ warning nextcloud.sync.credentials.webflow ]:	QNetworkReply::OperationCanceledError
2021-01-18 19:29:16:753 [ warning nextcloud.sync.credentials.webflow ]:	"Operation canceled"
2021-01-18 19:29:16:753 [ info nextcloud.sync.networkjob.propfind ]:	PROPFIND of QUrl("https://domain.tld/sub/remote.php/dav/files/ncusername/") FINISHED WITH STATUS "OperationCanceledError Connection timed out"
2021-01-18 19:29:16:753 [ warning nextcloud.sync.networkjob.propfind ]:	*not* successful, http result code is 0 ""
2021-01-18 19:29:16:754 [ warning nextcloud.sync.credentials.webflow ]:	QNetworkReply::OperationCanceledError
2021-01-18 19:29:16:754 [ warning nextcloud.sync.credentials.webflow ]:	"Operation canceled"
2021-01-18 19:29:16:755 [ warning default ]:	QIODevice::read (QNetworkReplyHttpImpl): device not open
2021-01-18 19:29:16:755 [ warning nextcloud.gui.account.state ]:	Signed out, ignoring OCC::ConnectionValidator::Timeout "https://domain.tld/nc"
2021-01-18 19:29:16:756 [ debug nextcloud.sync.networkjob ]	[ OCC::AbstractNetworkJob::slotFinished ]:	Network job OCC::PropfindJob finished for "/"