GetStream / webrtc-android

🛰️ A versatile WebRTC pre-compiled Android library that reflects the recent WebRTC updates to facilitate real-time video chat for Android and Compose.
https://getstream.github.io/webrtc-android/
Apache License 2.0
597 stars 72 forks source link

Using "stream-webrtc-android-1.1.2.aar" show NoSuchMethodError #163

Closed ed3c closed 2 months ago

ed3c commented 4 months ago

I download the stream-webrtc-android-1.1.2.aar and implement with grade

implementation files('libs/libwebrtc.aar')

however, there is no such method "getDisableIpv6()". This is a method in java.

java -version
openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13-58)
OpenJDK 64-Bit Server VM (build 21.0.2+13-58, mixed mode, sharing)

We have a web rtc M89 to make call with Android & IOS. Testing upgrade each web rtc version is needed. Should I get through error method "getDisableIpv6" or there is other way to do this.

I haven't try build web rtc with my own. My current thought is upgrade my project and using the web rtc with local module without implement .aar

If you have any suggestions, I would be very grateful :)

org.webrtc.Logging

PeerConnectionFactory: PeerConnectionFactory was initialized without an injected Loggable. Any existing Loggable will be deleted. WebRtcAudioUtils: setWebRtcBasedAutomaticGainControl() is deprecated WebRtcAudioRecord: Set error callback WebRtcAudioManagerExternal: Sample rate is set to 48000 Hz WebRtcAudioManagerExternal: Sample rate is set to 48000 Hz JavaAudioDeviceModule: createAudioDeviceModule JavaAudioDeviceModule: HW NS will be used. JavaAudioDeviceModule: HW AEC will be used. WebRtcAudioEffectsExternal: ctor@[name=pool-34-thread-1, id=1605] WebRtcAudioRecordExternal: ctor@[name=pool-34-thread-1, id=1605] WebRtcAudioTrackExternal: ctor@[name=pool-34-thread-1, id=1605] WebRtcAudioRecordExternal: enableBuiltInAEC(true) WebRtcAudioEffectsExternal: setAEC(true) WebRtcAudioRecordExternal: enableBuiltInNS(true) WebRtcAudioEffectsExternal: setNS(true) PeerConnectionFactory: onNetworkThreadReady PeerConnectionFactory: onSignalingThreadReady PeerConnectionFactory: onWorkerThreadReady

System.err

java.lang.NoSuchMethodError: no non-static method "Lorg/webrtc/PeerConnection$RTCConfiguration;.getDisableIpv6()Z"
    at org.webrtc.PeerConnectionFactory.nativeCreatePeerConnection(Native Method)
    at org.webrtc.PeerConnectionFactory.createPeerConnectionInternal(PeerConnectionFactory.java:379)
    at org.webrtc.PeerConnectionFactory.createPeerConnection(PeerConnectionFactory.java:395)
    at awesomelab.trueme.rtc.RTCPeerConnectionClient.createPeerConnectionInternal(RTCPeerConnectionClient.java:599)
    at awesomelab.trueme.rtc.RTCPeerConnectionClient.access$500(RTCPeerConnectionClient.java:67)
    at awesomelab.trueme.rtc.RTCPeerConnectionClient$2.run(RTCPeerConnectionClient.java:352)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:923)
#
# Fatal error in: ../../sdk/android/src/jni/jni_generator_helper.cc, line 59
# last system error: 0
# Check failed: !env->ExceptionCheck()
# error during GetMethodID: getDisableIpv6, ()Z
Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 19118 (pool-34-thread-), pid 15586 (com.fiziico.r2)
varun-metacube commented 3 months ago

@ed3c which lib you used for iOS, can you please share link ?

ed3c commented 2 months ago

stream-webrtc-android-1.1.2.aar using web rtc M118 need to update the code about rtc_peer_connection_client. Old method call by a new M118 will cause method not found. M118 is compatible with M89 depends on device version.