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

Android crash: Exception in native call from JS #357

Closed
tomek29k opened this issue Oct 3, 2019 · 19 comments
Closed

Android crash: Exception in native call from JS #357

tomek29k opened this issue Oct 3, 2019 · 19 comments
Labels
bug Something isn't working

Comments

@tomek29k
Copy link
Contributor

tomek29k commented Oct 3, 2019

Bug Report

Android (Galaxy S9):
[email protected]
[email protected]

Current behavior

Crashes when disconnecting from the call.
Happens when OTSessionManager.java calls the SDK method mSession.disconnect() of Session.java.

Steps to reproduce

Just leave the call on Android with other users (doesn't happen every time though).

Relevant logs and/or screenshots

Screenshot_20190926-145530_29k dev

@enricop89 enricop89 added the bug Something isn't working label Oct 3, 2019
@og2t
Copy link

og2t commented Oct 11, 2019

@enricop89 Enrico, can you pass this bug to OpenTok SDK team? I'd say it's pretty severe. Thanks!

@sharon-systalent
Copy link

Any updates on this? I am having the same issue.

@ghost
Copy link

ghost commented Oct 22, 2019

I have the same issues with the same RN red-box error and traceback.

It happens ONLY while disconnecting the session that has screen sharing subscriber.
Maybe because I use this branch https://github.com/ggoldens/opentok-react-native/tree/fix-destroy-publisher (current master branch on opentok-react-natvie has issues on Android)

On the screenshot - Java row that triggers the crash.

Screen Shot 2019-10-22 at 8 56 12 PM

@ggoldens do you need more feedback?

@HeroSony
Copy link

I have the same issue, like @tomek29k mentioned.
[email protected]
[email protected]

Currently I implemented Live-Room-Video-Chat (one-to-one).

  • room (sessionId)
  • owner (room owner)
  • guest (joining room)
<OTSession
  ref={this.otSessionRef}
  apiKey={roomInfo.apiKey}
  sessionId={roomInfo.sessionId}
  token={roomInfo.token}
  eventHandlers={this.sessionEventHandlers}
>
  <View style={{ flex: 5}}>
    <OTPublisher
      properties={this.publisherProperties}
      eventHandlers={this.publisherEventHandlers}
      style={{ flex: 1 }}
    />
  </View>

  <View
    onLayout={event => {
      this.find_dimesions(event.nativeEvent.layout);
    }}
    style={{ flex: 5 }}
  >
    <OTSubscriber
      properties={this.subscriberProperties}
      eventHandlers={this.subscriberEventHandlers}
      style={{ flex: 1 }}
      streamProperties={this.state.streamProperties}
    />
  </View>
</OTSession>

Above example code disconnect guest session using signal from owner and working fine.

<OTSession
  ref={this.otSessionRef}
  apiKey={roomInfo.apiKey}
  sessionId={roomInfo.sessionId}
  token={roomInfo.token}
  eventHandlers={this.sessionEventHandlers}
>

  <View style={{ flex: 5}}>
    
     // Creating another Virtual Publisher
     <OTPublisher
       properties={this.virtualPublisherProperties}
       eventHandlers={this.virtualPublisherEventHandlers}
        style={{ height: 0, overflow: 'hidden', }}
    />

    <OTPublisher
      properties={this.publisherProperties}
      eventHandlers={this.publisherEventHandlers}
      style={{ flex: 1 }}
    />
  </View>

  <View
    onLayout={event => {
      this.find_dimesions(event.nativeEvent.layout);
    }}
    style={{ flex: 5 }}
  >
    <OTSubscriber
      properties={this.subscriberProperties}
      eventHandlers={this.subscriberEventHandlers}
      style={{ flex: 1 }}
      streamProperties={this.state.streamProperties}
    />
  </View>
</OTSession>

Above example code, after trying to create a new virtual publisher(attempt to streaming external music in to session) disconnect guest session using signal from owner and produce error:

image

@dennistjahyadi
Copy link

i have the same issues. Any Updates?

@aslampr07
Copy link

aslampr07 commented Nov 7, 2019

As a workaround edit node_module/opentok-react-native/andorid/build.gradle,
and change the line from
implementation 'com.opentok.android:opentok-android-sdk:2.16.1 to
implementation 'com.opentok.android:opentok-android-sdk:2.16.2

It is causing the crash because the react version still using an older native SDK. The newest SDK has fixed the crashing problem. see link

@ghost
Copy link

ghost commented Nov 7, 2019

As a workaround edit node_module/opentok-react-native/andorid/build.gradle,
and change the line from
implementation 'com.opentok.android:opentok-android-sdk:2.16.1 to
implementation 'com.opentok.android:opentok-android-sdk:2.16.2

It is causing the crash because the react version still using an older native SDK. The newest SDK has fixed the crashing problem. see link

@aslampr07 I already use v2.16.2. Yes, it helps, but still there is a crash while disconnecting the session that has screen sharing subscriber.

@aslampr07
Copy link

@ASerga can you please checkout the branch '0.12.2' of this repository I think they have fixed the issue, but haven't merged with the master branch.

@ghost
Copy link

ghost commented Nov 7, 2019

@aslampr07 I have tried. It didn't help.

@ggoldens
Copy link
Contributor

ggoldens commented Nov 8, 2019

Hello guys, apologize for the inconveniences and the delay on this. It looks that there's an issue on the native SDK. I am able to reproduce this issue with a pure android app. I just reported it to the native team. Will keep you posted.

Thanks for reporting!

@op
Copy link

op commented Nov 27, 2019

@ggoldens We seem to experience this problem all the time. Any updates? 🙏

@ghost
Copy link

ghost commented Dec 2, 2019

@ggoldens We seem to experience this problem all the time. Any updates? 🙏

Yes, It's really critical :(
@ggoldens is there an issue in Opentok Android SDK?

@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.

@QuevedoIB
Copy link

Tried updating versions, still having problems:

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.

#366 (comment)

@ggoldens
Copy link
Contributor

ggoldens commented Dec 6, 2019

Can you guys test the branch 0.12.2? If you see it ok I'll push it asap.
Thanks!

@ggoldens
Copy link
Contributor

ggoldens commented Dec 6, 2019

FYI v0.12.2 it's released. Please confirm us if you still see the issue. Thanks!

@tomek29k
Copy link
Contributor Author

tomek29k commented Dec 9, 2019 via email

@ggoldens
Copy link
Contributor

ggoldens commented Dec 9, 2019

Thanks for the feedback @tomek29k !

@ggoldens
Copy link
Contributor

ggoldens commented Dec 9, 2019

Will close this issue since it seems to be solved using the latest android SDK.

@ggoldens ggoldens closed this as completed Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants