Repository navigation
An unknown error occured when logging in #342
Copy link
Copy link
Closed
Labels
bugneeds infoWaiting for info from user(s). Issues with this label will auto-stale.Waiting for info from user(s). Issues with this label will auto-stale.priority: high
Description
Actual behaviour
App successfully connects to the server upon entering the address. But after inputting the right login credentials and clicking on Login an unknown error occurs.
Only happens on this device. Other devices (like Nexus 5, Jolla, BlackBerry Z30) connect successfully.
The client on the phone does work with an older ownCloud instance though.
Expected behaviour
Login succeeds.
Steps to reproduce
- Input server URL
- Input username & password
- Click on Login
Environment data
Android version: 6.0
Device model: LG G4
Stock or customized system: stock
Nextcloud app version: 1.3.1
Nextcloud server version: 10.0.1
Logs
Web server error log
no error happens on server side
Nextcloud log (data/nextcloud.log)
Logcat output:
10-16 16:42:44.277 31269-5692/? D/GetRemoteUserInfoOperation: Successful response: <!DOCTYPE html>
<html class="ng-csp" data-placeholder-focus="false" lang="en" >
<head data-user="username" data-user-displayname="username" data-requesttoken="token removed by me">
<meta charset="utf-8">
<title>
Files - Cloud </title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="referrer" content="never">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
<meta name="apple-itunes-app" content="app-id=1125420102">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="ownCloud">
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#102083">
<link rel="icon" href="/owncloud/core/img/favicon.ico">
<link rel="apple-touch-icon-precomposed" href="/owncloud/core/img/favicon-touch.png">
<link rel="mask-icon" sizes="any" href="/owncloud/core/img/favicon-mask.svg" color="#0082c9">
<link rel="stylesheet" href="/owncloud/core/css/styles.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/inputs.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/header.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/icons.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/fonts.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/apps.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/global.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/fixes.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/multiselect.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/mobile.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/vendor/jquery-ui/themes/base/jquery-ui.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/jquery-ui-fixes.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/tooltip.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/share.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/apps/files_versions/css/versions.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/apps/audioplayer/css/3rdparty/fontello/css/fontello.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/apps/audioplayer/css/style.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/apps/files_pdfviewer/css/style.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/apps/files_videoplayer/css/style.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/apps/firstrunwizard/css/colorbox.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/apps/firstrunwizard/css/firstrunwizard.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/apps/gallery/css/slideshow.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/apps/gallery/css/gallerybutton.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/core/css/jquery.ocdialog.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/apps/files/css/files.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/apps/files/css/upload.css?v=ddab49e9822f524c8df370e2da30677a">
<link rel="stylesheet" href="/owncloud/apps/fi
10-16 16:42:44.280 31269-5692/? E/GetRemoteUserInfoOperation: Exception while getting OC user information
org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONObject
at org.json.JSON.typeMismatch(JSON.java:111)
at org.json.JSONObject.<init>(JSONObject.java:160)
at org.json.JSONObject.<init>(JSONObject.java:173)
at com.owncloud.android.lib.resources.users.GetRemoteUserInfoOperation.run(GetRemoteUserInfoOperation.java:77)
at com.owncloud.android.lib.common.operations.RemoteOperation.execute(RemoteOperation.java:136)
at com.owncloud.android.authentication.AuthenticatorAsyncTask.doInBackground(AuthenticatorAsyncTask.java:84)
at com.owncloud.android.authentication.AuthenticatorAsyncTask.doInBackground(AuthenticatorAsyncTask.java:41)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugneeds infoWaiting for info from user(s). Issues with this label will auto-stale.Waiting for info from user(s). Issues with this label will auto-stale.priority: high
Activity
derkostka commentedon Oct 16, 2016
Same happens on Nexus 7 (2013). No Login possible ...
AndyScherzinger commentedon Oct 17, 2016
@derkostka do you see the same log entries?
@Gerii do you use the same user/credentials on all the devices you mentioned or do they differ? What I can read from the log you provided is that while the client tried to read an expected JSON reply the server replied with a HTML webpage which leads to the error.
@MorrisJobke @nickvergessen any idea what's happening here?
cc @tobiasKaminsky
nickvergessen commentedon Oct 17, 2016
Seems like an exception page is being printed. Can you have a look at the nextcloud server log?
Gerii commentedon Oct 17, 2016
@AndyScherzinger
The same account works on a different device.It seems to happen for every new account. So it's not device specific as I initially thought.@nickvergessen There is nothing which would hint at an error in the nextcloud.log on the server. (except a few entries where I mistyped the password of the test account I was using)
Gerii commentedon Oct 17, 2016
I looked through the Apache access logs and I think that's one of the failed login attempts:
There is a 302 in there, so that explains the HTML site. I don't have a clue why it does this though.
[-]LG G4 - An unknown error occured when logging in[/-][+]An unknown error occured when logging in[/+]derkostka commentedon Oct 17, 2016
@AndyScherzinger same error-log for me (i just copy the last lines here, the rest is exactly the same as above)
nickvergessen commentedon Oct 18, 2016
This URL is wrong. The correct URL is
ocs/v1.php/cloud/user?format=jsonandocs/v2.php/cloud/user?format=jsonCan you check the redirects on your server?
AndyScherzinger commentedon Oct 18, 2016
@nickvergessen .... hmmm, the client library uses the one mentioned:
https://github.com/nextcloud/android-library/blob/master/src/com/owncloud/android/lib/resources/users/GetRemoteUserInfoOperation.java#L49
-->
private static final String OCS_ROUTE = "/index.php/ocs/cloud/user?format=json";which route would be save for Nextcloud and also let's say oC8.x? is it save to use v2?
AndyScherzinger commentedon Oct 18, 2016
see also nextcloud/android-library#18
nickvergessen commentedon Oct 18, 2016
ocs/v1.php/cloud/user?format=jsonis the route, since ever!index.php/ocs/never worked (intended)AndyScherzinger commentedon Oct 18, 2016
@nickvergessen perfect :) --> https://github.com/nextcloud/android-library/pull/21/files#diff-edcf6967567594420549a81338e02d99R49 - will have to wait for jitpack to do the build/publish to test drive this for @tobiasKaminsky to do the review then 😃
AndyScherzinger commentedon Oct 21, 2016
Hi @Gerii can you test our latest beta client release (can be installed in parallel to the regular app):
https://f-droid.org/repository/browse/?fdfilter=com.nextcloud&fdid=com.nextcloud.android.beta
It contains a fix for a login issue we found and which has been discussed in this issue, so this might solve your problem and will then also be integrated into the next regular/stable release 1.4.0
Gerii commentedon Oct 21, 2016
I have already tested it, it's working now. Thanks!
5 remaining items
Fade78 commentedon Feb 16, 2017
Hello,
I tried the client on google play, I tried the client on F-droid (1.4.1) and the beta client on F-droid (20170214) and I still have the "unknown" error. I'm on a Galaxy S5 Android 4.4.2.
tobiasKaminsky commentedon Feb 17, 2017
@Fade78 if you want you can write an email to android AT nextcloud DOT com with your server address and I will have a look, please refer to this issue.
unalignedcoder commentedon Mar 11, 2017
Same problem here. I just downloaded the app today from GooglePlay. It crashes upon login. Not sure it even logs in, as the login screen just suddenly disappears. I only tested this with my Samsung Note 3 with Android 4.4.2. NextCloud installed on the server via Scriptaculous.
unalignedcoder commentedon Mar 26, 2017
FYI... the last update 1.4.2 still has this problem. Funny thing, I can perfectly login and handle files via Solid Explorer.
tobiasKaminsky commentedon May 12, 2017
@unalignedcoder can you write to android at nextcloud dot com and give us your server address with a dummy test account?
eqyiel commentedon Jun 12, 2017
This is happening to me too, AFAICT these are the relevant lines from logcat:
tobiasKaminsky commentedon Jun 21, 2017
@eqyiel can you create us a test account and mail it to android at nextcloud dot com with a reference to this issue?
eqyiel commentedon Jun 25, 2017
@tobiasKaminsky sent
tobiasKaminsky commentedon Jul 25, 2017
@eqyiel
According to my emails the problem was due to a missing endpoint and can be fixed on server side.
If this bug is still valid, please re-open with more details.
eqyiel commentedon Jul 25, 2017
@tobiasKaminsky Indeed, thank you!