java.lang.RuntimeException: Unable to get provider ....

Hi Guys,

After integrating Unity Mediation Beta based on the tutorial provided by Unity we managed to build the game without problems but once the game has been updated to Google Play, it crashes on launch. I implemented all Ids and everything, game is has been built on api 30.

java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:
******************************************************************************
* The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers *
* should follow the instructions here: *
* https://googlemobileadssdk.page.link/admob-android-update-manifest *
* to add a valid App ID inside the AndroidManifest. *
* Google Ad Manager publishers should follow instructions here: *
* https://googlemobileadssdk.page.link/ad-manager-android-update-manifest. *
******************************************************************************
at android.app.ActivityThread.installProvider(ActivityThread.java
at android.app.ActivityThread.installContentProviders (ActivityThread.java:7680)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:7500)
at android.app.ActivityThread.access$1400 (ActivityThread.java:301)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2150)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loop (Looper.java:246)
at android.app.ActivityThread.main (ActivityThread.java:8587)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1130)
at com.google.android.gms.internal.ads.zzbhw.attachInfo
at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo
at android.app.ActivityThread.installProvider (ActivityThread.java:8144)
If you guys could give a helping hand, we could provide anything that needs fixing this bug.

Hello @OwlSoftware ,
I would assume this is resulting from a typo in your AdMob app IDs. Can you validate that the proper app IDs have been setup in the adapter configuration?

Alternatively, if you haven’t gotten setup with admob or don’t plan on using it you can simply uninstall it using the button under the action column.

Due tot he fact that we exported the app on Android I only had completed the Android column. I will make a build and test with both of them completed, I have already had admob setup

It was like this.

Unfortunately even with Ios app Id completed we have trouble. The game is built to target API 30 and minimum I guess 21. This is the error what we get from a api 30 phone.

I will try removing adMob for the moment, and push a version to see if it works.

Hi @OwlSoftware ,
Could you provide a full log so we can properly investigate?

Thanks!

How could I provide a full log ? The only log file i have is from google play console, or how could we implement one in order to catch the exception, is there somewhere a tutorial ?

Thanks

This is what i have got on my phone while it crashed, i hope you guys could see something. I saw something that class was not found due to CollectionsKt. Shall i provide the implementation of mediation and my package manager ? Maybe I am missing something ?

I would recommend using adb logcat, or your favourite editor to extract the log. using adb you would open a console and do something like adb logcat > myLog.txt with your phone plugged through usb.

Bumping because I am having the same issue.

This is the logcat:

Why is this happening?

Hi @zeroBudget ,

Do you have your admob App Ids correctly set up as shown in this post ?

Thanks for sharing this issue with us, let us know if the setup mentioned above fixes your issue.

That’s strange, I don’t see that section for Mediation and Ad Adapters.
8153867--1059392--upload_2022-5-24_16-20-47.png

This is all I have for services:
8153867--1059398--upload_2022-5-24_16-22-46.png

This is the app id. Do I need the iOS one? All I’m trying to do is build for Android to test it on my phone.

Should I uninstall and reinstall the Google Mobile Ads Plugin?

8153867--1059398--upload_2022-5-24_16-22-46.png

Hi @zeroBudget ,
It seems like you do not have the Unity Mediation package installed. If you are using google’s ads plugin directly I would recommend you refer to their documentation regarding how to use their plugin.

1 Like