You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please keep in mind that our chatClient is a singleton instance. This means that in certain scenarios it will not trigger an update to the downstream components by simply connecting and reconnecting. To be sure that this is the issue (looks like it to me), can you please add a random key prop to your Chat component whenever you switch users ? So it would be something like:
and then use setRandomId during both login and logout:
const login = () => {
// ... other code
setRandomId(uuidv4()); // or any other uuid library
}
const logout = () => {
// ... other code
setRandomId(uuidv4()); // or any other uuid library
}
You mentioned that this happens when you login/logout really quickly; have you been successful in this working as intended whenever you do not do that ? Would be quite surprised if that's the case but interested to see.
Issue
On a live activity channel
<MessageInput />
will be available so they can comment<MessageInput />
will disappear.In both cases, they should be able to see the channel contents.
It seems like this is not possible and results in this message: "Error loading messages for this channel"
Steps to reproduce
Steps to reproduce the behavior:
I've tried a few ways to switch the user from authenticated to anonymous:
Simple:
Clear out everything:
The code is roughly the same going from authed to non-authed or vice versa; I've only included converting to anonymous for brevity.
Expected behavior
I would like the app to be able to seamlessly transition between an anonymous and authed state.
Project Related Information
Expo SDK 51
Customization
Offline support
Environment
Click To Expand
package.json
:react-native info
output:CLI command not found
stream-chat-react-native (note: this is for expo, but likely occurs on
stream-chat-react-native` too ) version you're using that has this issue:^5.31.1
e.g. iOS 17.5
e.g. iPhone 15 pro
Additional context
Screenshots
Please note, that I am not calling connect multiple times. I think that rapidly disconnecting and re-connecting causes this error.
The text was updated successfully, but these errors were encountered: