Wowza Community

Android activity crashing when starting to broadcast - GoCoder Android SDK

Recently we migrated all of our apps to androidx, and since then whenever we start a broadcast on an app, it crashes with the following stack trace:

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/util/ByteArrayBuffer;
        at com.wowza.gocoder.sdk.support.wse.c.onVideoConfigFrame(GoCoderSDK:169)
        at com.wowza.gocoder.sdk.support.c.a.onDrainEncoder(GoCoderSDK:648)
        at com.wowza.gocoder.sdk.support.c.a$a.handleMessage(GoCoderSDK:1043)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:214)
        at com.wowza.gocoder.sdk.support.c.a.run(GoCoderSDK:279)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.util.ByteArrayBuffer" on path: DexPathList[[zip file "/data/app/com.ili.iliauthdemo-Y9iO-7zW3xFVxFEtcGIMzA==/base.apk"],nativeLibraryDirectories=[/data/app/com.ili.iliauthdemo-Y9iO-7zW3xFVxFEtcGIMzA==/lib/arm64, /data/app/com.ili.iliauthdemo-Y9iO-7zW3xFVxFEtcGIMzA==/base.apk!/lib/arm64-v8a, /system/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.wowza.gocoder.sdk.support.wse.c.onVideoConfigFrame(GoCoderSDK:169) 
        at com.wowza.gocoder.sdk.support.c.a.onDrainEncoder(GoCoderSDK:648) 
        at com.wowza.gocoder.sdk.support.c.a$a.handleMessage(GoCoderSDK:1043) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:214) 
        at com.wowza.gocoder.sdk.support.c.a.run(GoCoderSDK:279) 
        at java.lang.Thread.run(Thread.java:764) 

It is clear that internally and inside this package package com.wowza.gocoder.sdk.support.wse;

the gocoder sdk uses this class org.apache.http.util.ByteArrayBuffer; but it is not found anymore.

Please note that I tried to migrate the apps back to the support libraries instead of androidx and the streaming worked fine again.

Any ideas on how to make it work with androidx?

Would you kindly submit a support ticket on this issue? We have had success with Android X and our SDK, but we’d like to run some tests to see if it an error in the setup or if something is broken in in working with the SDK. Thanks very much @Jad Kik

https://www.wowza.com/support/open-ticket

It seems I can’t submit a support ticket except on wowza clearcaster with my account. Any suggestions on what could be done?

It seems the problem has disappeared after updating to the latest gocoder sdk. Previously I was using

com.wowza.gocoder.sdk.android:com.wowza.gocoder.sdk:1.5b7@aar 

But now after updating to

com.wowza.gocoder.sdk.android:com.wowza.gocoder.sdk:2.0.0@aar

it seems to work.

Thanks anyway!

Great to know! I should’ve suggested you upgrade first. Thanks for letting us know so others know to try the same. :slight_smile:

I’m using

com.wowza.gocoder.sdk.android:com.wowza.gocoder.sdk:2.0.0@aar

but still crash after starting to broadcast.

Hello @Ali Mottaghian

Can you replicate this crash with the sample app, located here:

https://www.wowza.com/pricing/installer#gocodersdk-downloads

If so, what Android device and OS version are you testing against?

Regards,

JasonT

Hi @Jason Tuchler,

i’ve found the issue. I was using react native 0.61.

After downgrading to 0.60.5 everything fixed and working fine now.

I’m not exactly sure what was the reason, However, if someone have this issue they can try downgrading.

Attention: Any issues with Broadcast using the GoCoder Android SDK have been resolved in the new version released today: 1.9.1 build 0636.

Enhancements and fixed issues (since 1.9.0.0632)- Fixed an issue that was preventing stable broadcasting using GoCoder SDK for Android on certain devices running Android versions 9 or 10.

For anyone who was experiencing broadcast crashes on certain devices using Android OS 9 or 10, please update to this new version to resolve any issues.

Click the link to download and install the latest version:

https://www.wowza.com/docs/how-to-install-gocoder-sdk-for-android