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

Multi account issues

Open timkrief opened this issue 1 year ago • 9 comments

Steps to reproduce

I have multiple accounts (5+) registered on the app that are all on the same server, let's call the first one account A and a second one account B.

Expected behaviour

When connected with an account, it should only show conversations from that account, when sending a message, it should be from that account. When checking info, it should be info from that account.

Actual behaviour

When I'm connected with account B and I try to open a conversation or check account info it seems to revert back internally to account A, the first that I registered, showing the info and conversation from account A but still showing that it's account B connected and the avatar from account B. Changing to account A and back to account B shows the right conversations until I try to open a conversation or check account info again. Sometimes things go really wrong, messages are sent by another account or the conversation doesn't open at all.

Device brand and model

Samsung Galaxy S10

Android version

12

Nextcloud Talk app version

19.0.1

Nextcloud server version

29.0.3

Talk version

19.0.7

Custom Signaling server configured

None

Custom TURN server configured

None

Custom STUN server configured

None

Android logs

No response

Server log

No response

Additional information

Most conversations are direct conversations between the different accounts.

timkrief avatar Jul 30 '24 12:07 timkrief

@timkrief , I can confirm strange behaviours with multiaccount on the same server, or multiaccounts between differents servers. I've two accounts with the same username on 2 diferent servers... and I only receive notifications on the account on 1st server configured for the "matching username". Other accounts on the 2on server (with no duplicated account username) receive notifications correctly. See: https://github.com/nextcloud/talk-android/issues/3658#issue-2151158488

migulen avatar Jul 30 '24 13:07 migulen

Same problem. I made some tests, and it seems that the problem come from the session tokens. If there are more than one session tokens for the same device on the same server, the server doesn't know which session token to use when the app attempt to retrieve data. As a workaround, you need to clean up one session on the device and reconnect it, or clean the session tokens at the server side.

Arnith avatar Aug 07 '24 07:08 Arnith

As a workaround, you need to clean up one session on the device and reconnect it, or clean the session tokens at the server side.

@Arnith I'm not sure how I would have to do this. Do you have documentation on this?

timkrief avatar Aug 09 '24 12:08 timkrief

Thanks @Arnith !! In my case, I think I've done 'login out' and 'login in' on serveral devices, and always happens the same, only the 1rs account configured on Android Talk receive notifications.

In my case, the servers and the accounts could have the same initial token, because the 2nd server was cloned from de 1st one. So probably, my user has the same token on the two servers.

It's possible "renew" the user account token without deleting it ? And the same for the server ? (https://help.nextcloud.com/t/set-serverinfo-token-in-config-file/163475)

@timkrief have you been lucky ? @AndyScherzinger, @mahibi can you help us, or guide to someone that could help us ?

Thanks in advance.

...

migulen avatar Aug 09 '24 16:08 migulen

@timkrief have you been lucky ?

@migulen no, sorry, I'm not well versed with the sessions or session tokens, client or server side. I don't know how to change them or update them. I can't use the app right now with more than one account.

timkrief avatar Aug 11 '24 13:08 timkrief

It's possible to revoke a device from the device itself on the app (remove the account and add new account) or from the user settings in menu "Security". There is normally also an occ command, but I don't remember it.

Arnith avatar Aug 22 '24 09:08 Arnith

@Arnith thanks for the comment, but I've already done that a lof of times, by the two ways, and it doesn't work.

Has to be involved something more.

migulen avatar Aug 23 '24 08:08 migulen

Hi all, sorry for the late answer. I will have a closer look!

mahibi avatar Sep 23 '24 09:09 mahibi

@mahibi ,

On my case I'm trying to isolate if the problem of the notifications only comes because I've the same user login on the two servers, and if them are not relayed because the Nextcloud Talk App can't manage itself, or because FCG (Firebase Cloud Messaging) it's not informing correctly to the Nextcloud Talk App.

I can confirm that with Android based mobiles that support "duplicated apps" (like Xiaomi are) I'm able to configure the 2 accounts on the "duplicate Nextcloud Talk app", with the same username , but diferent Nextcloud server, and both receive the notificacions correctly. So I think that Nextcloud Talk App isn't able to manage this situation, but I'm not 100% sure.

By other way, when you share a file (like an image) from other app (like firefox) to Nextcloud Talk App, it's impossible to "switch the user account if you have 2 (or more) accounts configured", it always shows the last checked account.

The version of Nextcloud Talk Android App is: v20.0.1 The version of Nextcloud Server is: v28.0.10 The version of Nextcloud Talk/Spreed (Server side): v18.0.11

I hope it helps.

NOTE: Samsung Android mobiles don't have the "Duplicate Apps" like Xiaomi have, so it's more important for the first mobiles, the second one, you can do a little workaround for 2 accounts, but not for more.

#3658

migulen avatar Sep 23 '24 10:09 migulen