talk-android icon indicating copy to clipboard operation
talk-android copied to clipboard

Many "Login failed" in the log issued by the mobile app, although all works fine

Open HuguesDug opened this issue 2 years ago • 7 comments

Steps to reproduce

Connect to nextcloud Read the log file See that there are a lot of login failed reported.

Expected behaviour

No error of login

Actual behaviour

The IP adress shown in the error message is the one of my Android phone. No question about it... it is really me. It also shows my user name. I do not try to connect manually, it is the phone app that sometimes have a problem in the logging process it seams. Nothing is shown on the phone, all works correctly. Still, some error messages are dumped into the log...

It all appeared with upgrade from nextcloud 26 to 26.0.1, with all dependecies on apps.

Device brand and model

Huawei P20

Android version

9

Nextcloud Talk app version

16.0.1

Nextcloud server version

26.0.1

Talk version

No response

Custom Signaling server configured

Yes (specify version in Additional Information)

Custom TURN server configured

Yes

Custom STUN server configured

Yes

Android logs

No response

Server log

No response

Additional information

No response

HuguesDug avatar Apr 29 '23 08:04 HuguesDug

Checking log in depth, it seams it is an older bug than a recent one... it just happen more often now.

HuguesDug avatar Apr 29 '23 19:04 HuguesDug

I have a similar issue. My log has a lot of entries with one of my users getting failed logins from their Android phone where the app seens to work. Nextcloud 27.2 on Ubuntu server running Apache and php8.1 I can follow my user during the day going from home network to mobile to work network by the ip (redacted below) in the errors:

Warning core 37 minutes ago Login failed: 'User' (Remote IP: 'xxx.xxx.xxx.xxx')

I've had some from another user on iphone also.

SigLinJo avatar Sep 18 '23 23:09 SigLinJo

I've had some from another user on iphone also.

any known issues on iOS? @Ivansss @SystemKeeper ?

mahibi avatar Sep 26 '23 10:09 mahibi

Not that I am aware of something at least.

Can we get the complete entry maybe for the iPhone user and the Android one? @SigLinJo @HuguesDug

SystemKeeper avatar Sep 26 '23 10:09 SystemKeeper

Not that I am aware of something at least.

Can we get the complete entry maybe for the iPhone user and the Android one? @SigLinJo @HuguesDug

This is two examples of log entries with IDs IPs and names redacted:

{"reqId":"redacted","level":2,"time":"2023-09-26T05:12:12+00:00","remoteAddr":"redacted","user":"--","app":"core","method":"MKCOL","url":"/remote.php/dav/files/"iphoneuser"/Mobilbilder","message":"Login failed: '"iphoneuser"' (Remote IP: 'redacted')","userAgent":"Mozilla/5.0 (iOS) Nextcloud-iOS/4.7.0","version":"27.1.0.7","data":{"app":"core"},"id":"redacted"}

{"reqId":"redacted","level":2,"time":"2023-09-26T07:05:54+00:00","remoteAddr":"redacted","user":"--","app":"core","method":"PROPFIND","url":"/remote.php/dav/calendars/"androiduser"/","message":"Login failed: '"androiduser"' (Remote IP: 'redacted')","userAgent":"org.tasks/13.5.1 (okhttp3) Android/12","version":"27.1.0.7","data":{"app":"core"},"id":"redacted"}

Looking closer at these (there were a lot more info when I copied RAW) I see that the more problematic failed logins are coming from the tasks app. I'm checking with the user if that app is working as it should. Seems like there are problems with the iphone users app also, can be something wrong with their authentication credentials? Might have been human factor this time, will have the users log out and back in and see if that helps the situation...

SigLinJo avatar Sep 26 '23 12:09 SigLinJo

Here is the detailed log for my android phone. I have added the lines just before and after.

"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/lib/private/Files/Node/Root.php","Line":364,"message":"Error while running background job (class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions, arguments: )","exception":{},"CustomMessage":"Error while running background job (class: OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions, arguments: )"}}
{"reqId":"TtHpvFsIc2pMSB7luwWr","level":2,"time":"2023-09-20T13:15:21+00:00","remoteAddr":"37.165.xxx.xxx","user":"--","app":"core","method":"DELETE","url":"/ocs/v2.php/apps/notifications/api/v2/push","message":"Login failed: 'Hxxxxx' (Remote IP: '37.165.156.189')","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v17.1.0","version":"27.1.0.7","data":{"app":"core"}}
{"reqId":"EDnLYL6BPrp9198DZrOv","level":2,"time":"2023-09-20T13:15:56+00:00","remoteAddr":"37.165.xxx.xxx","user":"--","app":"core","method":"DELETE","url":"/ocs/v2.php/apps/notifications/api/v2/push","message":"Login failed: 'Hxxxxx' (Remote IP: '37.165.156.189')","userAgent":"Mozilla/5.0 (Android) Nextcloud-Talk v17.1.0","version":"27.1.0.7","data":{"app":"core"}}
{"reqId":"FdUbaYNoGZSuoOD0St7E","level":3,"time":"2023-09-20T13:40:03+00:00","remoteAddr":"","user":"--","app":"files","method":"","url":"--","message":"Backends provided no user object for ","userAgent":"--","version":"27.1.0.7","exception":{"Exception":"OC\\User\\NoUserException","Message":"Backends provided no user object","Code":0,"Trace":[{"function":"getUserFolder","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":74,"function":"call_user_func_array"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyRoot.php","line":40,"function":"__call","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":73,"function":"getUserFolder","class":"OC\\Files\\Node\\LazyRoot","type":"->"},

HuguesDug avatar Sep 27 '23 04:09 HuguesDug

Looking at the logs of @SigLinJo these are indeed unrelated to Talk. So I would suggest to contact the users and ask them what happened and if there are old accounts set up on their devices.

The one from @HuguesDug looks like Talk Android tries to unregister from the nextcloud instance and fails to do so (maybe the token was revoked?). @mahibi does Talk Android handle 401 correct ? https://github.com/nextcloud/notifications/blob/master/docs/push-v2.md#response-1 Also see https://github.com/nextcloud/talk-ios/blob/e5ede87995dc84f1af48ea88af2ac8e33cea38cc/NextcloudTalk/NCAPIController.m#L3226

SystemKeeper avatar Sep 27 '23 16:09 SystemKeeper