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

Black screen Android

Open ricardodolnl opened this issue 3 years ago • 42 comments

My screen stays black on android. I have no errors whatsoever, but JitsiMeetView does not load because the onConferenceWillJoin does also not fire. I'm on react native 0.67.2

ricardodolnl avatar Feb 03 '22 17:02 ricardodolnl

Same issue,did you find any solution for that?

alihaydar56 avatar Feb 04 '22 12:02 alihaydar56

Haha no not yet, that's why I created the ticket. But if I find one I'll let you know. But I'm hoping someone here has the solution.

ricardodolnl avatar Feb 04 '22 12:02 ricardodolnl

The native code doesn't work. They upgraded the sdk version in the build.gradle, but never got rid of any of the deprecated methods. The whole view relies on a Listener class that isn't there anymore.

CharlieJ213 avatar Feb 07 '22 15:02 CharlieJ213

I had the same issue, it seems related to react native status bar. I was able to solve by adding below code.

import {StyleSheet, StatusBar} from 'react-native';
useEffect(() => {
    StatusBar.setHidden(false, 'none');
    StatusBar.setTranslucent(false);
    StatusBar.setBackgroundColor('#000000'); // optional
    StatusBar.setBarStyle('light-content'); // optional
}, [])

vphutane27 avatar Feb 07 '22 17:02 vphutane27

@vphutane27 that didn't work for me. Probably because of what @CharlieJ213 mentioned. This dependency is not compatible with the newest jitsi meet sdk version. That's why I also don't see things like onConferenceWillJoin fire.

@skrafft, do you have any indication as to when you'll be able to update this dependency to use the newest jitsi meet sdk (v4)?

ricardodolnl avatar Feb 09 '22 09:02 ricardodolnl

@RicardoDolNL can you try downgrading the react native version, for me, the latest version was not working

vphutane27 avatar Feb 10 '22 17:02 vphutane27

I tried on v0.63.1 because other Jitsi Packages were saying it was best to use with v0.59 - v0.64 inclusive but it still didn't work. This package works on iOS for React Native 0.67. I'm convinced it is the Native android code that is messing things up.

The following 2 files use a class called JitsiMeetViewListener that has been deprecated since the Jitsi SDK was upgraded to 3.7.0 in the build.gradle file

https://github.com/skrafft/react-native-jitsi-meet/blob/master/android/src/main/java/com/reactnativejitsimeet/RNJitsiMeetViewManager.java

https://github.com/skrafft/react-native-jitsi-meet/blob/master/android/src/main/java/com/reactnativejitsimeet/RNJitsiMeetView.java

CharlieJ213 avatar Feb 11 '22 10:02 CharlieJ213

I tried on v0.63.1 because other Jitsi Packages were saying it was best to use with v0.59 - v0.64 inclusive but it still didn't work. This package works on iOS for React Native 0.67. I'm convinced it is the Native android code that is messing things up.

The following 2 files use a class called JitsiMeetViewListener that has been deprecated since the Jitsi SDK was upgraded to 3.7.0 in the build.gradle file

https://github.com/skrafft/react-native-jitsi-meet/blob/master/android/src/main/java/com/reactnativejitsimeet/RNJitsiMeetViewManager.java

https://github.com/skrafft/react-native-jitsi-meet/blob/master/android/src/main/java/com/reactnativejitsimeet/RNJitsiMeetView.java

So,did you find a solution to work in andorid?

alihaydar56 avatar Feb 11 '22 10:02 alihaydar56

Unfortunately, I'm not a native developer. I can read and develop some Java, but not Android. I've been trying, but not getting anywhere useful. The way I have left it at the moment is the JitsiMeetSDK initialises a Native (Java-Side, org.jitsi.meet.sdk.JitsiMeetView) JitsiMeetView, but this means that the on the Javascript side, the <JitsiMeetView> component does nothing

CharlieJ213 avatar Feb 11 '22 10:02 CharlieJ213

Unfortunately, I'm not a native developer. I can read and develop some Java, but not Android. I've been trying, but not getting anywhere useful. The way I have left it at the moment is the JitsiMeetSDK initialises a Native JitsiMeetView, but this means that the on the Javascript side, the <JitsiMeetView> component does nothing

Thanks for your reply. I dont agree JitsiMeetView component does nothing,because at first time it show black screen,but then u try yo start meeting second time,it works fine for android.

alihaydar56 avatar Feb 11 '22 11:02 alihaydar56

Sorry, when I said the JitsiMeetView component does nothing. I meant that in relation to this new Android code I am trying to write. Not in the current version of this package

CharlieJ213 avatar Feb 11 '22 11:02 CharlieJ213

Hello @skrafft any movement on this at all?

CharlieJ213 avatar Feb 22 '22 17:02 CharlieJ213

I am also getting the same issue but when i relaod my screen it connect to a meeting. I use < JitsiMeetView> in entry point of React-native project hence i can reload by shaking android device and it works but generally when a screen render it remains black and no error shows. iOS working fine. RN version : 0.66.4

MahmudHasanMenon avatar Feb 22 '22 19:02 MahmudHasanMenon

I was looking for the solution of this problem for a long time. Today I solved the problem by trying a different way.

node_modules > react-native-jitsi-meet > android > build.gradle

dependencies {
    implementation ('org.jitsi.react:jitsi-meet-sdk:3.7.0') {
      transitive = true
    }
}

in its place

dependencies {
    implementation ('org.jitsi.react:jitsi-meet-sdk:3.+') {
      transitive = true
    }
}

currently working for me.

You may encounter some errors while getting a release. Especially the package that jitsi uses may conflict with the package you use. There is a solution for that too.

YouProject>Android>App>Build.gradle


implementation(project(':react-native-jitsi-meet')) {
  ...
      exclude group: 'com.facebook.react', module:your conflicting package
...
    }

dogankablan avatar Mar 02 '22 12:03 dogankablan

I was looking for the solution of this problem for a long time. Today I solved the problem by trying a different way.

node_modules > react-native-jitsi-meet > android > build.gradle

dependencies {
    implementation ('org.jitsi.react:jitsi-meet-sdk:3.7.0') {
      transitive = true
    }
}

in its place

dependencies {
    implementation ('org.jitsi.react:jitsi-meet-sdk:3.+') {
      transitive = true
    }
}

currently working for me.

You may encounter some errors while getting a release. Especially the package that jitsi uses may conflict with the package you use. There is a solution for that too.

YouProject>Android>App>Build.gradle


implementation(project(':react-native-jitsi-meet')) {
  ...
      exclude group: 'com.facebook.react', module:your conflicting package
...
    }

Thank you for your answer dogan. I tried but it give me Could not find com.yqritc:android-scalablevideoview:1.0.4 error for the fix it ı add jcenter() but still have black screen

dogukan9 avatar Mar 02 '22 13:03 dogukan9

Touch screen are working? And are able to get release build ?

riyas145 avatar Mar 02 '22 14:03 riyas145

@riyas145 I did not observe any problems with the touch screen. I was able to get a release build, but there were some conflicting packages before I did. I exclude those packages .

dogankablan avatar Mar 02 '22 14:03 dogankablan

From what I ve seen the black screen happens cause the createViewInstance inside the RNJitsiMeetViewManager is called after the call function inside the RNJitsiMeetModule. As a result doesnt pass the if null check. A workaround is call the call function after the createViewInstance or use a different logic which already other libraries do.

sakismts avatar Apr 19 '22 06:04 sakismts

@sakismts: Could you please provide further details here?

jdpithwa avatar Apr 21 '22 02:04 jdpithwa

@skrafft : Any update on this? as we have to release our product to market. it would be great if you can provide solution as soon as possible.

jdpithwa avatar Apr 25 '22 20:04 jdpithwa

I downgrade react-native-reanimated to v1.13.3 and the black screen issue resolved for me. Don't know why but i investigate jitsi codebase and found there was react-native-reanimated version v1.13.3. Anyone can try this solution.

MahmudHasanMenon avatar May 21 '22 16:05 MahmudHasanMenon

I downgrade react-native-reanimated to v1.13.3 and the black screen issue resolved for me. Don't know why but i investigate jitsi codebase and found there was react-native-reanimated version v1.13.3. Anyone can try this solution.

Thank you for your solution, the black screen has disappeared but I don't have the bottom bar to be able to control the camera, microphone and to hang up. Do you have a solution for me please?

My version of react native: 0.63.3 and Jitsi in implementation ('org.jitsi.react:jitsi-meet-sdk:3.+') and the library "react-native-jitsi-meet": "^2.2.0 "

Thank you :)

MarinaAmy avatar May 24 '22 08:05 MarinaAmy

Thank you for your answer dogan. I tried but it give me Could not find com.yqritc:android-scalablevideoview:1.0.4 error for the fix it ı add jcenter() but still have black screen

@dogukan9 I am facing same issue. How did you solve it?

jensonjohn001 avatar May 25 '22 14:05 jensonjohn001

From what I ve seen the black screen happens cause the createViewInstance inside the RNJitsiMeetViewManager is called after the call function inside the RNJitsiMeetModule. As a result doesnt pass the if null check. A workaround is call the call function after the createViewInstance or use a different logic which already other libraries do.

Hi @sakismts, I'm facing this black screen issue. It's been awhile, and nothing works for me. I got intriguied with your answer. Could you possibly explain what you have done with that? Or what you would do? I've got no experience with Java-Android, so I couldn't figure out how to do it.

Here's my repo just in case: https://github.com/dancosta-fed/jitsApp

dancosta-fed avatar Aug 01 '22 18:08 dancosta-fed

@skrafft : Any update on this? as we have to release our product to market. it would be great if you can provide solution as soon as possible.

Were you able to come up with a solution for this issue? I'm trying to figured out what Sakismts said it above, but no success so far.

dancosta-fed avatar Aug 02 '22 17:08 dancosta-fed

@skrafft : Any update on this? as we have to release our product to market. it would be great if you can provide solution as soon as possible.

Were you able to come up with a solution for this issue? I'm trying to figured out what Sakismts said it above, but no success so far.

What is the react-native-reanimated and react-native version that you are using?

TacticCoder avatar Aug 02 '22 19:08 TacticCoder

@skrafft : Any update on this? as we have to release our product to market. it would be great if you can provide solution as soon as possible.

Were you able to come up with a solution for this issue? I'm trying to figured out what Sakismts said it above, but no success so far.

What is the react-native-reanimated and react-native version that you are using?

Well... my react-native version is 0.69.3. But this "react-native-reanimated", I'm not using it.. or at least, not intentionally. Even tried to find it on my project, as I read some people saying we should get the newest version and all.. but I'm not using it... (and honestly, don't know what it's for)

dancosta-fed avatar Aug 02 '22 19:08 dancosta-fed

Maybe your peer deps are using it, go to yarn.lock and look for "react-native-reanimated"

TacticCoder avatar Aug 02 '22 19:08 TacticCoder

react-native-reanimated

Don't have the yarn.lock, as I'm using npm i. But I've looked for it on my package-lock.json and there was nothing either.

Edit: By the way, this is my repo: https://github.com/dancosta-fed/jitsApp

dancosta-fed avatar Aug 02 '22 19:08 dancosta-fed

Another thing to check, run the app and open LogCat to intercept errors that react-native doesn't catch. You can run it from the ADB cli or just go into random Application with android Studio open LogCat and select your app package name

TacticCoder avatar Aug 03 '22 10:08 TacticCoder