Cannot read property 'isChatDisabled' of null

All integrations were made following the Zoom Video SDK documentation.
I’m having some unsolved issues in the documentation.

Below is the section that is causing the problem. When I hide the lines that insert the ZoomVideoSdkProvider the error stops happening.

export default () => {
  useEffect(() => {
    const checkZoomSdk = async () => {
      try {
        const sdk = await ZoomVideoSdk.getInstance();
        if (sdk) {
          console.log('Zoom SDK initialized successfully');
          const isChatDisabled = sdk.isChatDisabled ? sdk.isChatDisabled() : null;
          console.log('isChatDisabled:', isChatDisabled);
        } else {
          console.error('Zoom SDK instance is null');
        }
      } catch (error) {
        console.error('Error initializing Zoom SDK:', error);
      }
    };

    checkZoomSdk();
  }, []);
  return (
    <I18nextProvider i18n={i18n}>
      <PaperProvider>
        <AuthProvider>
          <ZoomVideoSdkProvider
            config={{
              appGroupId: '{Your Apple Group ID here}',  // se estiver usando em iOS
              domain: 'zoom.us',
              enableLog: true,
              apiKey: '<<redacted>>', 
              apiSecret: '<<redacted>>'', 
            }}
          >
            <SafeAreaView style={styles.container}>
              <NavigationContainer>
                <MyStack />
              </NavigationContainer>
            </SafeAreaView>
          </ZoomVideoSdkProvider>
        </AuthProvider>
      </PaperProvider>
    </I18nextProvider>
  );
}

Below is more information about the versions and system I am using:
Zoom Video SDK for React Native version: 1.12.10
React version: 18.2.0
OS: Android
SDK Platform: 33

Hi Yan,

Can you please elaborate on the error that you are seeing and what is the use case. It will be helpful to understand what you are trying to accomplish with this use case.

Thanks

Good morning,
Below is the error log that appears:
TypeError: Cannot read property ‘isChatDisabled’ of null, js engine: hermesInvariant Violation: “main” has not been registered. This can happen if:

Hi Yan,

Looking at the code, isChatDisabled is a property of ZoomVideoSdkChatHelper and you might be using it incorrectly. Please refer to this page for more details on implementing chat correctly with react native.
link: Video SDK - React Native - Chat - Zoom Developers

Hi,
So, check the documentation and make any possible changes.
Thank you very much

This topic was automatically closed after 30 days. New replies are no longer allowed.