Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App not responding or crashing after unmounting OTSession + OTSubscriber #366

Closed
ngolapnguyen opened this issue Nov 8, 2019 · 29 comments
Closed

Comments

@ngolapnguyen
Copy link

ngolapnguyen commented Nov 8, 2019

Bug Report

Hi everyone!

I'm building a live-streaming app, with 2 different scenes for Publisher and Subscriber. The Publisher scene has OTSession and OTPublisher. The Subscriber scene has OTSession and OTSubsciber.

The Publisher scene disconnects from the session and unmounts normally, but the Subscriber scene will regularly cause the app to hang (or sometime crash) during unmounting.

  • OS: Android
  • React Native version: 0.60.5
  • opentok-react-native version: 0.12.1
  • OpenTok Android SDK version: 2.16.3

Current bug behavior
App regularly not responding or crashes after unmounting a scene with OTSession & OTSubscriber.
Sometimes the scene will unmount fine, but only after a long delay.

Steps to reproduce

  • Navigate to a scene with OTSession & OTSubscriber
  • Connect to a session with an ongoing publisher stream
  • Go back (unmounting the scene)

What is the expected correct behavior?
The Subscriber scene should unmount without any issue.

I've been pulling my hair out for the last 3 days trying to find a way to work around this but still in vain. I hope someone can point me in the right direction. I'd really appreciate it!

@ggoldens
Copy link
Contributor

I think this is related to the issue #357
It seems it's an issue on the Android SDK. Will keep you posted. Thanks for reporting!

@ngolapnguyen
Copy link
Author

ngolapnguyen commented Nov 14, 2019

I believe it's indeed a SDK-related issue. At the moment I have to downgrade the OpenTok SDK to 2.15.3 as a workaround. The view can unmount without freezing now, but there's still a noticeable delay time until the view is completely unmounted.

@RalucaIonela
Copy link

RalucaIonela commented Nov 15, 2019

We have 2.15.3 and we are facing Android stuck issue.
APP not responding after disconnect the call in Android

@douglashsilva douglashsilva mentioned this issue Dec 2, 2019
2 tasks
@podvipodvert
Copy link

Some progress on this?

@enricop89
Copy link
Contributor

We released today Android SDK 2.16.3 patch.
Please try to update the version on android/build.gradle file and test the issue.

@podvipodvert
Copy link

podvipodvert commented Dec 4, 2019

there are no any versions on android/build.gradle in "react-native": "0.61.5", and on Ios I using 2.16.3 and I getting an error :
OTSessionManager.disconnectSession was called with 1 arguments but expects 2 arguments. If you haven't changed this method yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.

my version of OT is "opentok-react-native": "^0.12.1",

@podvipodvert
Copy link

in your opentok/opentok-react-native/android/build.gradle can you change it to 2.16.3

now it like this

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:${_reactNativeVersion}" // From node_modules
implementation 'com.opentok.android:opentok-android-sdk:2.16.1'
}

@enricop89
Copy link
Contributor

@podvipodvert
Copy link

in branch master, it set as 2.16.1

@podvipodvert
Copy link

Anyway with 2.16.3 version application not responding after calling this function OT.disconnectSession()

@QuevedoIB
Copy link

Same problem here:

React Native version: 0.59.5
opentok-react-native version: 0.11.2
OpenTok Android SDK version: 2.16.3

Freezes and crashes the app on unmounting the OTSession component whenever there's a subscriber to it.

Downgrading the OpenTok Android SDK version: 2.15.3 also causes this problem so the workaround isn't working for me.

Logcat when app crashes:

A/libc: FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x77077a3e98)
A/libc: Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 17015 (mqt_native_modu), pid 16970

With:

React Native version: 0.59.5
opentok-react-native version: 0.12.1
OpenTok Android SDK version: 2.16.3

Throws an error for OTSession connect expecting 3 arguments and instead receiving 2.

I really need to fix it so I can give the app to my client and publish it already, any help would be really appreciated.

@podvipodvert
Copy link

@enricop89 any updates?

@ggoldens
Copy link
Contributor

ggoldens commented Dec 6, 2019

@QuevedoIB that error is because you're using an old version of the opentok-react-native. The current one is 0.12.1. Can you please test updating the library?
Thanks

@ggoldens
Copy link
Contributor

ggoldens commented Dec 6, 2019

Can you please test the branch 0.12.2? If you see it working as expected I'll push it ASAP.

@andriinegustorov
Copy link

current version 0.12.1 if you released 12.2 so you need to update master branch!

@ggoldens
Copy link
Contributor

ggoldens commented Dec 6, 2019

Now it's released. Please test it again and let us know. Thanks.

@podvipodvert
Copy link

not app responding after disconnectSession() but now this error appears:

OTSessionManager.disconnectSession was called with 1 arguments but expects 2 arguments. If you haven't changed this method yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.

@ggoldens
Copy link
Contributor

ggoldens commented Dec 9, 2019

Please try to reinstall the library (removing node_modules and then a npm install)
Also, can you try to reproduce it in the basic sample app? https://github.com/opentok/opentok-react-native-samples

@podvipodvert
Copy link

The same issue in the basic sample app

@flobady
Copy link

flobady commented Dec 10, 2019

Hello,

I have the below crash when unmounting the OpenTok component.
"opentok-react-native": "0.12.2"
"react": "16.9.0"
"react-native": "0.61.2"

Can you check help?

Capture d’écran 2019-12-10 à 17 14 36

@QuevedoIB
Copy link

@ggoldens

React Native version: 0.59.5
opentok-react-native version: 0.12.2
OpenTok Android SDK version: 2.16.3

On unmounting session throws a Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x30342d6363633c

The tombstone in android logcat is:

Captura de pantalla 2019-12-12 a las 10 42 51

Captura de pantalla 2019-12-12 a las 10 44 56

I've been struggling for days, any help would be appreciated!

@kaanduraa
Copy link

any improvements on this ?

@andriinegustorov
Copy link

@ggoldens Any updates?

@ggoldens
Copy link
Contributor

We're not able to reproduce it. If you are able to reproduce it on the basic sample app, could you please share your App.js file, and provide more info about the device you're testing?
thanks!

@enricop89
Copy link
Contributor

Hey guys, can you please let us know if you are able to reproduce it?

@HarshitPadalia
Copy link

I am facing same issue

@HarshitPadalia
Copy link

any updated on #84?

@TccTeam
Copy link

TccTeam commented Jul 22, 2020

my problem was that I used disconnectSession without arguments
OT.disconnectSession(1);

this work for me >>>>
OT.disconnectSession(this.props.sessionId, () =>{});

@abdulajet
Copy link
Contributor

Thanks for the issue, can you check out the latest version of the library, and if your issue has not been resolved please reopen/create a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests