-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔥 [🐛] MessageList.tsx renderItem crash #2499
Comments
Hey @jmoyers14, do you face this for all the messages? |
What are the customizations that you have added and does your message object contains the |
Hey @jmoyers14, please help us reproduce this issue since we haven't been able to reproduce it on our side with our TypescriptMessaging app. |
He @khushal87 thanks for the patience. I'm working on getting a repo setup to isolate the issue. It doesn't seem to be any type of message in particular, not every channel member will experience the issue. When a user reports the issue I can fix it remotely by using the API to mark all their messages for the crashing channel as read. |
Yes, please. We are awaiting repro repo on this. |
@khushal87 I have a channel and user in our environment that can reproduce the issue. If we provide your team with the channel information are they able to test against your Typescript messaging app? |
Yes, please share the details. Please share your API key channel ID, the message ID, and the user credentials. You can mail me at khushal.agarwal@getstream.io. |
Thanks @khushal87! I sent you an email with the users credendials. I was able to reproduce the crash with this repository https://github.com/Trova-Trip/TrovaStreamchatReactNativeTesting We believe the issue is related to this code from
The length of the FlatList's data source changes during execution of the renderItem method, causing the undefined reference exception. Using the optional chain operator here seems at least work as a bandaid and prevent the crash
|
Hey @jmoyers14, so I tried your credentials on our TS sample app, and it worked fine, and there was no crash as such. PFA the video attached: Screen.Recording.2024-05-15.at.9.59.42.AM.mov |
In your TS sample app is the initialscrollToFirstUnreadMessage feature enabled? Once the user makes the messages as read the crash goes away. I’ll have to reset the user for the crash to come back Sent from my iPhoneOn May 14, Reiwa 6, at 9:37 PM, Khushal Agarwal ***@***.***> wrote:
Hey @jmoyers14, so I tried your credentials on our TS sample app, and it worked fine, and there was no crash as such. PFA the video attached:
https://github.com/GetStream/stream-chat-react-native/assets/39884168/492fe905-a118-4412-9ec5-5f4b53e6a466
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
So, should I send some unread messages on your app after enabling the prop |
@khushal87 If you are able to build and run the app in this repo https://github.com/Trova-Trip/TrovaStreamchatReactNativeTesting you can reproduce the crash following the steps:
Simulator.Screen.Recording.-.iPhone.15.-.2024-05-15.at.16.10.14.mp4The crash was not reproducable in the example app for two reasons:
I don't know the exact cause of the issue, but it occurs in a channel when Please let me know if there's anything else I can provide or if there are any issues building from the repo. Thanks again for all the effort! |
Is this a production app? can I send some messages from other user to test the bug? Or may be if you can send messages and then I can test? |
Thanks for trying! @khushal87 did you build and run from https://github.com/Trova-Trip/TrovaStreamchatReactNativeTesting ? You should not need to send any messages, the user and channel are already in a broken state. |
Hey @jmoyers14, I was able to reproduce this issue with your app. I see that the |
@khushal87 Awesome! Thanks for getting our repo up and running. If you pull the latest changes on main I added a 'mark message unread' action. You can reproduce the error state following the steps in this video:
Simulator.Screen.Recording.-.iPhone.15.-.2024-05-20.at.18.50.18.mov |
Hey @jmoyers14, thanks for being patient and providing us with the repro. I will investigate it further and try to get back to you soon. |
Hey @jmoyers14, this has been fixed with the check if the msg is undefined, and it will be live in the next release. Thanks for reporting 😄 |
Awesome thanks @khushal87. Do you guys patch fixes backwards or do we need to upgrade to the latest? |
Hey @jmoyers14, a new version will come up in the upcoming days and then you can use it that should solve your problem. |
🎉 This issue has been resolved in version 5.31.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Issue
I am experiencing a crash originating from the MessageList.tsx -> renderItem -> isMessageRead method. The error:
Steps to reproduce
I'm still investigating the steps to reproduce the issue. Not all channel members are affected.
Expected behavior
The application should not crash.
Project Related Information
React Native
react-native@0.72.3
stream-chat-expo@5.26.0
Customization
Offline support
Environment
Production
package.json
:# N/A
react-native info
output:info Fetching system and libraries information...
System:
OS: macOS 14.0
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 309.04 MB / 16.00 GB
Shell:
version: 3.5.1
path: /usr/local/bin/fish
Binaries:
Node:
version: 18.19.0
path: ~/Library/Caches/fnm_multishells/86785_1714063943275/bin/node
Yarn:
version: 1.22.19
path: /usr/local/bin/yarn
npm:
version: 10.2.3
path: ~/Library/Caches/fnm_multishells/86785_1714063943275/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.12.1
path: /Users/jmoyers/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK:
API Levels:
- "31"
- "32"
- "33"
Build Tools:
- 30.0.3
- 32.0.0
- 33.0.0
System Images:
- android-31 | Google Play Intel x86 Atom_64
- android-33 | Google APIs Intel x86_64 Atom
Android NDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java:
version: 18.0.2
path: /usr/bin/javac
Ruby:
version: 2.7.6
path: /Users/jmoyers/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.3
wanted: ^0.72.3
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
stream-chat-react-native
version you're using that has this issue:e.g. 5.4.3
e.g. Android 10
e.g. iPhone 11
Additional context
I'll keep posting here as I learn more. It seems the index is out of bounds of the
processedMessagesArray
not sure if our custom code can impact this or notEdit:
The issue goes away when we set
initialScrollToFirstUnreadMessage={false}
The text was updated successfully, but these errors were encountered: