Client Login fails

Hi, I’m trying to login with the Linux Client 3.2.1 (Appimage). That doesn’t work. The client show

There was an error accessing the 'token’endpoint: Error transferring https://myserver.com/login - server replied: Internal Server Error

and the log file shows

Exception: Argument 1 passed to OC\Core\Controller\LoginController::tryLogin() must be of the type string, null given, called in /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 218

Login in via Browser and Android works. Only the Desktopclient fails.

What can I do?

Hello,

please tell us about your setup.
NC version?
OS?
Webserver type and version?

The client has a log option as well. See https://docs.nextcloud.com/desktop/3.2/troubleshooting.html#log-files Please check it to find the cause.

NC 21.0.1
OS Debian 10.8
Webserver Apache2 4.38

The Client log says something like:

2021-05-05 17:32:25:215 [ info nextcloud.sync.accessmanager ]: 4 “” “https://myserver/nextcloud/login/v2/poll” has X-Request-ID “2877c509-3615-4ff5-91af-790677a80054”
2021-05-05 17:32:25:215 [ debug nextcloud.sync.cookiejar ] [ OCC::CookieJar::cookiesForUrl ]: QUrl(“https://myserver/nextcloud/login/v2/poll”) requests: (QNetworkCookie(“nc_sameSiteCookielax=true; secure; HttpOnly; expires=Fri, 31-Dec-2100 23:59:59 GMT; domain=myserver; path=/nextcloud”), QNetworkCookie(“nc_sameSiteCookiestrict=true; secure; HttpOnly; expires=Fri, 31-Dec-2100 23:59:59 GMT; domain=myserver; path=/nextcloud”), QNetworkCookie(“oc_sessionPassphrase=UYYK
AzN4Nt4UVn3; secure; HttpOnly; domain=myserver; path=/nextcloud”), QNetworkCookie(“ocjoq9j6084
hur5sa2loc4i5ea1h; secure; HttpOnly; domain=myserver; path=/nextcloud”), QNetworkCookie(“__Host-nc_sameSiteCookielax=true; secure; HttpOnly; expires=Fri, 31-Dec-2100 23:59:59 GMT; domain=myserver; path=/”), QNetworkCookie(“__Host-nc_sameSiteCookiestrict=true; secure; HttpOnly; expires=Fri, 31-Dec-2100 23:59:59 GMT; domain=myserver; path=/”), QNetworkCookie(“oc_sessionPassphrase=0PblB7DxYlb
NJ6Aqf4eH34MTPSaK; secure; HttpOnly; domain=myserver; path=/”), QNetworkCookie(“ocjoq9j608
qqhkdu4vu1m3pr; secure; HttpOnly; domain=myserver; path=/”))
2021-05-05 17:32:25:215 [ info nextcloud.sync.networkjob ]: OCC::SimpleNetworkJob created for “https://myserver/nextcloud” + “” “”
2021-05-05 17:32:25:273 [ info nextcloud.sync.credentials.webflow ]: request finished
2021-05-05 17:32:25:273 [ info nextcloud.sync.networkjob ]: Redirecting “POST” QUrl(“https://myserver/nextcloud/login/v2/poll”) QUrl(“https://myserver/login”)
2021-05-05 17:32:25:273 [ info nextcloud.sync.accessmanager ]: 4 “” “https://myserver/login” has X-Request-ID “0c793b15-58ae-4a8b-80b9-cad5383dfa3f”
2021-05-05 17:32:25:273 [ debug nextcloud.sync.cookiejar ] [ OCC::CookieJar::cookiesForUrl ]: QUrl(“https://myserver/login”) requests: (QNetworkCookie(“__Host-nc_sameSiteCookielax=true; secure; HttpOnly; expires=Fri, 31-Dec-2100 23:59:59 GMT; domain=myserver; path=/”), QNetworkCookie(“__Host-nc_sameSiteCookiestrict=true; secure; HttpOnly; expires=Fri, 31-Dec-2100 23:59:59 GMT; domain=myserver; path=/”), QNetworkCookie(“oc_sessionPassphrase=0PblB7DxYlbGXOd%2BKI9rSVB
jlB2g7R3K0NJ6Aqf4eH34MTPSaK; secure; HttpOnly; domain=myserver; path=/”), QNetworkCookie(“ocjoq9j60
u4vu1m3pr; secure; HttpOnly; domain=myserver; path=/”))
2021-05-05 17:32:25:369 [ info nextcloud.sync.credentials.webflow ]: request finished
2021-05-05 17:32:25:369 [ warning nextcloud.sync.networkjob ]: QNetworkReply::InternalServerError “Server replied "500 Internal Server Error" to "POST https://myserver/login\”" QVariant(int, 500)
2021-05-05 17:32:25:369 [ warning nextcloud.sync.credentials.webflow ]: QNetworkReply::InternalServerError
2021-05-05 17:32:25:369 [ warning nextcloud.sync.credentials.webflow ]: “Error transferring https://myserver/login - server replied: Internal Server Error”
2021-05-05 17:32:25:369 [ debug nextcloud.sync.credentials.flow2auth ] [ OCC::Flow2Auth::slotPollTimerTimeout()::<lambda ]: Error when polling for the appPassword QJsonObject({“error”:null}) “There was an error accessing the ‘token’ endpoint:
Error transferring https://myserver/login - server replied: Internal Server Error”
2021-05-05 17:32:25:369 [ debug nextcloud.sync.networkjob ] [ OCC::AbstractNetworkJob::slotFinished ]: Network job OCC::SimpleNetworkJob finished for “”
2021-05-05 17:32:25:408 [ debug nextcloud.sync.credentials.webflow ] [ OCC::WebFlowCredentials::slotAskFromUserCancelled ]: User cancelled reauth!
2021-05-05 17:32:25:408 [ info nextcloud.gui.account.state ]: Credentials asked for “https://myserver/nextcloud” are they ready? false
2021-05-05 17:32:25:408 [ info nextcloud.gui.account.state ]: AccountState state change: “Asking Credentials” → “Signed out”
2021-05-05 17:32:25:409 [ info nextcloud.gui.folder.manager ]: Account “user@myserver” disconnected or paused, terminating or descheduling sync folders

Any ideas?

Okay. figured it out. There was a misconfiguration with htaccess.RewriteBase, which pointed to the wrong directory, therefore leading to the timeout error

2 Likes