GetStream / stream-chat-react-native

💬 React-Native Chat SDK ➜ Stream Chat. Includes a tutorial on building your own chat app experience using React-Native, React-Navigation and Stream
https://getstream.io/chat/sdk/react-native/
Other
969 stars 324 forks source link

🔥 Many images from the random_svg endpoint come back with 404 error #2234

Closed jeffbonasso-ambifi closed 1 year ago

jeffbonasso-ambifi commented 1 year ago

Issue

Internally the Avatar and GroupAvatar is using an random image lookup with the initials of the user. There are a lot of images missing from this lookup and it returns a 404 error which then causes the entire GroupAvatar to be gray.

Two examples that don't work... https://getstream.imgix.net/images/random_svg/AS.png https://getstream.imgix.net/images/random_svg/AT.png

An example that works... https://getstream.imgix.net/images/random_svg/AR.png

returns a 404 error

For now, the workaround I did was to comment out the isLoadingImageError test in GroupAvatar.

{/*isLoadingImageError ? (
        <View
          style={{
            backgroundColor: '#ececec',
            borderRadius: size / 2,
            height: size,
            width: size,
          }}
        />
      ) : */

This has a better result, but obviously the proper fix is that random_svg brings back a proper image. There are many initials where a 404 is coming back.

Steps to reproduce

Steps to reproduce the behavior:

Create a channel with multiple members and have one of the members with the initials AS.

Expected behavior

It brings back a proper image for random_svg endpoint

Project Related Information

Customization

Click To Expand

I commented out this code in GroupAvatar.tsx. This problem shows visually in ChannelList when displaying group avatars. ```typescript jsx {/*isLoadingImageError ? ( ) : */ ```

Offline support

Environment

Click To Expand

#### `package.json`: ```json # N/A ``` **`react-native info` output:** ``` N/A ``` - **Platform that you're experiencing the issue on**: - [ ] iOS - [ ] Android - [ ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [x] Both - **`stream-chat-react-native` version you're using that has this issue:** Version 5.17.1 - Device/Emulator info: - [ ] I am using a physical device - OS version: `e.g. Android 10` - Device/Emulator: `e.g. iPhone 11`

Additional context

Screenshots

Click To Expand


vishalnarkhede commented 1 year ago

@jeffbonasso-ambifi please reach out to support@getstream.io, since this is not RN SDK related issue.