-
Notifications
You must be signed in to change notification settings - Fork 325
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
Crash - ERROR [TypeError: imageProp.includes is not a function (it is undefined)] #2816
Comments
I am getting the same error. The app crashes upon receiving new message on channel screen.
|
Hey @Saad-Bashar @fathulfahmy, I am not able to reproduce this crash but I get this could happen. But to appropriately fix it. I would need to provide the same env. Can you share with me if the user with the image(for which it crashes) has name, and is its imageUrl |
Thank you @khushal87 for pointing out the cause of error. I mistakenly set user image to an object instead of uri. The issue has been solved for me. User JSON"user": {
"id": "1",
"name": "Demo User 1",
"email": "[email protected]",
"email_verified_at": "2024-12-30T16:40:24.000000Z",
"created_at": "2024-12-30T16:40:24.000000Z",
"updated_at": "2024-12-30T16:40:24.000000Z",
"deleted_at": null,
"avatar": {
"uri": "http://172.20.10.3:8000/storage/images/placeholder_image_500_500.png",
"name": "placeholder_image_500_500.png",
"type": "image/png"
},
"media": []
} Incorrect user initialization await client.connectUser(
{
id: data.user.id,
name: data.user.name,
image: data.user.avatar,
},
data.chat_token,
); Correct user initialization await client.connectUser(
{
id: data.user.id,
name: data.user.name,
image: data.user.avatar.uri,
},
data.chat_token,
); |
That's the only case in which I can predict something like this will happen. 😅 |
What about you @Saad-Bashar? |
Whenever I get a new message from another user the
<Channel />
component crashes. It crashes on theAvatar
component from stream chat RN components. The is where it exactly crashesgetResizedImageUrl
,Please note that all my users are not connected with avatar. Some users may have avatar, some users don't have any avatar. How can we fix this issue? Thanks!
The text was updated successfully, but these errors were encountered: