stream-chat-react-native icon indicating copy to clipboard operation
stream-chat-react-native copied to clipboard

ChannelList crash caused by SQLite

Open 1987cr opened this issue 3 years ago • 3 comments

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:

  1. User 1 triggers action that creates the channel on the backend
  2. It appears on ChannelList for both users
  3. User 2 triggers action that updates said channel on the backend
  4. 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

Screenshot 2022-09-15 at 12 13 28 Screenshot 2022-09-15 at 12 13 36

1987cr avatar Sep 15 '22 10:09 1987cr

@andreibarabas we are yet to test it on RN 0.70, but wondering if you faced this issue so far?

vishalnarkhede avatar Sep 22 '22 09:09 vishalnarkhede

@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

andreibarabas avatar Sep 28 '22 10:09 andreibarabas

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?

madsroskar avatar Sep 29 '22 10:09 madsroskar

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 avatar Oct 10 '22 17:10 1987cr

@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.

vanGalilea avatar Oct 18 '22 08:10 vanGalilea

It is still happening on v4 for me.

billnbell avatar Nov 10 '22 16:11 billnbell

result[0].user_version you might want to not assume user_version is there.

billnbell avatar Nov 10 '22 17:11 billnbell

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 ...

vishalnarkhede avatar Nov 14 '22 10:11 vishalnarkhede

:tada: This issue has been resolved in version 5.5.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

vishalnarkhede avatar Nov 18 '22 19:11 vishalnarkhede