jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
23.21k stars 6.74k forks source link

React Native 0.63.3 Error "Program type already present" only in release build com.facebook.react',module:'react-native-safe-area-context" #3159 #11354

Closed yatishAgrawal closed 2 years ago

yatishAgrawal commented 2 years ago

Description

When we are excluding this react-native-safe-area-context inside the dependencies of Jitsi like this:

implementation ('org.jitsi.react:jitsi-meet-sdk:4.1.0') { exclude group: 'com.facebook.react',module:'react-native-vector-icons' exclude group: 'com.facebook.react',module:'react-native-async-storage' exclude group: 'com.facebook.react',module:'react-native-async-storage_async-storage' exclude group: 'com.facebook.react',module:'react-native-webview' exclude group: 'com.facebook.react',module:'react-native-splash-screen' exclude group: 'com.facebook.react',module:'react-native-device-info' exclude group: 'com.facebook.react',module:'react-native-community_clipboard' exclude group: 'com.facebook.react',module:'react-native-clipboard_clipboard' exclude group: 'com.facebook.react',module:'react-native-gesture-handler' exclude group: 'com.facebook.react',module:'react-native-reanimated' exclude group: 'com.facebook.react',module:'react-native-screens' exclude group: 'com.facebook.react',module:'react-native-safe-area-context' exclude group: 'com.facebook.react',module:'react-native-masked-view_masked-view' transitive = true }

After that, we are getting the crash when it reaches the react-navigation in both APK release and debug if we remove the 'exclude group: 'com.facebook.react',module:'react-native-safe-area-context' line then everything works fine in debug build but not able to generate the release apk.

Expected behavior

Actual behavior & steps to reproduce

Snack or minimal code example

Package versions

name version
react-native 0.63.3
react-native-reanimated
NodeJS
Xcode
Java
Gradle 6.7.1
expo

Below issue occurs when we exclude the safe library

Screenshot 2022-04-09 at 12 11 43 AM

saghul commented 2 years ago

You need to be using compatible versions of our dependencies. Please make sure they are within the same major version range at least. As an example, SDK 4.1.0 used RN 0.61.5, you can't just bump it to 0.63 and cross your fingers.

I recommend you update to SDK 5, which uses RN 0.66.

That aside, using our SDK (which is also built with RN) in an RN app is not a good idea. We are hoping to have a RN SDK as part of our GSoC program.

yatishAgrawal commented 2 years ago

You need to be using compatible versions of our dependencies. Please make sure they are within the same major version range at least. As an example, SDK 4.1.0 used RN 0.61.5, you can't just bump it to 0.63 and cross your fingers.

I recommend you update to SDK 5, which uses RN 0.66.

That aside, using our SDK (which is also built with RN) in an RN app is not a good idea. We are hoping to have a RN SDK as part of our GSoC program.

But in React Native 0.66 react-native-reanimated version is not working fine, please make this SDK comparable with react-native-reanimated 2 than

saghul commented 2 years ago

Why do you need reanimated 2? I've been pondering updating to it, but it's nontrivial.

yatishAgrawal commented 2 years ago

Why do you need to reanimate 2? I've been pondering updating to it, but it's nontrivial.

Reanimated is required to use for the React-Navigation-Drawer, that's why I need a reanimate 2, and reanimate 1 is not supported on above react-native version 65.

saghul commented 2 years ago

We are using the drawer just fine in Jitsi Meet, with Reanimated v1 and react-native 0.67. What exact problem are you running into?

yatishAgrawal commented 2 years ago

We are using the drawer just fine in Jitsi Meet, with Reanimated v1 and react-native 0.67. What exact problem are you running into?

Failed to transform react-native-reanimated-67-jsc.aar we are facing this issue while running the application

saghul commented 2 years ago

That is Reanimated 2, which I already told you we don't currently support. v1 works just fine with the drawer and RN 0.67.

saghul commented 2 years ago

For reference, the drawer works with both v1 and v2: https://github.com/react-navigation/react-navigation/blob/b1c421445ecb75d514ce27791433b12f9a7e75b7/packages/drawer/package.json#L68