ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
125 stars 111 forks source link

Invariant violation: Native module cannot be null on ios with expo #123

Closed Arveti closed 3 years ago

Arveti commented 3 years ago

Hi, I am using connectycube with expo and getting the above error in ios. Working fine in android. Great if you could help. Thanks

Arveti commented 3 years ago

Stack trace - Invariant Violation: Native module cannot be null.

invariant
    browser.js:38:14
constructor
    NativeEventEmitter.js:37:15
<global>
    EventEmitter.js:3:8
loadModuleImplementation
    require.js:321:11
<unknown>
    AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false:188780:56
loadModuleImplementation
    require.js:321:11
<unknown>
    AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false:187379:58
loadModuleImplementation
    require.js:321:11
<unknown>
    AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false:187309:61
loadModuleImplementation
    require.js:321:11
<unknown>
    AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false:187225:38
loadModuleImplementation
    require.js:321:11
ConnectyCube#constructor
    cubeMain.js:8:23
<unknown>
    AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false:186097:27
loadModuleImplementation
    require.js:321:11
<unknown>
    AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false:153952:67
loadModuleImplementation
    require.js:321:11
<unknown>
    AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false:135063:55
loadModuleImplementation
    require.js:321:11
<unknown>
    AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false:134058:59
loadModuleImplementation
    require.js:321:11
<global>
    AppEntry.js:3
loadModuleImplementation
    require.js:321:11
guardedLoadModule
    require.js:201:44
global code
    AppEntry.bundle?platform=ios&dev=true&minify=false&hot=false:258946:3
Arveti commented 3 years ago

Great if someone can look in as our whole ios side of the project is stuck after integrating with connectycube.

sami3898 commented 3 years ago

hey, @Arveti just change ConnectyCube Version to '^2.0.0' in your packge.json file it will work.

"react-native-connectycube": "^2.0.0",

after that delete node modules, podfile.lock, and pods folder and reinstall node modules and pod.

Arveti commented 3 years ago

Hey @sami3898 , it didn't work. Also, I am using expo, I don't have podfile.lock/pods folder.

sami3898 commented 3 years ago

Hey @sami3898 , it didn't work. Also, I am using expo, I don't have podfile.lock/pods folder.

so version '^2.0.0' isn't working in your case

Arveti commented 3 years ago

Can someone please help here as soon as possible ? Really looking forward to resolve this.

ccvlad commented 3 years ago

Hi, @Arveti

Our SDK works with Expo, but you won't be able to use the react-native-webrtc that are built into the SDK. The react-native-webrtc needs for video/audio calls and conference.

We will test iOS with the Expo and let you know.

Arveti commented 3 years ago

Hi, Any possible improvement or update here ? I am just using chat and I won't be needing video/audio calls so any hack to make this work would also suffice. Still our whole ios side of the project is stuck because of this. Hoping connectycube to solve this asap.

ccvlad commented 3 years ago

Hi @Arveti We will update our SDK to get rid of the react-native-webrtc dependency for Expo project. I will let you know after release!

ccvlad commented 3 years ago

@Arveti Check please - https://www.npmjs.com/package/react-native-connectycube

Arveti commented 3 years ago

@ccvlad Great. it's working now. Thank you so much for the quick release.