Cordova-plugin-iosrtc: Crash on iOS 13 on media stream end

Created on 29 Oct 2019  路  8Comments  路  Source: cordova-rtc/cordova-plugin-iosrtc

On ios 13.1.1 the app will crash when stoping MediaStream.

Expected behavior

Not Crashing

Observerd behavior

2019-10-29 14:33:41.636358-0400 Sylaps[889:551578] * Assertion failure in -[FBSSerialQueue assertOnQueue], /BuildRoot/Library/Caches/com.apple.xbs/Sources/FrontBoardServices/FrontBoard-619.2/FrontBoardServices/FBSSerialQueue.m:98

Steps to reproduce the problem

Platform information

  • Cordova version: 7.1
  • Plugin version: 6.0.0
  • iOS version: 13.1.1
  • Xcode version: 11.1
bug

All 8 comments

Was just going to report the same..

Happens only when end video call (works fine with audio calls)

From my understanding, this is a new Xcode assertion, which says we are not allowed to touch UI not in UI thread.

2019-10-30 11:53:45.670471+0200 VNCtalk[2522:560158] *** Assertion failure in -[FBSSerialQueue assertOnQueue], /BuildRoot/Library/Caches/com.apple.xbs/Sources/FrontBoardServices/FrontBoard-619.2/FrontBoardServices/FBSSerialQueue.m:98
2019-10-30 11:53:45.672870+0200 VNCtalk[2522:560158] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'threading violation: expected the main thread'

reason: 'threading violation: expected the main thread'

@saghul I think this is similar to some issues you had on jitsi-meet-ios-sdk in past weeks and you may have fixed it on already on react-native-webrtc. Can you assist me or pointing me into the right direction, please?

This look similar to this issue that you mentioned as been fixed on jitsi-meet-ios-sdk v2.4.0 : https://github.com/jitsi/jitsi-meet/issues/4717#issuecomment-544424013

Should we wrap certains call into main thread queue ?

// Obj-C
dispatch_async(dispatch_get_main_queue(), ^{
}

// Swift
DispatchQueue.main.async {
}

Is is related to the need of using RTCMTLVideoView on iOS 13 ?

Note: I have tried WebRTC build from jitsi-meet-ios-sdk v2.4.0 it works on iOS 12 device but result in a red video on ios 13 simulator, is that because it's another WebRTC version build or simply the simulator just curious, but it do not crash anymore.
https://github.com/jitsi/jitsi-meet-ios-sdk-releases/commit/164d1fca54be447619b86f97c403c488611f9c7a

@DaveLomber I have a fix, doing now. (It's a mistake I made)

@DaveLomber Can you try master for me ? This is the fix cbe889557a351e2947db960f2d17007ea1c08fdc

cordova plugin remove cordova-plugin-iosrtc --verbose
cordova plugin add https://github.com/cordova-rtc/cordova-plugin-iosrtc#master --verbose
cordova platform remove ios --no-save
cordova platform add ios --no-save

@hthetiot I can confirm it works well after the fix
Thank you !

@DaveLomber Thank you for testing.
Will be release ASAP on 6.0.1

Sorry @saghul ignore my comment :)

Was this page helpful?
0 / 5 - 0 ratings