Ad plugins throw exceptions while building

That’s great news! I just tested a build removing adMob id and the app seems to be working fine. 

Thanks again for taking care of the problem.  :slight_smile:

Wonders happen when I know what to fix :smiley: thanks for reporting the bug.

So looks like this “might” be back in another form. I am using the beta Appodeal plugins due to the recent restrictions from Google on using Appodeal versions < 2.5.1 and this seems to be happening. Here is the appodeal settings that I have in my build.settings.

[lua]

plugins =
{
[“CoronaProvider.analytics.flurry”] = { publisherId = “com.coronalabs”, },
– Base
[‘plugin.appodeal.beta.base’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.AmazonAds’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.GoogleAdMob’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.TwitterMoPub’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.StartApp’] = { publisherId = ‘com.coronalabs’ },

– Banner
[‘plugin.appodeal.beta.AppLovin’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.FacebookAudience’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.Flurry’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.InMobi’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.MyTarget’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.MillenialMedia’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.Yandex’] = { publisherId = ‘com.coronalabs’ },

– Interstitial
[‘plugin.appodeal.beta.AdColony’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.AppLovin’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.Chartboost’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.FacebookAudience’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.Flurry’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.InMobi’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.IronSource’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.Mobvista’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.MyTarget’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.StartApp’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.MillenialMedia’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.Ogury’] = { publisherId = ‘com.coronalabs’ },

– Rewarded Video
[‘plugin.appodeal.beta.AdColony’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.AppLovin’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.Chartboost’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.FacebookAudience’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.Flurry’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.InMobi’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.IronSource’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.Mobvista’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.MyTarget’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.StartApp’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.Unity’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.Vungle’] = { publisherId = ‘com.coronalabs’ },
[‘plugin.appodeal.beta.Tapjoy’] = { publisherId = ‘com.coronalabs’ },
},[/lua]

Please provide your build.settings and crash log. Please do not blackout anything from your files.

Dear @vlads,

I had posted on the other thread yesterday that ad plugins are not working in the 64-bit builds. As you can see, I had raised this issue a few days back and even attached the logs pertaining to the same, and yet I received no response.

None of the ad networks I tried seem to work. These include applovin, ironsource(supersonic), inmobi and vungle. I had even  noticed people complaining about admob and appodeal ad plugins as well on other threads. I even tried implementing facebook ads today and still got the same error. This time though I was able to build the app but when attempted to install and run it on a device, it crashed.

I’m attaching the logs that I was able to extract after enabling adb to get you a better insight of the error. I’d like to request you to look into the problem and identify the cause as soon as possible as this has been bothering us for some time now.

Here’s the link to pastebin to access logs- https://pastebin.com/fd5WmaLr

Thanks.

I’ve pinged engineering.

@Rob, is there any update on this? We’ve now also tried Facebook audience network but it’s the same problem with all ad networks in the 64-bit builds 

I’d download the latest 64-bit version (3502) and give it a spin.

http://developer.coronalabs.com/sites/default/files/corona/2019.3502/Corona-2019.3502.dmg

http://developer.coronalabs.com/sites/default/files/corona/2019.3502/Corona-2019.3502.msi

Rob

We tried that build as soon as vlads posted on another topic that a new build was available but the problem still persists. Would be quite helpful if you can let us know what the word from engineering is with regards these plugins because if they say it should work, maybe we are missing something and we’ll check again at our end.

You have to be more specific than that. I just tried AdMob, Appodeal beta and Unity Ads plugin, seems to build and work fine. You probably have some plugin which spoils the build, and I can’t figure out which one without you posting which you are using.

Please, put on specific plugin list you have in build.settings.

Vlads, I actually work with the OP so like he’s said in the first post, the problem we’re facing is with:
Applovin, vungle, ironsource, inmobi

Now, we’ve also tried facebook audience network and it’s the same problem. All logs and details are already posted on the thread so please have a look when you get a chance.

There’s nothing wrong with our implementation because everythinf works perfectly when we switch to one of the older corona builds.

Thanks

Based on this:

07-08 17:15:32.917 12756 12756 E AndroidRuntime: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 07-08 17:15:32.917 12756 12756 E AndroidRuntime: \* The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers \* 07-08 17:15:32.917 12756 12756 E AndroidRuntime: \* should follow the instructions here: https://goo.gl/fQ2neu to add a valid \* 07-08 17:15:32.917 12756 12756 E AndroidRuntime: \* App ID inside the AndroidManifest. Google Ad Manager publishers should \* 07-08 17:15:32.917 12756 12756 E AndroidRuntime: \* follow instructions here: https://goo.gl/h17b6x. \* 07-08 17:15:32.917 12756 12756 E AndroidRuntime: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

You need to update your build.settings in the android section.

See the AdMob docs under project management settings:  http://docs.coronalabs.com/plugin/admob/index.html#project-settings

This is new with the 64-bit builds and the updated AdMod SDK. This also impacts Appodeal.

I don’t know why you’re getting AdMob errors since you’re using Applovin, Vungle, IronSource and InMobi. The duplicate symbols should have been addressed several builds ago.

Can you please share your build.settings file?

Rob

Thank you. Looking into plugins you mentioned.

Also, please, separate issues: there are build failures, there are crashes. Crashes are mostly caused by a technicality: our plugins rely on shared plugins. One of thouse is google ad id. Proble was that google ad id was together with AdMob. And now, when updated, AdMob requires to be initialized and used. So I moved out the ad-id into separate shared plugin. Vungle is doing something funny, but they maintain their own plugin,  I don’t really want to touch it.

It’s not like “nothing works”. Just try excluding Vungle, and some plugins would start working. I’m updating plugins referring admob to not require whole admob, just ads-identifier.

Appreciate the inputs vlads and Rob. I get the point about build failure vs crashes-- on Mac, the builds just fail but they do go through on Windows and then the app crashes after we load it on an Android device. 

Admittedly we need to reorganise things a little at this stage because we may have gotten mixed up having tried too many permutations in our attempt to get this working during the past few days. 

Will report back soon after trying your suggestions. cheers!

@vlads- just curious if you guys have or will be putting in a request to folks at Vungle to revise their plugin?

btw, I updated all plugins not to require AdMob id. There should be much less crashing now. Working on the issues.

Thanks for understanding. You goal here same us ours - to make your existing apps work. If they don’t build/don’t work, but was before, we want to fix it.

I updated all most the ads plugins, and actually tried to update Vungle plugin for new build system. It seems quite straightforward. I also emailed Vungle with suggested changes.

Please, try to build your app again, and see how it goes.

Thanks!

Thanks! We are now finally able to get applovin running after using dummy values for the admob app Id. We’ll try other plugins as well and post any significant findings.

You’re welcome. By the way. Applovin (and other plugins) should work without dummy values for app id. Please confirm.

Hey!

Thanks for your continued support Rob and vlads. We were finally able to run most of the ad plugins by including adMob APP_ID in the build.settings. From the logs, it can be seen that the app crashes due to an IllegalStateException caused by MobileAdsInitProvider. The other ad plugins are for some reason failing to initialise unless the following entry is added to the android table inside build.settings :

applicationChildElements =

        {

            [[

                <meta-data android:name=“com.google.android.gms.ads.APPLICATION_ID”

                    android:value="[YOUR_ADMOB_APP_ID]"/>  – replace with your app id. 

            ]],

        }

It is also mentioned in AdMob’s official documentation that adding a meta-data tag is compulsory. This was the message provided :

Important:  This step is required as of Google Mobile Ads SDK version 17.0.0. Failure to add this <meta-data> tag results in a crash with the message: “The Google Mobile Ads SDK was initialized incorrectly.”

more info can be found here : https://developers.google.com/admob/android/quick-start

So we tried adding the above bit of code and for APP_ID, we copied a sample key provided in adMob’s documentation and built the app. Surprisingly, the app wasn’t crashing anymore and ad networks started showing ads. 

We understand that this shouldn’t be the case as you mentioned in one of your previous posts that all plugins have been updated and they shouldn’t require app id any more. But as of now, when I don’t include an adMob app id in build.settings(while using ad plugins like appLovin, supersonic etc.), the app crashes. Hope this information helps you diagnose the problem. If you require any more information, feel free to ask.

PS-  I’ve done all my testing using the latest build i.e. 3502.

Cheers!