UIKit React Native: not all existing chats are listed

The legacy version of our chat (web based) is uses “sendbird-uikit”: “^2.3.0”,

We are implementing a new version (RN based) which uses “@sendbird/uikit-react-native”: “^3.3.0”.

On the web version, 5 existing group chats are listed in the group list window for user “John Doe” .

On the new version only 3 chats are listed.

However as soon as we send a message from user John Doe inside of one of those missing chats using the legacy version, then that missing chat shows up on the new version.

We are trying to understand if there is some criteria or missing configuration that would cause those 2 specific channels not to be listed.

Hello @J_Arau,

Can you provide more context around your implementation? Right now there is not much for us to go by as there could be a number of reasons this might occur.

Can you share any custom code or parameters you’re passing in anything unique about the channels that are not listed by default?

Hey Tyler, thank you for getting back to us.
I am basically copying from the code from here: GitHub - sendbird/sendbird-uikit-sample-react-native-expo: [Sample] React-Native UIKit for Expo
More info bellow, let me know if you need any other information, thanks!

factory.ts (see https://github.com/sendbird/sendbird-uikit-sample-react-native-expo/blob/77f8cbe9bc21f15c15796af75375078013db4a41/src/factory/index.ts)

App.tsx

function App() {
 [ ... ]
  return (
    <AppContext.Provider value={{ state, ...methods, dispatch }}>
    <SendbirdUIKitContainer
      appId={process.env.EXPO_PUBLIC_SENDBIRD_APP_ID as string} 
      uikitOptions={{
        common: {
          enableUsingDefaultUserProfile: true,
        },
        groupChannel: {
          enableMention: true,
        },
        groupChannelList: {
          enableTypingIndicator: true,
          enableMessageReceiptStatus: true,
        },
        groupChannelSettings: {
          enableMessageSearch: true,
        },
      }}
      chatOptions={{
        localCacheStorage: AsyncStorage,
        onInitialized: SetSendbirdSDK,
        enableAutoPushTokenRegistration: true,
      }}
      platformServices={platformServices}
      styles={{
        defaultHeaderTitleAlign: "left", //'center',
        theme: LightUIKitTheme,
        statusBarTranslucent: GetTranslucent(),
      }}
      errorBoundary={{ ErrorInfoComponent: ErrorInfoScreen }}
      userProfile={{
        onCreateChannel: (channel: any ) => {
          const params = { channelUrl: channel.url };
          if (channel.isGroupChannel()) {
            messagingNavigationRef.navigate(MessagingRoutes.GroupChannel, params);
          }

        },
      }}
    >
      [...]
        </NavigationContainer>
      </RootSiblingParent>
      </SendbirdUIKitContainer>
    </AppContext.Provider>
       

GroupChannelListScreen.tsx

import { createGroupChannelListFragment } from '@sendbird/uikit-react-native';
import { useConnection } from '@sendbird/uikit-react-native';
import { User } from '@sendbird/chat';


const GroupChannelListFragment = createGroupChannelListFragment();
const GroupChannelListScreen = ({ navigation } : ScreenProps) => {

  const [user, setUser] = useState<User | null>(null);

  const { connect } = useConnection();

  useEffect(() => {
    connect('USER_ID', { accessToken: _token })
        .then((_user: User) => {
          console.log('User is connected to Sendbird server', _user);
          // do stuff wit user
        })
        .catch((_err) => {
          console.log('User is not connected to Sendbird server', _err);
        });
  }, [connect, setUser]);


  if(!user) return (
    <View style={{}}<Text>Connecting to send bird...</Text></View>
  )

  return (
    <GroupChannelListFragment
      onPressCreateChannel={() => {
        // ignore for now
      }}
      onPressChannel={(channel) => {
        navigation.navigate (MessagingRoutes.GroupChannel, { channelUrl: channel.url });
      }}
    />
  );
};

@J_Arau,

Could you use RN Tools to look at the channel list query that the React Native UIKit is making, and compare it to to the query your web app is making? It would help use really understand why you’re seeing this.

@Tyler that’s a great suggestion!

I haven’t been able to try just that yet but here’s some additional bits I found out about the RN implementation:


from the image above you can see that in the RN implementation 2 calls to the same send grid API endpoint (my_group_channels) are issued in rapid succession, the first one returns 6 channels listed and the second call returns 4 channels listed. Ultimately 4 channels are displayed on the UI. Any hints on why 2 calls are made ?

[continuing from the last message due to image upload limits]

Here’s the diff of the 2 calls mentioned in my previous message (both from the RN app).