react-native-jitsi-meet icon indicating copy to clipboard operation
react-native-jitsi-meet copied to clipboard

App crashes on Xcode 13 when used with reanimated

Open dgreasi opened this issue 4 years ago • 12 comments

After updating to the latest Xcode 13 it seems that when "react-native-jitsi-meet", "react-native-reanimated" are used together the build fails with a weird error.

134523831-1929f1e3-abb2-4e2c-892f-d5b80a55117f

A reproducible repo can be found here

There is also an issue in reanimated for the same reason, which can be found here

dgreasi avatar Sep 24 '21 07:09 dgreasi

I got same issue please I need your help. Reanimated and Jitsi crushes

dogukan9 avatar Nov 08 '21 15:11 dogukan9

Just in case it helps to solve the problem, I have been digging around and I found that Jitsi Meet SDK uses react native and it includes React Native Reanimated for some UI libraries:

# npm ls react-native-reanimated
[email protected] /Users/pablo/projects/jitsi-meet
├─┬ @react-navigation/[email protected]
│ └── [email protected] deduped
├── [email protected]
└─┬ [email protected]
  └── [email protected] deduped

And, of course, it is a really old version. Current one is 2.2.4. By the way, both dependencies (material-top-tabs and react-native-tab-view) have newer version without these dependencies.

On the other hand, If you look at your debugger once you run your App you will see messages like this, because JitsiMeet SDK embeds react native:

[...]
objc[982]: Class RNCConnectionStateWatcher is implemented in both /private/var/containers/Bundle/Application/5E1ED691-F20A-44E8-A3B5-2BD6315BCA4D/someappName/Frameworks/JitsiMeet.framework/JitsiMeet (0x1081bd740) and /private/var/containers/Bundle/Application/5E1ED691-F20A-44E8-A3B5-2BD6315BCA4D/some.app/someappName 
(0x104053168). One of the two will be used. Which one is undefined.
objc[982]: Class RNCNetInfo is implemented in both

After this, I tested some changes and I have found that:

  • If you remove react-native-reanimated from your dependencies, your app works.
  • if you remove react-native-jitsi-meet, your app works.
  • If you add JitsiMeetSDK without react-native-jitsi-meet, your app crashes. That makes sense as react-native-jitsi-meet is just a wrapper.

Hence, it seems that the problem is with Jitsi Meet that includes a version of reanimated that clashes with the one in the react native project. Maybe this worked at some point in time in the past... but not now with Xcode 13.

icc-romeu avatar Nov 10 '21 10:11 icc-romeu

@bortolilucas @g3vxy not working for latest RN Version please tell me how to fix that issue

riyas145 avatar Jan 08 '22 14:01 riyas145

@bortolilucas @g3vxy not working for latest RN Version please tell me how to fix that issue

Apparently Jitsi Meet SDK only supports RN Version <= 0.63. To fix it, you'll need to downgrade to RN 0.63. You can see the issue here #10192

bortolilucas avatar Jan 08 '22 15:01 bortolilucas

It works when I uninstalled reanimated library version 1 or version 2. None of them works. Please help if you have solution because It is not feasible for me to uninstall reanimated library since a lot of libraries are depending on it.

ThaungThanHan avatar Apr 05 '22 05:04 ThaungThanHan

@ThaungThanHan @bortolilucas Im also facing same issue app get crashed when i use reanimated with any other plugins only jisti then it's working fine

riyas145 avatar Apr 05 '22 05:04 riyas145

@riyas145 True. I even use the same version of reanimated 1.13.3 but no luck so far.

ThaungThanHan avatar Apr 05 '22 06:04 ThaungThanHan

Yes same here pls let me know if u found any solution

riyas145 avatar Apr 05 '22 07:04 riyas145

We finally ended up creating a wrapper over lib-jitsi-meet The main repo of Jitsi has the needed polyfills. Follow the "index.native.js" and you will find all you need: https://github.com/jitsi/jitsi-meet/tree/master/react

icc-romeu avatar Apr 05 '22 07:04 icc-romeu

@icc-romeu can u please explain this how can I use this into my react native project

riyas145 avatar Apr 05 '22 07:04 riyas145

TBH I do not have a step by step list but I got information from here:

  • https://community.jitsi.org/t/how-to-integrate-the-lib-jitsi-meet-into-react-native-android-app-this-is-my-own-app-not-the-jitsi-meet-android-project/15439/15
  • https://github.com/jitsi/lib-jitsi-meet/issues/712

The most important bits are the polyfills (that you have here: https://github.com/jitsi/jitsi-meet/tree/master/react ) and the dependencies. This user did setup it successfully https://github.com/jitsi/lib-jitsi-meet/issues/712#issuecomment-379134435

Take into account that lib-jitsi-meet is the underlying service to handle calls. You will have to create your own UI

icc-romeu avatar Apr 05 '22 07:04 icc-romeu

Same here

TacticCoder avatar May 15 '22 06:05 TacticCoder