Stuck in a login loop when logging in from sync client on Linux


#1

I’m having trouble logging into one account from the sync client on Linux.

Two other accounts on a different server work fine.

Another account, on a different server gets stuck in an infinite loop:

  1. “Connect your account” - click login
  2. First time around, enter login details
  3. “Grant access” - click grant access
  4. Goto 1. Skip step 2. on subsequent tries. Loop forever.

Things tried:
*Deliberately enter wrong password. This throws an error, the login is successful.
*Web interface. This login works fine. I can also see that the client is logged in.
*Upgrade NC. Was on 14.0.6, now on 15.0.4. No change
*Remove cookies stored in ~.local/…etc…/Nextcloud
*Remove the account and re-add it
*Closing the login window - this just gets the client stuck on logging in.
*I’m logged in on another linux computer with the same distro and the same version client. Though I am not sure that I actually logged in on this version client - I think the login carried over from an earlier version.
*Version of client is 2.5.1git as packaged in Debian testing.

I really don’t want to nuke nextcloud.cfg, but can.

Any ideas?


#2

Hi,
I had exactly the same problem yesterday with my own nextcloud instance.
When trying to log in from desktop sync client i was getting infinite loop and when trying to log in from nextcloud notes on android, logging in would just time out without any real errors in the log.

Turns out you need to add ‘overwriteprotocol’ ‘overwrite.cli.url’ and ‘overwritehost’ parameters to your config.php file.
Also, my nextcloud instance is running behind nginx proxy, and i had missconfigured ‘trusted_proxies’ parameter.

After adding those overwrite parameters and fixing my trusted_proxies array, i can log back in with the sync client.