WebRTC from Firefox to Android crashes

33 views Asked by At

I am using WebRTC on Android to communicate with various other browsers. This works fine for communication with Microsoft Edge, Chrome, and Safari. When I try to set up a peer connection between Android and Firefox, the offer received from Firefox causes a crash when Android tries to set the remote description.

03-27 19:05:25.426  3495  3495 F DEBUG   : Build fingerprint: 'Android/mybuild/mybuild:11/RQ3A.211001.001/eng.ecomma.20240110.205526:userdebug/dev-keys'
03-27 19:05:25.426  3495  3495 F DEBUG   : Revision: '0'
03-27 19:05:25.426  3495  3495 F DEBUG   : ABI: 'arm64'
03-27 19:05:25.427  3495  3495 F DEBUG   : Timestamp: 2024-03-27 19:05:25+0000
03-27 19:05:25.427  3495  3495 F DEBUG   : pid: 3331, tid: 3486, name: worker_thread -  >>> my.package <<<
03-27 19:05:25.427  3495  3495 F DEBUG   : uid: 10112
03-27 19:05:25.427  3495  3495 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
03-27 19:05:25.428  3495  3495 F DEBUG   : Abort message: '../../../home/kanat/webrtc/src/buildtools/third_party/libc++/trunk/include/vector:571: assertion !empty() failed: front() called on an empty vector'
03-27 19:05:25.428  3495  3495 F DEBUG   :     x0  0000000000000000  x1  0000000000000d9e  x2  0000000000000006  x3  0000007d0760e3c0
03-27 19:05:25.428  3495  3495 F DEBUG   :     x4  fefefefeff716e73  x5  fefefefeff716e73  x6  fefefefeff716e73  x7  7f7f7f7f7f7f7f7f
03-27 19:05:25.428  3495  3495 F DEBUG   :     x8  00000000000000f0  x9  0000007f2bcf5800  x10 ffffff80fffffbdf  x11 0000000000000001
03-27 19:05:25.428  3495  3495 F DEBUG   :     x12 0000007f2f436020  x13 000000007fffffff  x14 00000000001c9be0  x15 0000000761381d5f
03-27 19:05:25.428  3495  3495 F DEBUG   :     x16 0000007f2bd8ec88  x17 0000007f2bd70490  x18 0000007c99bc6000  x19 00000000000000ac
03-27 19:05:25.428  3495  3495 F DEBUG   :     x20 0000000000000d03  x21 00000000000000b2  x22 0000000000000d9e  x23 00000000ffffffff
03-27 19:05:25.428  3495  3495 F DEBUG   :     x24 b400007df8cca1d0  x25 0000007d0760f000  x26 b400007d38d04898  x27 b400007e18cd06d0
03-27 19:05:25.428  3495  3495 F DEBUG   :     x28 0000007d07947f91  x29 0000007d0760e440
03-27 19:05:25.428  3495  3495 F DEBUG   :     lr  0000007f2bd23544  sp  0000007d0760e3a0  pc  0000007f2bd23574  pst 0000000000000000
03-27 19:05:25.429  3495  3495 F DEBUG   : backtrace:
03-27 19:05:25.430  3495  3495 F DEBUG   :       #00 pc 000000000004e574  /apex/com.android.runtime/lib64/bionic/libc.so (abort+180) (BuildId: eea04dcb79f7c0732c4186dc99769352)

I have tried multiple different builds of the native WebRTC library on Android. This only occurs when using Firefox. The specific version of Firefox is 124.0.1.

I turned on verbose logging for WebRTC on Android and the last line that prints before the crash is

[onLogMessage] label: webrtc_video_engine.cc, message: (line 2833): AddRecvStream: {id:Zf3iOnP6;ssrcs:[1701703699];ssrc_groups:;cname:{4fe1736b-1ba1-400f-8341-2a05850eed4f};stream_ids:default;}

This is interesting because it shouldn't be expecting to receive any streams as the Android side is only streaming video to the Firefox side and nothing in reverse.

Edit: I've tried this library: https://github.com/GetStream/webrtc-android And this library: https://github.com/rno/WebRTC

0

There are 0 answers