Problems via Nextcloud, can't connect - invalid username or password even though they are correct

DESCRIPTION:

Trying to connect Nextcloud via Settings > Accounts or CalDAV / CardDAV does not work. It says username or password is incorrect. Logging in via the web browser with the same host, username and password works. In the Nextcloud Admin Logs I can see “Invalid password” and also “Too Many Requests” errors.

My suspicion is that some characters in the password, since I use a very strong password, is not encoded correctly by the system? It seems I can connect CardDAV if I deselect the CalDAV integration.

PRECONDITIONS:

STEPS TO REPRODUCE:

EXPECTED RESULT:

ACTUAL RESULT:

MODIFICATIONS:

ADDITIONAL INFORMATION:

Hi!
Your bug report is unfortunately incomplete. Please complete it to ease the bug triage.

Have you got your server’s well-known configs setup correctly? I had a similar issue and that was the cause.

Alternatively, can you use an app password for Sailfish, at least as a troubleshooting step?

I use Nextcloud All In One Container so I have done no file modifications myself and I would rather not start doing that since also my containers auto-update via Watchtower service so any changes would dissappear.

I will try creating a test account in Nextcloud with a simple password to see if the password is the issue

Check well-known by going to eg. https://your-server.com/.well-known/carddav

Ok I got redirected to /remote.php/dav/ with the message

This is the WebDAV interface. It can only be accessed by WebDAV clients such as the Nextcloud desktop sync client.

Same behaviour with .well-known/caldav..

Do you have 2fa enabled? Then username/pw wont work. Create a dedicated APP password under Settings/Security.

2 Likes

No I don’t have it enabled and it worked logging in via the browser without any 2FA. I created a new user with a simple password and it worked so my hunch seems to be right, something in the password is not encoded correctly

I got my phone yesterday so everything is new, I guess I need to find the information to do a proper bug report

Cool, that’s not the problem then

Interesting. An App Password is probably the best workaround for now, but it’s certainly a genuine bug that needs fixing if this is indeed the case.

2 Likes

Thank you for the tip, it worked by using an App Password instead

1 Like

Maybe related to

That sounds reasonable, esp as there is a known bug in Qt that doesn’t do the encoding correctly (or rather, the real world practices have deviated from the standard, and Qt is following the standard).
There have been fixes merged for that but the situation is not perfect still.

1 Like