AppLovin Plugin NullPointerException

Hi Everyone,

since yesterday the AppLovin Free plugin is not working anymore.

The app force closes when trying to load an ad and I can see the following error:

 12-21 22:34:29.515 24291 24291 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method ‘boolean java.lang.String.equals(java.lang.Object)’ on a null object reference

12-21 22:34:29.515 24291 24291 E AndroidRuntime:        at plugin.applovin.LuaLoader$Show$1.run(LuaLoader.java:1074)

12-21 22:34:29.515 24291 24291 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:751)

12-21 22:34:29.515 24291 24291 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:95)

12-21 22:34:29.515 24291 24291 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:154)

12-21 22:34:29.515 24291 24291 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6682)

12-21 22:34:29.515 24291 24291 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)

12-21 22:34:29.515 24291 24291 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)

12-21 22:34:29.515 24291 24291 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

I didn’t changed anything in my code.

Could you please check it?

Thanks a lot

I’ll have engineering look into this for you.

Rob

Have you changed any settings in Applovin Dashboard recently? If you have, you must also email applovin-support@coronalabs.com with a summary of your changes as said in the documentation.

Hi Bektur,

no, I didn’t changed anything at all regarding videos. In fact, videos are working fine on the public release available on Play Store, but I can’t release any update since every new build has that bug.

I also tried to set verboseLogging=true in the init function, but didn’t get any additional info, it just crashes with that NullPointerException.

Hi davide.rivolta88,

We’ve tested new release on stability, it’s as important as writing code for this new release, and all tests went fine.

I’ve personally double checked everything - all our samples are working as expected and I cannot reproduce this issue.

We’ll definitely help you figure out what exactly is wrong, but you’ll need to submit a bug on https://portal.coronalabs.com/bug-submission . Please, make sure to include a code to reproduce this bug (we don’t need all your project, of course, just create a new project and add your existing code to init and show ads). We’ll check everything our and give you a solution how to resolve this issue.

Hi karpovpw,

after further troubleshooting, I find out that the issue was due to missing parameters in the isLoaded() and show() functions.

Till a week ago, this code worked good for at least 6 months:

    if applovin.isLoaded() then         applovin.show()     end

After reviewing the documentation, I changed it to:

 if applovin.isLoaded("interstitial") then applovin.show("interstitial") end

And now it works again.

I don’t know if the parameter wasn’t necessary in the past or I had that mistake from the very beginning.

Thanks a lot anyway!

Ad type was a required parameter for quite some time, so that’s a little bit odd.

I’m glad that everything worked out for you.

I don’t wang to bother our legacy code, if it’s ok for you, not really in the mood for digging. But if you want, just leave a post here and I’ll figure out why your code was working before the update.

Cheers!