react-native-webrtc: Android: App crashing on android 5 and 6

Tested app with releases 106.0.1 to 106.0.4 of this library across emulators/physical devices from API 22 (android 5) to API 33 (android 13). Do I need to make more changes in the API calls, compared to those in releases 1.106.1 and below ?

Expected Behavior

App with webrtc working across API 22 to API 33 When remote peer joins the room, peer connection successful.

Observed Behavior

It crashes on API 22 (tested on real device) and API 23 (tested in emulator) as and when the remote stream comes. Before that, user can view local stream, toggle camera, while having joined the room. But works good enough on API 24 and above

Steps to reproduce the issue

With the required setting for webrtc peer connection (which was previously working for 1.106.1 and below), replaced peerConnection.onAddStream with peerConnection.onTrack

peerConnection.onTrack = async (event) => { event.streams?.forEach((stream) => {doSomethingWithRemoteStream(stream)}) }

and peerConnection.addStream(stream) with stream?.getTracks().forEach((track) => peerConnection.addTrack(track, stream))

Platform Information

  • React Native Version: 0.66.5
  • Gradle Plugin Version: 7.3.0
  • OS: Android
  • OS Version: API 22 to 33
  • react: 17.0.2
  • react-native-incall-manager: 4.0.1
  • socket.io-client: 4.5.4
  • minSdkVersion = 21
  • compileSdkVersion = 31
  • targetSdkVersion = 31
  • google services plugin version: 4.3.14

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

01-17 01:22:31.451  1364  1364 F DEBUG   : backtrace:
01-17 01:22:31.451  1364  1364 F DEBUG   :     #00 pc 00083a56  /system/lib/libc.so (tgkill+22)
01-17 01:22:31.451  1364  1364 F DEBUG   :     #01 pc 00081608  /system/lib/libc.so (pthread_kill+70)
01-17 01:22:31.451  1364  1364 F DEBUG   :     #02 pc 00027205  /system/lib/libc.so (raise+36)
01-17 01:22:31.451  1364  1364 F DEBUG   :     #03 pc 000209e4  /system/lib/libc.so (abort+80)
01-17 01:22:31.451  1364  1364 F DEBUG   :     #04 pc 004c3c6c  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.451  1364  1364 F DEBUG   :     #05 pc 004c3f8f  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #06 pc 004a69a8  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #07 pc 00908714  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #08 pc 0090869b  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #09 pc 004763f4  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #10 pc 00475035  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #11 pc 00479e46  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #12 pc 004834e9  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #13 pc 00474aef  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #14 pc 004435b8  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #15 pc 0043ad21  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #16 pc 0043acce  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #17 pc 0043ad64  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #18 pc 004efc5e  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #19 pc 004eee11  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #20 pc 004edf35  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #21 pc 004ef249  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #22 pc 004ef188  /data/app/com.xxxxxxx-2/lib/x86/libjingle_peerconnection_so.so
01-17 01:22:31.452  1364  1364 F DEBUG   :     #23 pc 00080ab3  /system/lib/libc.so (__pthread_start(void*)+56)
01-17 01:22:31.452  1364  1364 F DEBUG   :     #24 pc 00021952  /system/lib/libc.so (__start_thread+25)
01-17 01:22:31.452  1364  1364 F DEBUG   :     #25 pc 000170b6  /system/lib/libc.so (__bionic_clone+70)
01-17 01:22:31.907  1639  5804 W ActivityManager:   Force finishing activity com.xxxxxxx/.MainActivity
01-17 01:22:31.911  1364  1364 F DEBUG   : 

Is this enough ?