react-native-opentok icon indicating copy to clipboard operation
react-native-opentok copied to clipboard

Disconnect crashing the app on all Android versions - Using Latest Opentok 2.12

Open krokhale opened this issue 7 years ago • 7 comments

Just tested. The call disconnect is crashing on all android versions in the latest react-native-opentok 2.12

Both .disconnectAll and .disconnect are crashing.

krokhale avatar Dec 09 '17 10:12 krokhale

Same problem here, I downgraded the SDK to 2.10 and everything works fine but it will be nice if we can fix that in the latest version.

renanpupin avatar Dec 15 '17 13:12 renanpupin

True, but 2.10 crashes on Oreo, so it's now a choice between the two.

krokhale avatar Dec 30 '17 14:12 krokhale

Hi @krokhale @renanpupin Did you resolve this issue or find any workaround?

wzywno avatar Jan 29 '18 16:01 wzywno

Hi @krokhale

With the 2.13. I was debugging here and found some tips but nothing that resolve the problem.

  • In RNOpenTokPublisherView.cleanUpPublisher, when I remove/comment 'mPublisher.destroy()' line, the application don't crash, BUT, the <Subscriber/> in the App.js freeze and eventually, I can't connect again.

Help!

TeruyaHaroldo avatar Feb 07 '18 17:02 TeruyaHaroldo

@krokhale just for curiosity, what's the consequences if I remove the 'mPublisher.destroy()'?

TeruyaHaroldo avatar Feb 07 '18 19:02 TeruyaHaroldo

From what I can tell, .destroy() tries to re-free a resource that was freed when the component is removed. But it appears that it also stops the camera. When I commented it out, the camera wouldn't close. My solution was to keep it commented out but then also call .disconnectAll.

timhuff avatar Feb 13 '18 06:02 timhuff

Pull request indicating the change. https://github.com/callstack/react-native-opentok/pull/88 The readme should probably be updated to indicate the necessity of .disconnectAll.

timhuff avatar Feb 13 '18 06:02 timhuff