RN apps log users out and forget servers intermittently
- Your Rocket.Chat Experimental app version: Official 4.1.0.2095, Experimental 4.2.0
- Your Rocket.Chat server version: 3.0.0 and 2.3.0
- Device (or Simulator) you're running with: Samsung Galaxy JS, HomTom HT72, Android 6.0.1 and Android 7.
Once in a while when I try to open an app or click on a push message, the app launches but prompts me to type in the server address and log in, although I did not log out previously. Difficult to reproduce as it seems to happen without any rule. Sometimes it loads the server and channels before logging me out again.
Same issue here on iOS, app keeps logging me out and forgetting servers.
iOS App: 4.1.0 Servers: 2.3.0 and 2.2.1
Why is that even a thing? Servers should be stored forever until manually excluded. This never happens with the desktop app or the native app.
Hello @lkraider .
I'm trying to solve this, but I can't reproduce it here.. You have steps to follow and reproduce this issue?
Can you reach me on https://open.rocket.chat?
My username is djorkaeff.alexandre.
@lkraider Look like this is not an issue on the latest (beta) release anymore. Would you please try to join the TestFlight and download the beta version? https://github.com/RocketChat/Rocket.Chat.ReactNative#testflight I hope it can work for you. Otherwise, please let us know if still persists on 4.2.0
I built version 4.2.0 locally and ran on my iPhone, and the problem persists. Could it be related to me running iOS 10.2 (iPhone 6)? I am not sure how to go about debugging this part of the app.
@djorkaeffalexandre Here's more information for you to consider (I could not reproduce it yet, though) Affected environment:
App: Official 4.2.3 and Experimental 4.3.0 Devices: iPhone X, iPhone XS Max (IMPORTANT - tested with iPhone XR 13.3 with the same server, and there were no issues) Server versions: 1.3.2, 2.4.1 iOS: 13.3
The app log you out every time you minimise it or switch to any other app. If you have it open, screen active, it stays logged in.
It's going to be released on 4.3.1
Hi, sorry to bring this up again, but only recently I updated to iOS 12 and could test the new Rocket Chat releases, and unfortunately the issue still happens for me.
With the help of @diegolmello we were able to find the issue in my case: the same underlying user id on two servers.
This happened in my case because I migrated data between two servers, and it replicated my user between them, storing it with the same id in the database.
The RN app stores connection information under the user id, so when switching, it overwrites the token for the connection with the current selected server, and when switching back it will send that token to the wrong server, causing the logout.
In the desktop app this is not an issue.