MobileAds.Initialize(Action<InitializationStatus> initCompleteAction) issue with 2019.2.5f1

3,626 views
Skip to first unread message

Nicolas C

unread,
Sep 18, 2019, 1:57:34 PM9/18/19
to Google Mobile Ads SDK Developers
I used to use the following function to Initialize MobileAds, however since I updated from Unity 2018.3.13f1 to 2019.2.5f1 the callback never gets called:
GoogleMobileAds.Api.MobileAds.Initialize(Action<InitializationStatus> initCompleteAction)

However by using the following function it works well:
GoogleMobileAds.Api.MobileAds.Initialize(string appId)

But I'd much rather have the callback called so I know it got properly initialized! Does anyone know what step could I take to investiguate more/fix this? It was working well before, the appId is properly defined in the GoogmeMobileAds settings.
Thanks

Mobile Ads SDK Forum Advisor Prod

unread,
Sep 18, 2019, 3:42:17 PM9/18/19
to nicolas....@gmail.com, google-adm...@googlegroups.com
Hello there,

Thanks for reaching out to us. The SDK was able to fire the GoogleMobileAds.Api.MobileAds.Initialize(Action<InitializationStatus> initCompleteAction) callback without any issues and I have tested this on both v2019.2.5f1 and v2018.3.13f1 on an Android S8 device. I have used our sample apps and the callback was present for both of the version. Can you provide us a sample app to help debug this further if you are able to reproduce this? Also, can you confirm that you are using the latest version of the Unity plugin? You can share your sample apps using "Reply Privately to Author" option to share the details privately.

Regards,
Deepika Uragayala
Mobile Ads SDK Team



ref:_00D1U1174p._5001UHHExq:ref

Mobile Ads SDK Forum Advisor Prod

unread,
Sep 19, 2019, 3:50:29 PM9/19/19
to nicolas....@gmail.com, google-adm...@googlegroups.com

Hi Nicolas,

Thanks for getting back with more information. I'm still unable to reproduce this issue. Let me attach a screenshot to indicate that I was able to notice the callback being fired without any issues. In the screenshot you can notice the Unity version, code snippet of the MobileAds.Initialize, Android Studio log of the Debug.Print() statement, which is indicative that there is no issue. Can you try again with the attached sample app and then let us know?



Regards,
Deepika Uragayala
Mobile Ads SDK Team



ref:_00D1U1174p._5001UHHExq:ref
UnityIssue.png

Mobile Ads SDK Forum Advisor Prod

unread,
Sep 20, 2019, 3:46:41 PM9/20/19
to nicolas....@gmail.com, google-adm...@googlegroups.com

Hi Nicolas,

I was not able to reproduce the issue on our end with your sample app as well. Can you send the screenshots or a screen recording for us

to take a look? Did you get a chance to try our sample app on your end?

Plow Apps

unread,
May 10, 2020, 10:07:25 AM5/10/20
to Google Mobile Ads SDK Developers
Hello,

It also happens to me, if I use GoogleMobileAds-v5.0.1 all is ok, if I updae it with GoogleMobileAds-v5.1.0 this error appears.

EntryPointNotFoundException: GADUInitializeWithCallback
GoogleMobileAds.iOS.MobileAdsClient.Initialize (System.Action`1[T] initCompleteAction) (at Assets/GoogleMobileAds/Platforms/iOS/MobileAdsClient.cs:53)

Unity version 2019.3.13f1.


Mobile Ads SDK Forum Advisor Prod

unread,
May 10, 2020, 11:50:53 PM5/10/20
to mrplo...@gmail.com, google-adm...@googlegroups.com

Hi there,

 

Thank you for reaching out to us.

 

Could you kindly provide the details below (via Reply privately to author) so that I can investigate the issue?

  • Copy of a sample project (replicating the issue)
  • Steps to replicate the issue

 

Regards,

Ziv Yves Sanchez

Mobile Ads SDK Team



ref:_00D1U1174p._5004Q1zL9iQ:ref

Peter Wilson

unread,
May 16, 2020, 6:59:34 AM5/16/20
to Google Mobile Ads SDK Developers
Hi,

I have the same issue, has there been any update on this?

Best,

Huỳnh Quân

unread,
May 16, 2020, 9:33:07 AM5/16/20
to google-adm...@googlegroups.com
Hi,

I have the same issue, has there been any update on this?

I use unity 2019.2.21 when I run project in Unity Editor and IOS platform.

When I run with a real device everything seems normal, but I'm worried about potential bugs

Peter Wilson

unread,
May 16, 2020, 9:56:00 AM5/16/20
to Google Mobile Ads SDK Developers
This is only a temporary work around but I downloaded version 5.0.1 and had no issues.

Mobile Ads SDK Forum Advisor Prod

unread,
May 17, 2020, 8:22:06 PM5/17/20
to poiter...@gmail.com, qua...@gmail.com, google-adm...@googlegroups.com

Hi Peter, Huỳnh,

 

Just to clarify: is the issue occurring on a real device? It should not matter if this is issue is happening on the Unity Editor simulator, since the AdMob SDK, by design, will not work on it.

 

If you could confirm that this issue is, in fact, occurring on a real device, you may then kindly provide the details below (via Reply privately to author) so that I can investigate the issue:

  • Copy of a Unity sample project (replicating the issue)
  • Steps to replicate the issue

Peter Wilson

unread,
May 17, 2020, 10:29:50 PM5/17/20
to Mobile Ads SDK Forum Advisor Prod, qua...@gmail.com, google-adm...@googlegroups.com
I am unable to even build the app to test on a real device because of the error.

Best, 

Mobile Ads SDK Forum Advisor Prod

unread,
May 18, 2020, 2:32:57 AM5/18/20
to poiter...@gmail.com, google-adm...@googlegroups.com

Hi Peter,

 

Thank you for updating us on your concern.

 

Could you still kindly provide the details below (via Reply privately to author) so that I can investigate the issue?

Huỳnh Quân

unread,
May 18, 2020, 5:03:20 AM5/18/20
to Google Mobile Ads SDK Developers

Screen Shot 2020-05-18 at 16.03.01.png

In fact, when I ran a sample project on github, I had the same situation. I use untiy 2019.2.21f. And run project when switching platform to IOS

Vào 07:22:06 UTC+7 Thứ Hai, ngày 18 tháng 5 năm 2020, mobileadssdkforumadvisor đã viết:

Mobile Ads SDK Forum Advisor Prod

unread,
May 18, 2020, 5:36:33 AM5/18/20
to qua...@gmail.com, google-adm...@googlegroups.com

Hi Huỳnh,

 

Thank you for updating us on your concern.

 

I checked this issue on my end, and was able to build an Xcode export of the HelloWorld test project, using version 5.1.0 of the AdMob Unity plugin and Unity 2019.3.0f6 (see attached screenshot). Kindly note that it is intentional that the error should appear in the Unity Editor simulator should you choose to run the project there; this is because Macs (where I assume the Unity Editor would be running from) do not have iOS-specific libraries built into them, nor can they call iOS-specific libraries by default.

 

With that said, could you try re-importing the AdMob SDK Unity plugin into your project? If the situation still exists despite this, then you may kindly provide the details below (via Reply privately to author) so that I can further investigate the issue:

  • Copy of a Unity sample project (replicating the issue)
  • Steps to replicate the issue

 

You may zip the entire Unity project (excluding the Library and Temp folders) in order to reduce its size, then send it to me via a shareable link from your Google Drive (or on any other file-sharing site that you prefer). Don't forget to send the shareable link via Reply privately to author.

Screen Shot 2020-05-18 at 5.22.12 PM.png

Elad Lebovitch

unread,
May 31, 2020, 6:49:51 AM5/31/20
to Google Mobile Ads SDK Developers
Hey, 
I'm quite sure this is new in version 5.1.0 plus unity 2019.3.15.
We have been working with AdMob using macOS on Unity editor for a year now and right after upgrading a few days ago to 5.1.0 and the latest unity version we see this error all with every run.

Intentional or not, I wouldn't expect to be getting an error while working in the editor, it's our development environment and while it's acceptable for the plugin not to work 1:1 like on device, it shouldn't throw an error unless we are doing something wrong which will cause it to fail when running in the production environment. 

I think it's critical to take a deeper look with the above setup and resolve the issue...

Mobile Ads SDK Forum Advisor Prod

unread,
May 31, 2020, 9:43:40 PM5/31/20
to el...@banditos.studio, google-adm...@googlegroups.com

Hi Elad,

 

Thank you for reaching out to us.

 

You may want to try wrapping preprocessor directives (such as the ones seen from our example code) around the MobileAds.Initialize() function in order to prevent it from throwing an error while testing in the Unity Editor. Kindly note, however, that this will completely disable even the dummy functions of AdMob during testing. If this compromise should prove to be unacceptable, then you may kindly provide the details below (via Reply privately to author) so that I can raise this issue to the rest of the team:

Elad Lebovitch

unread,
Jun 1, 2020, 3:52:21 AM6/1/20
to Google Mobile Ads SDK Developers
I think the issue is already well known and was questionably closed...
https://github.com/googleads/googleads-mobile-unity/issues/1325

Please help me understand, do you actually view it as an acceptable compromise...?

I wouldn't imagine having to go through the code and surround everything with #ifdefs especially when the previous version worked great on both iOS and Android. 
Our team would be much better off just going back to the previous version where everything worked smoothly...

Even if it isn't trivial to keep it working correctly, I think it would make more sense for the AdMob team to go the extra mile for AdMob users rather than force all of us to start littering our code, taking unnecessary risks.

Mobile Ads SDK Forum Advisor Prod

unread,
Jun 1, 2020, 5:03:14 AM6/1/20
to el...@banditos.studio, google-adm...@googlegroups.com

Hi Elad,

 

I understand your concern.

 

While I'm afraid that I cannot speak for the team on whether or not this issue is an acceptable compromise as we go forward with the AdMob SDK Unity plugin, I can at the very least help in raising it to the rest of the team for further discussion. If you can kindly provide the details below (via Reply privately to author), we will then be able to continue our investigation on this:

  • Copy of a Unity sample project (replicating the issue)
  • Steps to replicate the issue

 

Regards,

Reply all
Reply to author
Forward
0 new messages