Linux, Android, and MAC clients won't connect for about 2 weeks

Nextcloud version (eg, 12.0.2): 13.0.6
Operating system and version (eg, Ubuntu 17.04): Ubuntu 16.04.1
Apache or nginx version (eg, Apache 2.4.25): 2.2
PHP version (eg, 7.1): PHP 7.0.8

The issue you are facing:

For about 2 weeks now all but one of my clients (programs) won’t connect to my server. I have multiple client applications running on Android, MAC and Linux. I have two Linux computers, one connects fine, the other doesn’t. Same user, same password.

My android client won’t connect. My MAC client won’t connect. Android just times out and eventually asks me to re-sign in again. My NextCloud app on my iPad does the same thing. Keeps going back to login even though the password has never changed and I’m logged in on my one Linux machine that does let me sync and login, the only one that does.

MAC and my other Linux machine give me this error:

On Linux I’m using nextcloud app v2.3.2 on Ubuntu 16.04.4. On MAC I’m using nextcloud 2.2.4 build 1. On my other Linux machine it’s the same version as the one that does work.

On nextcloud logs I keep seeing “Login failed” error messages for my user. This doesn’t make any sense as I’m using the exact same password as on the machine that it does work on. I know this is the correct password because I have tested logging into the web panel with it.

Is this the first time you’ve seen this error? (Y/N): No, two weeks now, multiple computers.

The output of your Nextcloud log in Admin > Logging:

09-21 15:52:52:923 2005 OCC::Account::resetNetworkAccessManager: Resetting QNAM
09-21 15:52:52:929 2005 OCC::ConnectionValidator::checkServerAndAuth: Checking server and authentication
09-21 15:52:52:935 2005 OCC::AbstractNetworkJob::start: !!! OCC::CheckServerJob created for "https://cloud.domain.com" + "status.php" "OCC::ConnectionValidator"
09-21 15:52:53:193 2005 OCC::CheckServerJob::finished: status.php returns:  QMap(("edition", QVariant(QString, ""))("installed", QVariant(bool, true))("maintenance", QVariant(bool, false))("needsDbUpgrade", QVariant(bool, false))("productname", QVariant(QString, "Nextcloud"))("version", QVariant(QString, "13.0.6.1"))("versionstring", QVariant(QString, "13.0.6")))   QNetworkReply::NetworkError(NoError)  Reply:  QNetworkReplyHttpImpl(0x1ecfd50)
09-21 15:52:53:194 2005 OCC::ConnectionValidator::slotStatusFound: ** Application: ownCloud found:  QUrl("https://cloud.domain.com/status.php")  with version  "13.0.6" ( "13.0.6.1" )
09-21 15:52:53:194 2005 OCC::ConnectionValidator::setAndCheckServerVersion: QUrl("https://cloud.domain.com") has server version "13.0.6.1"
09-21 15:52:53:194 2005 OCC::AccountState::slotConnectionValidatorResult: AccountState connection status change:  "Undefined" -> "Credentials Wrong"
09-21 15:52:53:195 2005 OCC::HttpCredentials::fetchFromKeychain: -------- -----> QSslCertificate("", "", "1B2M2Y8AsgTpgAmY7PhCfg==", (), (), QMap(), QDateTime( Qt::TimeSpec(LocalTime)), QDateTime( Qt::TimeSpec(LocalTime))) QSslKey(PrivateKey, OPAQUE, -1)
09-21 15:52:53:195 2005 OCC::AccountState::setState: AccountState state change:  "Disconnected" -> "Configuration error"
09-21 15:52:53:196 2005 OCC::FolderMan::slotAccountStateChanged: Account "user@cloud.domain.com" disconnected or paused, terminating or descheduling sync folders
09-21 15:52:53:249 2005 OCC::Account::resetNetworkAccessManager: Resetting QNAM
09-21 15:52:53:250 2005 OCC::ConnectionValidator::checkServerAndAuth: Checking server and authentication
09-21 15:52:53:251 2005 OCC::AbstractNetworkJob::start: !!! OCC::CheckServerJob created for "https://cloud.domain.com" + "status.php" "OCC::ConnectionValidator"
09-21 15:52:53:418 2005 OCC::CheckServerJob::finished: status.php returns:  QMap(("edition", QVariant(QString, ""))("installed", QVariant(bool, true))("maintenance", QVariant(bool, false))("needsDbUpgrade", QVariant(bool, false))("productname", QVariant(QString, "Nextcloud"))("version", QVariant(QString, "13.0.6.1"))("versionstring", QVariant(QString, "13.0.6")))   QNetworkReply::NetworkError(NoError)  Reply:  QNetworkReplyHttpImpl(0x23efd90)
09-21 15:52:53:419 2005 OCC::ConnectionValidator::slotStatusFound: ** Application: ownCloud found:  QUrl("https://cloud.domain.com/status.php")  with version  "13.0.6" ( "13.0.6.1" )
09-21 15:52:53:419 2005 OCC::ConnectionValidator::setAndCheckServerVersion: QUrl("https://cloud.domain.com") has server version "13.0.6.1"
09-21 15:52:53:420 2005 OCC::ConnectionValidator::checkAuthentication: # Check whether authenticated propfind works.
09-21 15:52:53:421 2005 OCC::AbstractNetworkJob::start: !!! OCC::PropfindJob created for "https://cloud.domain.com" + "/" "OCC::ConnectionValidator"
09-21 15:52:56:139 2005 OCC::PassiveUpdateNotifier::backgroundCheckForUpdate: virtual void OCC::PassiveUpdateNotifier::backgroundCheckForUpdate()
09-21 15:52:56:140 2005 OCC::OCUpdater::backgroundCheckForUpdate: virtual void OCC::OCUpdater::backgroundCheckForUpdate() checking for available update
09-21 15:52:56:638 2005 OCC::PassiveUpdateNotifier::versionInfoArrived: Client is on latest version!
09-21 15:53:19:977 2005 OCC::AbstractNetworkJob::slotTimeout: virtual void OCC::AbstractNetworkJob::slotTimeout() OCC::PropfindJob(0x23efee0) Timeout QUrl("https://cloud.domain.com/remote.php/webdav/")
09-21 15:53:19:978 2005 OCC::AbstractNetworkJob::slotFinished: void OCC::AbstractNetworkJob::slotFinished() QNetworkReply::NetworkError(OperationCanceledError) "Operation canceled" QVariant(Invalid)
09-21 15:53:19:979 2005 OCC::PropfindJob::finished: PROPFIND request *not* successful, http result code is 0 ""
09-21 15:53:19:980 2005 unknown: QIODevice::read (QNetworkReplyHttpImpl): device not open
09-21 15:53:19:980 2005 OCC::AccountState::slotConnectionValidatorResult: AccountState connection status change:  "Credentials Wrong" -> "Timeout"
09-21 15:53:19:981 2005 OCC::AccountState::setState: AccountState state change:  "Configuration error" -> "Network error"
09-21 15:53:19:981 2005 OCC::AccountSettings::showConnectionLabel: "No connection to Nextcloud at <a href=\"https://cloud.domain.com\">https://cloud.domain.com</a>.\nOperation canceled"
09-21 15:53:19:983 2005 OCC::FolderMan::slotAccountStateChanged: Account "user@cloud.domain.com" disconnected or paused, terminating or descheduling sync folders
09-21 15:53:24:978 2005 OCC::Account::resetNetworkAccessManager: Resetting QNAM
09-21 15:53:24:979 2005 OCC::ConnectionValidator::checkServerAndAuth: Checking server and authentication
09-21 15:53:24:980 2005 OCC::AbstractNetworkJob::start: !!! OCC::CheckServerJob created for "https://cloud.domain.com" + "status.php" "OCC::ConnectionValidator"
09-21 15:53:25:143 2005 OCC::CheckServerJob::finished: status.php returns:  QMap(("edition", QVariant(QString, ""))("installed", QVariant(bool, true))("maintenance", QVariant(bool, false))("needsDbUpgrade", QVariant(bool, false))("productname", QVariant(QString, "Nextcloud"))("version", QVariant(QString, "13.0.6.1"))("versionstring", QVariant(QString, "13.0.6")))   QNetworkReply::NetworkError(NoError)  Reply:  QNetworkReplyHttpImpl(0x23f5e60)
09-21 15:53:25:144 2005 OCC::ConnectionValidator::slotStatusFound: ** Application: ownCloud found:  QUrl("https://cloud.domain.com/status.php")  with version  "13.0.6" ( "13.0.6.1" )
09-21 15:53:25:145 2005 OCC::ConnectionValidator::setAndCheckServerVersion: QUrl("https://cloud.domain.com") has server version "13.0.6.1"
09-21 15:53:25:146 2005 OCC::ConnectionValidator::checkAuthentication: # Check whether authenticated propfind works.
09-21 15:53:25:147 2005 OCC::AbstractNetworkJob::start: !!! OCC::PropfindJob created for "https://cloud.domain.com" + "/" "OCC::ConnectionValidator"
09-21 15:53:51:979 2005 OCC::AbstractNetworkJob::slotTimeout: virtual void OCC::AbstractNetworkJob::slotTimeout() OCC::PropfindJob(0x1ec9940) Timeout QUrl("https://cloud.domain.com/remote.php/webdav/")
09-21 15:53:51:980 2005 OCC::AbstractNetworkJob::slotFinished: void OCC::AbstractNetworkJob::slotFinished() QNetworkReply::NetworkError(OperationCanceledError) "Operation canceled" QVariant(Invalid)
09-21 15:53:51:981 2005 OCC::PropfindJob::finished: PROPFIND request *not* successful, http result code is 0 ""
09-21 15:53:51:981 2005 unknown: QIODevice::read (QNetworkReplyHttpImpl): device not open
09-21 15:53:51:982 2005 OCC::AccountSettings::showConnectionLabel: "No connection to Nextcloud at <a href=\"https://cloud.domain.com\">https://cloud.domain.com</a>.\nOperation canceled"
09-21 15:53:51:983 2005 OCC::FolderMan::slotAccountStateChanged: Account "user@cloud.domain.com" disconnected or paused, terminating or descheduling sync folders
09-21 15:53:56:979 2005 OCC::Account::resetNetworkAccessManager: Resetting QNAM
09-21 15:53:56:980 2005 OCC::ConnectionValidator::checkServerAndAuth: Checking server and authentication
09-21 15:53:56:982 2005 OCC::AbstractNetworkJob::start: !!! OCC::CheckServerJob created for "https://cloud.domain.com" + "status.php" "OCC::ConnectionValidator"
09-21 15:53:57:157 2005 OCC::CheckServerJob::finished: status.php returns:  QMap(("edition", QVariant(QString, ""))("installed", QVariant(bool, true))("maintenance", QVariant(bool, false))("needsDbUpgrade", QVariant(bool, false))("productname", QVariant(QString, "Nextcloud"))("version", QVariant(QString, "13.0.6.1"))("versionstring", QVariant(QString, "13.0.6")))   QNetworkReply::NetworkError(NoError)  Reply:  QNetworkReplyHttpImpl(0x23ef4e0)
09-21 15:53:57:158 2005 OCC::ConnectionValidator::slotStatusFound: ** Application: ownCloud found:  QUrl("https://cloud.domain.com/status.php")  with version  "13.0.6" ( "13.0.6.1" )
09-21 15:53:57:158 2005 OCC::ConnectionValidator::setAndCheckServerVersion: QUrl("https://cloud.domain.com") has server version "13.0.6.1"
09-21 15:53:57:159 2005 OCC::ConnectionValidator::checkAuthentication: # Check whether authenticated propfind works.
09-21 15:53:57:160 2005 OCC::AbstractNetworkJob::start: !!! OCC::PropfindJob created for "https://cloud.domain.com" + "/" "OCC::ConnectionValidator"
09-21 15:54:23:977 2005 OCC::AbstractNetworkJob::slotTimeout: virtual void OCC::AbstractNetworkJob::slotTimeout() OCC::PropfindJob(0x23f5890) Timeout QUrl("https://cloud.domain.com/remote.php/webdav/")
09-21 15:54:23:978 2005 OCC::AbstractNetworkJob::slotFinished: void OCC::AbstractNetworkJob::slotFinished() QNetworkReply::NetworkError(OperationCanceledError) "Operation canceled" QVariant(Invalid)
09-21 15:54:23:978 2005 OCC::PropfindJob::finished: PROPFIND request *not* successful, http result code is 0 ""
09-21 15:54:23:979 2005 unknown: QIODevice::read (QNetworkReplyHttpImpl): device not open
09-21 15:54:23:980 2005 OCC::AccountSettings::showConnectionLabel: "No connection to Nextcloud at <a href=\"https://cloud.domain.com\">https://cloud.domain.com</a>.\nOperation canceled"
09-21 15:54:23:981 2005 OCC::FolderMan::slotAccountStateChanged: Account "user@cloud.domain.com" disconnected or paused, terminating or descheduling sync folders
09-21 15:54:28:976 2005 OCC::Account::resetNetworkAccessManager: Resetting QNAM
09-21 15:54:28:977 2005 OCC::ConnectionValidator::checkServerAndAuth: Checking server and authentication
09-21 15:54:28:979 2005 OCC::AbstractNetworkJob::start: !!! OCC::CheckServerJob created for "https://cloud.domain.com" + "status.php" "OCC::ConnectionValidator"
09-21 15:54:29:152 2005 OCC::CheckServerJob::finished: status.php returns:  QMap(("edition", QVariant(QString, ""))("installed", QVariant(bool, true))("maintenance", QVariant(bool, false))("needsDbUpgrade", QVariant(bool, false))("productname", QVariant(QString, "Nextcloud"))("version", QVariant(QString, "13.0.6.1"))("versionstring", QVariant(QString, "13.0.6")))   QNetworkReply::NetworkError(NoError)  Reply:  QNetworkReplyHttpImpl(0x23f5e40)
09-21 15:54:29:153 2005 OCC::ConnectionValidator::slotStatusFound: ** Application: ownCloud found:  QUrl("https://cloud.domain.com/status.php")  with version  "13.0.6" ( "13.0.6.1" )
09-21 15:54:29:153 2005 OCC::ConnectionValidator::setAndCheckServerVersion: QUrl("https://cloud.domain.com") has server version "13.0.6.1"
09-21 15:54:29:154 2005 OCC::ConnectionValidator::checkAuthentication: # Check whether authenticated propfind works.
09-21 15:54:29:155 2005 OCC::AbstractNetworkJob::start: !!! OCC::PropfindJob created for "https://cloud.domain.com" + "/" "OCC::ConnectionValidator"
09-21 15:54:55:975 2005 OCC::AbstractNetworkJob::slotTimeout: virtual void OCC::AbstractNetworkJob::slotTimeout() OCC::PropfindJob(0x23d9960) Timeout QUrl("https://cloud.domain.com/remote.php/webdav/")
09-21 15:54:55:976 2005 OCC::AbstractNetworkJob::slotFinished: void OCC::AbstractNetworkJob::slotFinished() QNetworkReply::NetworkError(OperationCanceledError) "Operation canceled" QVariant(Invalid)
09-21 15:54:55:976 2005 OCC::PropfindJob::finished: PROPFIND request *not* successful, http result code is 0 ""
09-21 15:54:55:977 2005 unknown: QIODevice::read (QNetworkReplyHttpImpl): device not open
09-21 15:54:55:978 2005 OCC::AccountSettings::showConnectionLabel: "No connection to Nextcloud at <a href=\"https://cloud.domain.com\">https://cloud.domain.com</a>.\nOperation canceled"
09-21 15:54:55:980 2005 OCC::FolderMan::slotAccountStateChanged: Account "user@cloud.domain.com" disconnected or paused, terminating or descheduling sync folders

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '1234',
  'datadirectory' => '/var/data',
  'passwordsalt' => '1234',
  'dbtype' => 'mysql',
  'version' => '13.0.6.1',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'owncloud',
  'dbpassword' => '',
  'installed' => true,
  'forcessl' => true,
  'theme' => '',
  'maintenance' => false,
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
  'trusted_domains' => 
  array (
    0 => 'cloud.domain.com',
  ),
  'share_folder' => '/Shared',
  'appcodechecker' => false,
  'loglevel' => 2,
  'secret' => 'asdf',
  'trashbin_retention_obligation' => 'auto',
  'updater.release.channel' => 'stable',
  'overwrite.cli.url' => 'https://cloud.domain.com',
);

Another interesting thing is if I remove the account from the computer that won’t login, then re-add, it connects fine and syncs everything. But then if I restart the computer it won’t connect anymore.

Could it be you are facing this issue: https://github.com/nextcloud/desktop/issues/139 ?

I don’t use Self Signed certs.

The issue is not about self signed certificates. It is about imported certificates not being saved. So on the next start they cannot be loaded. Recreating the account works temporary (until the next start) since importing works.