stream-chat-react-native
stream-chat-react-native copied to clipboard
ChannelList crash caused by SQLite
Describe the bug Is possible to get ChannelList to an unrecoverable state when offline mode is enabled
Dev environment info (please complete/provide the following information):
- stream-chat-react-native 5.3.0
- react-native 0.70.0
- react-native-quick-sqlite 4.0.7
To Reproduce Non deterministic because we only have had it 2 or 3 times, but the steps are more or less the following:
- User 1 triggers action that creates the channel on the backend
- It appears on ChannelList for both users
- User 2 triggers action that updates said channel on the backend
- User 2 ChannelList throw errors attached
Additional context
- Recently we updated RN to 0.70 and had to update react-native-quick-sqlite to latest version to get RN 0.70 support
- Removing offline support seems to fix the issue for the moment
Screenshots
@andreibarabas we are yet to test it on RN 0.70, but wondering if you faced this issue so far?
@vishalnarkhede , no, we have not yet experienced this issue. we are on RN 0.70.1 with Turbo modules enabled (not fabric for the moment). will keep an eye out for such crashes and will circle back to you guys
Hi, @1987cr
I'm having some trouble reproducing this issue. I was wondering whether you could give some information about what kind of change user 2 triggers for the channel before the error occurs?
Hi @madsroskar, sorry I haven't been able to reproduce this and have change quite some code since, app and backend wise, feel free to close this one, if I see error again I'll update issue with more details.
@1987cr thanks for updating us. I'll be closing this issue for now. Please don't hesitate to contact us in the future if this issue or any questions arise.
It is still happening on v4 for me.
result[0].user_version you might want to not assume user_version is there.
So I think whats happening here is that one of the foreign key constrains fails somehow, and causes the database to be locked state forever (until you reopen the app). Investigating more ...
:tada: This issue has been resolved in version 5.5.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket: