Maxím G.
Maxím G.

Reputation: 1026

Zoom Video SDK for React Native - crash on import module

I've implemented Zoom Video SDK for React Native as per this guide. When I run my app, I get the following error:

Uncaught TypeError: Cannot read properties of undefined (reading 'isChatDisabled')
    at new ZoomVideoSdkChatHelper (ZoomVideoSdkChatHelper.js:15:70)
    at eval (Context.js:57:15)
    at ./node_modules/@zoom/react-native-videosdk/lib/module/Context.js (rnw.bundle.js?94e5161b801ffe220198:12094:1)
    at __webpack_require__
    ...

So, it happens just on import, when I import anything from "@zoom/react-native-videosdk";

Initially I thought that maybe I did something wrong as per the guide. So I deiced to go from scratch and just download their example repo. So I ran the following commands in terminal (in different directory):

git clone https://github.com/zoom/VideoSDK-ReactNative-Quickstart
cd VideoSDK-ReactNative-Quickstart
yarn
yarn start

It shows me the Metro with expo QR code, I scanned it with my iPhone, launched the app... and got absolutely the same error as above:

Zoom Video for React Native error: Cannot read property 'isChatDisabled' of null

Then I asked friend of mine to try on his macbook to ensure it's not something with my environment. And he got absolutely the same result (same error).

I searched on internet, but couldn't find this issue anywhere else. What it can be?

Environment: MacBook Pro, chip Apple M1 Pro, macOS Sonoma 14.4.1, node v21.7.1 (tried on v20 as well), XCode 15.3

Upvotes: 0

Views: 411

Answers (1)

Nephy
Nephy

Reputation: 71

I also happened to post the same issue in zoom/VideoSDK-ReactNative-Quickstart's github.

I don't have a solution but just sharing what I got so far.

  1. My Current Workaround
  2. Alternative without Expo

My current workaround: Build using XCode to iOS Simulator (Rosetta)

Environment: MacBook Pro, chip Apple M1 Max, macOS Sonoma 14.0, node v20.6.1, XCode 15.3

  1. From your project directory, open your ios folder's xcworkspace in Xcode:
open ios/<your_app_name>.xcworkspace
  1. From top Menu > Product > Destination > Show All Run Destinations enter image description here

  2. You should now see iOS Simulators with Rosetta Support. Select any of the simulators with Rosetta for your project. enter image description here

  3. Ensure that you are now building for the iOS Simulator with (Rosetta) support. Then click on ▶️ button to build. enter image description here

  4. In the project, run npm start from the project's root (not ios folder) to make sure metro is running.


Alternative: Without expo

If you're fine with not using expo, you can just use the React Native Zoom SDK's example that just runs via react-native CLI. It runs on both my Android & iOS simulators just fine

  1. Get the Zoom SDK following this guide -'Before You Start' section
  2. Setup your credentials then run the example via these steps - 'Run the sample app' section

Upvotes: 1

Related Questions