open-webrtc-toolkit/owt-client-android

The p2p sample app crashes at the startup...

Honya2000 opened this issue · 2 comments

Hello,

I tried to compile owt p2p sample app using Android Studio 4.0.1
It compiled succesfully, but the application just crashes at the beginning...
I found this lines in logcat file:

09-29 14:04:00.806 E/org.webrtc.Logging(29483): NativeLibrary: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/owt.sample.p2p-pZDCQ37Km9_AvCEjg_9Cyw==/lib/arm64/libjingle_peerconnection_so.so" has bad ELF magic
09-29 14:04:00.806 E/org.webrtc.Logging(29483): at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
09-29 14:04:00.806 E/org.webrtc.Logging(29483): at java.lang.System.loadLibrary(System.java:1657)
09-29 14:04:00.806 E/org.webrtc.Logging(29483): at org.webrtc.NativeLibrary$DefaultLoader.load(NativeLibrary.java:21)
09-29 14:04:00.806 E/org.webrtc.Logging(29483): at org.webrtc.NativeLibrary.initialize(NativeLibrary.java:44)
09-29 14:04:00.806 E/org.webrtc.Logging(29483): at org.webrtc.PeerConnectionFactory.initialize(PeerConnectionFactory.java:294)
09-29 14:04:00.806 E/org.webrtc.Logging(29483): at owt.base.PCFactoryProxy.instance(PCFactoryProxy.java:38)
09-29 14:04:00.806 E/org.webrtc.Logging(29483): at owt.base.ContextInitialization.initialize(ContextInitialization.java:146)
09-29 14:04:00.806 E/org.webrtc.Logging(29483): at owt.sample.p2p.MainActivity.initP2PClient(MainActivity.java:133)
09-29 14:04:00.806 E/org.webrtc.Logging(29483): at owt.sample.p2p.MainActivity.onCreate(MainActivity.java:122)
09-29 14:04:00.806 E/org.webrtc.Logging(29483): at android.app.Activity.performCreate(Activity.java:7183)

09-29 14:04:00.806 E/zygote64(29483): No implementation found for void org.webrtc.PeerConnectionFactory.nativeInitializeAndroidGlobals() (tried Java_org_webrtc_PeerConnectionFactory_nativeInitializeAndroidGlobals and Java_org_webrtc_PeerConnectionFactory_nativeInitializeAndroidGlobals__)

I tried different webrtc prebuild libs from M60 to M83. But the error is always the same.
I even copied 64 bit libjingle_peerconnection_so.so to folder armeabi-v7a since i'm using 64 bit build - didn't change anything...

Any help will be appreciated.

Nevermind.
Found the issue. Didn't expect so many placeholders for .so lib.

@Honya2000 could you explain what was the issue?
For some reason, the webrtc swallowed part of the exception so I am left with little to no info.