Android client is not working

Actual behaviour

  • After entering server info and login details the login page is refreshed.

Expected behaviour

  • Should login to owncloud

Steps to reproduce

  1. On android client enter server info
  2. Click the arrow. Username and password fields are visible now.
  3. Enter login details and click on login button at bottom.

Can this problem be reproduced with the official owncloud server?
Yes, it is reproducible with owncloud server info.

Environment data

Android version:11 RKQ1.201004.002

Device model: Redmi Note 8

Stock or customized system: Stock

ownCloud app version:4.0 (26ccad5af)

ownCloud server version: 10.12.2.1

Logs

Web server error log

{"reqId":"RbvLoKcXWVYASysml4jU","level":0,"time":"2023-07-24T07:50:01+00:00","remoteAddr":"","user":"--","app":"cron","method":"--","url":"--","message":"Finished background job, the job took : 0 seconds, this job is an instance of class : OC\\Authentication\\Token\\DefaultTokenCleanupJob with arguments : "}
{"reqId":"4bc7daab-fbbd-45a4-8fea-b9e55a83822a","level":0,"time":"2023-07-24T07:50:04+00:00","remoteAddr":"192.168.1.2","user":"--","app":"OC\\Authentication\\Token\\DefaultTokenProvider::invalidateToken","method":"GET","url":"\/.well-known\/webfinger?rel=http%3A%2F%2Fopenid.net%2Fspecs%2Fconnect%2F1.0%2Fissuer&resource=http%3A%2F%2F192.168.1.50%3A8080","message":"invalidating token e0ca160b8e9d0c0e2bd3e072840777723f028f266ea2df8c39454ebe7f5b489fef9cd1e2e0fb27dd99e195374118312182f57acbc1f7e5487bc639d8c47947cc"}
{"reqId":"a9b65210-4262-42b4-ba63-14132a68113f","level":0,"time":"2023-07-24T07:50:04+00:00","remoteAddr":"192.168.1.2","user":"--","app":"OC\\Authentication\\Token\\DefaultTokenProvider::invalidateToken","method":"GET","url":"\/status.php","message":"invalidating token 5064adc14845a12d9f619641d68e2e15624764693538269a68c5037d55631216bd9cb4ad6058088b693defeea22760190c030b2bb9962bb2d6222227a8a831fc"}
{"reqId":"806f5719-0c91-4a3e-82f5-e84f6d7b1a68","level":0,"time":"2023-07-24T07:50:04+00:00","remoteAddr":"192.168.1.2","user":"--","app":"webdav","method":"PROPFIND","url":"\/remote.php\/dav\/files\/\/http%3A\/\/192.168.1.50%3A8080","message":"Exception: HTTP\/1.1 401 No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured: {\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotAuthenticated\",\"Message\":\"No public access to this resource., No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured, No 'Authorization: Basic' header found. Either the client didn't send one, or the server is misconfigured\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(89): Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod()\\n#1 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(456): Sabre\\\\DAV\\\\Server->emit()\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(253): Sabre\\\\DAV\\\\Server->invokeMethod()\\n#3 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Server.php(348): Sabre\\\\DAV\\\\Server->start()\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#5 \\\/var\\\/www\\\/owncloud\\\/remote.php(165): require_once('\\\/var\\\/www\\\/ownclo...')\\n#6 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php\",\"Line\":152}"}
{"reqId":"6edca5cc-855d-47b9-b92f-13ac9ebf8bf2","level":0,"time":"2023-07-24T07:50:12+00:00","remoteAddr":"192.168.1.2","user":"--","app":"OC\\Authentication\\Token\\DefaultTokenProvider::getToken","method":"PROPFIND","url":"\/remote.php\/dav\/files\/","message":"token 3d8c65e795dc106e410217a9beadfd4891f046fb078d5298fb76459ce79a6c143ed90d95177d0fbc7703d96773406b6099465c51e55aeb09ab1e8c2744eabd0c does not exist"}
{"reqId":"6edca5cc-855d-47b9-b92f-13ac9ebf8bf2","level":0,"time":"2023-07-24T07:50:12+00:00","remoteAddr":"192.168.1.2","user":"--","app":"OC\\User\\Session::login","method":"PROPFIND","url":"\/remote.php\/dav\/files\/","message":"regenerating session id for uid prem, password set"}
{"reqId":"6edca5cc-855d-47b9-b92f-13ac9ebf8bf2","level":0,"time":"2023-07-24T07:50:12+00:00","remoteAddr":"192.168.1.2","user":"--","app":"OC\\Authentication\\Token\\DefaultTokenProvider::getToken","method":"PROPFIND","url":"\/remote.php\/dav\/files\/","message":"token 3d8c65e795dc106e410217a9beadfd4891f046fb078d5298fb76459ce79a6c143ed90d95177d0fbc7703d96773406b6099465c51e55aeb09ab1e8c2744eabd0c does not exist"}
{"reqId":"6edca5cc-855d-47b9-b92f-13ac9ebf8bf2","level":0,"time":"2023-07-24T07:50:12+00:00","remoteAddr":"192.168.1.2","user":"--","app":"OC\\User\\Session::validateToken","method":"PROPFIND","url":"\/remote.php\/dav\/files\/","message":"token 3d8c65e795dc106e410217a9beadfd4891f046fb078d5298fb76459ce79a6c143ed90d95177d0fbc7703d96773406b6099465c51e55aeb09ab1e8c2744eabd0c, not found"}
{"reqId":"6edca5cc-855d-47b9-b92f-13ac9ebf8bf2","level":0,"time":"2023-07-24T07:50:12+00:00","remoteAddr":"192.168.1.2","user":"--","app":"core","method":"PROPFIND","url":"\/remote.php\/dav\/files\/","message":"OC\\Authentication\\LoginPolicies\\GroupLoginPolicy policy registered"}
{"reqId":"6edca5cc-855d-47b9-b92f-13ac9ebf8bf2","level":1,"time":"2023-07-24T07:50:12+00:00","remoteAddr":"192.168.1.2","user":"--","app":"OC\\User\\Session::loginInOwnCloud","method":"PROPFIND","url":"\/remote.php\/dav\/files\/","message":"login prem using \"password\" login type"}
{"reqId":"72b38830-4b4d-4ef5-838a-5a8c7b8abfd3","level":0,"time":"2023-07-24T07:50:12+00:00","remoteAddr":"192.168.1.2","user":"prem","app":"OC\\Authentication\\Token\\DefaultTokenProvider::getToken","method":"GET","url":"\/ocs\/v2.php\/cloud\/user?format=json","message":"token a0784524329ff0964863d800da6ed08c58dc2375f58ce21f7806deda62262d583cbcc7e30bf3c9d1fa720f54e908845a6646fe5c1e3906bcf91f6d0523fc621d does not exist"}
{"reqId":"72b38830-4b4d-4ef5-838a-5a8c7b8abfd3","level":0,"time":"2023-07-24T07:50:12+00:00","remoteAddr":"192.168.1.2","user":"prem","app":"OC\\Authentication\\Token\\DefaultTokenProvider::getToken","method":"GET","url":"\/ocs\/v2.php\/cloud\/user?format=json","message":"token 3d8c65e795dc106e410217a9beadfd4891f046fb078d5298fb76459ce79a6c143ed90d95177d0fbc7703d96773406b6099465c51e55aeb09ab1e8c2744eabd0c does not exist"}
{"reqId":"72b38830-4b4d-4ef5-838a-5a8c7b8abfd3","level":0,"time":"2023-07-24T07:50:12+00:00","remoteAddr":"192.168.1.2","user":"prem","app":"OC\\Authentication\\Token\\DefaultTokenProvider::generateToken","method":"GET","url":"\/ocs\/v2.php\/cloud\/user?format=json","message":"generating token a0784524329ff0964863d800da6ed08c58dc2375f58ce21f7806deda62262d583cbcc7e30bf3c9d1fa720f54e908845a6646fe5c1e3906bcf91f6d0523fc621d, uid prem, loginName prem, pwd set, name Mozilla\/5.0 (Android) ownCloud-android\/4.0, type temporary"}
{"reqId":"72b38830-4b4d-4ef5-838a-5a8c7b8abfd3","level":0,"time":"2023-07-24T07:50:12+00:00","remoteAddr":"192.168.1.2","user":"prem","app":"OC\\Authentication\\Token\\DefaultTokenProvider::updateToken","method":"GET","url":"\/ocs\/v2.php\/cloud\/user?format=json","message":"updating token 39, last check is now 1690185012"}
{"reqId":"72b38830-4b4d-4ef5-838a-5a8c7b8abfd3","level":0,"time":"2023-07-24T07:50:12+00:00","remoteAddr":"192.168.1.2","user":"prem","app":"OC\\Authentication\\Token\\DefaultTokenProvider::getToken","method":"GET","url":"\/ocs\/v2.php\/cloud\/user?format=json","message":"token 3d8c65e795dc106e410217a9beadfd4891f046fb078d5298fb76459ce79a6c143ed90d95177d0fbc7703d96773406b6099465c51e55aeb09ab1e8c2744eabd0c does not exist"}
{"reqId":"l9ciYw2WjUxGYObGoO3u","level":0,"time":"2023-07-24T07:50:14+00:00","remoteAddr":"127.0.0.1","user":"--","app":"OC\\Authentication\\Token\\DefaultTokenProvider::invalidateToken","method":"GET","url":"\/status.php","message":"invalidating token 0ab482e63d89ffaf6b952670c825da6c6c0f4a0cf20ff9da6aaaf10e0015171971bb1952f96de6c456291e8d09b95a50b7b54a8e03d808fb9dca482bbbe011c6"}
{"reqId":"HyTwbBDsZoE9APxjYJJ8","level":0,"time":"2023-07-24T07:50:23+00:00","remoteAddr":"192.168.1.11","user":"premadmin","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/settings\/admin\/log\/download","message":"token 936f66a434169d765903590171e91d8eeba7c180beaad276a52ab29a3685f594ee1a046f801d82d7be1617305eee65b0a3d1a882750c57a1d3e16656390a2e01 with token id 38 found, validating"}
{"reqId":"HyTwbBDsZoE9APxjYJJ8","level":0,"time":"2023-07-24T07:50:23+00:00","remoteAddr":"192.168.1.11","user":"premadmin","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/settings\/admin\/log\/download","message":"token 936f66a434169d765903590171e91d8eeba7c180beaad276a52ab29a3685f594ee1a046f801d82d7be1617305eee65b0a3d1a882750c57a1d3e16656390a2e01 with token id 38 found, validating"}
{"reqId":"HyTwbBDsZoE9APxjYJJ8","level":0,"time":"2023-07-24T07:50:23+00:00","remoteAddr":"192.168.1.11","user":"premadmin","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/settings\/admin\/log\/download","message":"token 936f66a434169d765903590171e91d8eeba7c180beaad276a52ab29a3685f594ee1a046f801d82d7be1617305eee65b0a3d1a882750c57a1d3e16656390a2e01 with token id 38 found, validating"}
{"reqId":"HyTwbBDsZoE9APxjYJJ8","level":0,"time":"2023-07-24T07:50:23+00:00","remoteAddr":"192.168.1.11","user":"premadmin","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/settings\/admin\/log\/download","message":"token 936f66a434169d765903590171e91d8eeba7c180beaad276a52ab29a3685f594ee1a046f801d82d7be1617305eee65b0a3d1a882750c57a1d3e16656390a2e01 with token id 38 found, validating"}

ownCloud log (data/owncloud.log)

D: 2023-07-24 13:20:11:908(LogBuilder.kt:38) .logHttp()[Network, response] [header] [72b38830-4b4d-4ef5-838a-5a8c7b8abfd3] Content-Security-Policy: default-src 'none';manifest-src 'self';script-src 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src 'self';connect-src 'self';media-src 'self'
D: 2023-07-24 13:20:11:909(LogBuilder.kt:38) .logHttp()[Network, response] [header] [72b38830-4b4d-4ef5-838a-5a8c7b8abfd3] Content-Length: 170
D: 2023-07-24 13:20:11:910(LogBuilder.kt:38) .logHttp()[Network, response] [header] [72b38830-4b4d-4ef5-838a-5a8c7b8abfd3] Keep-Alive: timeout=5, max=99
D: 2023-07-24 13:20:11:911(LogBuilder.kt:38) .logHttp()[Network, response] [header] [72b38830-4b4d-4ef5-838a-5a8c7b8abfd3] Connection: Keep-Alive
D: 2023-07-24 13:20:11:912(LogBuilder.kt:38) .logHttp()[Network, response] [header] [72b38830-4b4d-4ef5-838a-5a8c7b8abfd3] Content-Type: application/json; charset=utf-8
D: 2023-07-24 13:20:11:913(LogBuilder.kt:38) .logHttp()[Network, response] [body] [72b38830-4b4d-4ef5-838a-5a8c7b8abfd3] Length: 170 byte body
D: 2023-07-24 13:20:11:914(LogBuilder.kt:38) .logHttp()[Network, response] [body] [72b38830-4b4d-4ef5-838a-5a8c7b8abfd3] Type: application/json; charset=utf-8
D: 2023-07-24 13:20:11:915(LogBuilder.kt:38) .logHttp()[Network, response] [body] [72b38830-4b4d-4ef5-838a-5a8c7b8abfd3] --> Body start for response
D: 2023-07-24 13:20:11:917(LogBuilder.kt:38) .logHttp()[Network, response] [body] [72b38830-4b4d-4ef5-838a-5a8c7b8abfd3] {"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK","totalitems":"","itemsperpage":""},"data":{"id":"prem","display-name":"prem","email":null,"language":"en"}}}
D: 2023-07-24 13:20:11:918(LogBuilder.kt:38) .logHttp()[Network, response] [body] [72b38830-4b4d-4ef5-838a-5a8c7b8abfd3] <-- Body end for response -- Omitted: 0 bytes
D: 2023-07-24 13:20:11:920(GetRemoteUserInfoOperation.kt:58) .run()Successful response {"ocs":{"meta":{"status":"ok","statuscode":200,"message":"OK","totalitems":"","itemsperpage":""},"data":{"id":"prem","display-name":"prem","email":null,"language":"en"}}}
D: 2023-07-24 13:20:11:930(GetRemoteUserInfoOperation.kt:68) .run()Get User Info completed and parsed to RemoteUserInfo(id=prem, displayName=prem, email=null)
D: 2023-07-24 13:20:11:964(ViewModelExt.kt:68) $runUseCaseWithResult.invokeSuspend()Use case executed: LoginBasicAsyncUseCase with result: Success(data=prem@192.168.1.50:8080)
D: 2023-07-24 13:20:11:966(AuthenticationViewModel.kt:248) .discoverAccount()Account Discovery for account: prem@192.168.1.50:8080 needed: true
V: 2023-07-24 13:20:12:109(MainApp.kt:206) $onCreate.onActivityPaused()LoginActivity onPause() ending
V: 2023-07-24 13:20:12:134(BaseActivity.java:93) .onRestart()onRestart() start
V: 2023-07-24 13:20:12:141(BaseActivity.java:99) .onRestart()onRestart() end
V: 2023-07-24 13:20:12:143(MainApp.kt:193) $onCreate.onActivityStarted()FileDisplayActivity onStart() starting
V: 2023-07-24 13:20:12:145(FileDisplayActivity.kt:745) .onResume()onResume() start
V: 2023-07-24 13:20:12:147(MainApp.kt:202) $onCreate.onActivityResumed()FileDisplayActivity onResume() starting
W: 2023-07-24 13:20:12:149(DrawerActivity.kt:558) .setDrawerMenuItemChecked()setDrawerMenuItemChecked has been called with invalid menu-item-ID
V: 2023-07-24 13:20:12:150(FileDisplayActivity.kt:767) .onResume()onResume() end
D: 2023-07-24 13:20:12:155(DrawerActivity.kt:446) .updateQuota()Update Quota
I: 2023-07-24 13:20:12:244(AccountAuthenticator.java:91) .addAccount()Adding account with type owncloud and auth token null
V: 2023-07-24 13:20:12:259(FileDisplayActivity.kt:771) .onPause()onPause() start
V: 2023-07-24 13:20:12:260(MainApp.kt:206) $onCreate.onActivityPaused()FileDisplayActivity onPause() ending
V: 2023-07-24 13:20:12:261(FileDisplayActivity.kt:778) .onPause()onPause() end
V: 2023-07-24 13:20:12:359(FileDisplayActivity.kt:181) .onCreate()onCreate() start
D: 2023-07-24 13:20:12:362(MainApp.kt:115) $onCreate.onActivityCreated()FileDisplayActivity onCreate(Bundle) starting
I: 2023-07-24 13:20:12:376(AccountAuthenticator.java:91) .addAccount()Adding account with type owncloud and auth token null
D: 2023-07-24 13:20:12:445(AppRater.java:53) .appLaunched()The app has been launched 16 times
D: 2023-07-24 13:20:12:446(AppRater.java:69) .appLaunched()The number of launches already exceed 2, the default number of launches, so let's check some dates
D: 2023-07-24 13:20:12:447(AppRater.java:71) .appLaunched()Current moment is 1690185012447
D: 2023-07-24 13:20:12:448(AppRater.java:72) .appLaunched()The date of the first launch + days until prompt is 1690046896987172800000
D: 2023-07-24 13:20:12:449(AppRater.java:74) .appLaunched()The date of the neutral click + days until neutral click is 086400000
V: 2023-07-24 13:20:12:450(FileDisplayActivity.kt:258) .onCreate()onCreate() end
V: 2023-07-24 13:20:12:453(MainApp.kt:193) $onCreate.onActivityStarted()FileDisplayActivity onStart() starting
D: 2023-07-24 13:20:12:457(DrawerActivity.kt:446) .updateQuota()Update Quota
V: 2023-07-24 13:20:12:461(FileDisplayActivity.kt:745) .onResume()onResume() start
V: 2023-07-24 13:20:12:462(MainApp.kt:202) $onCreate.onActivityResumed()FileDisplayActivity onResume() starting
W: 2023-07-24 13:20:12:464(DrawerActivity.kt:558) .setDrawerMenuItemChecked()setDrawerMenuItemChecked has been called with invalid menu-item-ID
V: 2023-07-24 13:20:12:465(FileDisplayActivity.kt:767) .onResume()onResume() end
V: 2023-07-24 13:20:12:475(FileDisplayActivity.kt:771) .onPause()onPause() start
V: 2023-07-24 13:20:12:476(MainApp.kt:206) $onCreate.onActivityPaused()FileDisplayActivity onPause() ending
V: 2023-07-24 13:20:12:477(FileDisplayActivity.kt:778) .onPause()onPause() end
D: 2023-07-24 13:20:12:511(FileActivity.java:386) $OperationsServiceConnection.onServiceConnected()Operations service connected
D: 2023-07-24 13:20:12:608(MainApp.kt:115) $onCreate.onActivityCreated()LoginActivity onCreate(Bundle) starting
V: 2023-07-24 13:20:12:698(MainApp.kt:193) $onCreate.onActivityStarted()LoginActivity onStart() starting
E: 2023-07-24 13:20:12:700(LoginActivity.kt:517) .handleGetAuthorizationCodeResponse()OAuth request to get authorization code failed. State mismatching, maybe somebody is trying a CSRF attack.
V: 2023-07-24 13:20:12:704(MainApp.kt:202) $onCreate.onActivityResumed()LoginActivity onResume() starting
V: 2023-07-24 13:20:12:827(MainApp.kt:210) $onCreate.onActivityStopped()FileDisplayActivity onStop() ending
V: 2023-07-24 13:20:12:830(FileDisplayActivity.kt:731) .onSaveInstanceState()onSaveInstanceState() start
V: 2023-07-24 13:20:12:832(MainApp.kt:219) $onCreate.onActivitySaveInstanceState()FileDisplayActivity onSaveInstanceState(Bundle) starting

Here are a few diagonostics steps I tried,

  1. Current owncloud login is working on other android devices, so no issues with login info.

  2. Other owncloud logins are also not working in this device.

  3. Current login is working when logged from browser in the same android device (where app would not work).

PS: I have posted only partial log output due the words limitation in forum.

Hey,

i think this looks very strange and for some reason a IP address is appended to some URL on the web server.

Could it be possible that either a wrong URL is entered on the login screen or that some kind of proxy setting configured on the device itself is tempering with the HTTP requests done by the Android App?

  1. Proxy setting is null on the device.
  2. I rechecked the URL and it is correct. In fact I am able to login from browser on the same device. Only the android app has issue.

I also have problems connecting with the android app. It worked seamlessly, but after having to re-authenticate, I am stuck in the auth-process. Seems like the redirect URL isn’t working, something like that.

I found a workaround it by having dual accounts enabled for this app.

The logs show some token-related errors, such as “invalidating token” and “token does not exist.” This could indicate a problem with session tokens. Try logging out of the Android app, clearing app data (cache), and then logging back in. It might be helpful. Once I stuck into a similar problem.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.