Admob in Unity3D Crashes with Rewarded Video

1,897 views
Skip to first unread message

Markus Herbig

unread,
Oct 23, 2017, 10:05:57 AM10/23/17
to Google Mobile Ads SDK Developers
Hello,
I was trying to implement Admob in my Android Unity Project.

I imported and build the app successfully. The video loads and starts correctly. But once I click on "close" before the video ends, the app crashes.
Do I play the video without closing early, I get the reward. Do I start a second video and click on close, it works perfectly, the app continues and no reward is given.

I looked at the log file but I could not find any error that causes the crash. Does anyone have an idea how to find out, what causes the crash and how to fix it?

Thank you very much and best regards!

Deepika Uragayala- MobileAds SDK team

unread,
Oct 23, 2017, 12:48:29 PM10/23/17
to Google Mobile Ads SDK Developers
Hi Markus,

Thanks for contacting us. Can you share your Ad unit Id and a sample project of your implementation with us to debug the issue on our end? Can you also confirm to us whether you are able to reproduce the issue with our Sample apps?

I will be sending you an email shortly to share your Ad unit Id and sample project privately.

Regards,
Deepika Uragyala
Mobile Ads SDK Team

Markus Herbig

unread,
Oct 23, 2017, 4:42:48 PM10/23/17
to Deepika Uragayala- MobileAds SDK team, Google Mobile Ads SDK Developers
Hello and thank you a lot for your fast response.
So I was trying different things today without success.

I updated all SDKs through the SDK Manager.
I reimported Firebase and google services.
I forced the android resolver.
I double-checked the code.

Attached you can find my logcat. I just printed all to see everything going on but I cannot figure out why exactely the app is crashing. Maybe you can see the problem. I started the video at around 22:13:30 and it had been loaded at around :34 . Then I clicked the close button and yes close video on the popup at around :40. After that the ad disappears shows the game again but the screen is not updating anymore eventhough the script goes on because it triggers "end Loading" which is a debug.log in a custom trigger function to unshow the loader animation but the loader is still shown and does not show any animation. after a few short seconds the app crashes totally and asks to restart again.

I also attached my code so maybe I am doing something wrong (you can see my IDs in the code) and additionaly I implemented the HelloWorld Sample Scene in the app. This does not crash the app, so now I am not really sure what I am doing wrong. Thank you very much for your investigation and help! I am not sure what else I should do or try. I followed the documentation but something must be wrong. I used to use UnityAds which worked fine but I like AdMob more because there is more video variation, but as you can see I am having trouble implementing.

Best regards, Markus



--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/aVLN6oMyscQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/5297d61a-d4c8-41e6-a251-acc0b2f78359%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
logcat.txt
CodeForAdmob.txt

Deepika Uragayala- MobileAds SDK team

unread,
Oct 24, 2017, 12:15:01 PM10/24/17
to Google Mobile Ads SDK Developers
Hi Markus,

Thank you for the device logs but they don't seem to indicate something out of the ordinary though. It looks like the crash might be originating from one of these two calls:

ActiveLoadingController.current.endLoading(0); 
handleVideoAdResult(m_bRewarded, true); 

Can you check by commenting out those two calls and see if the crash is still occurring? I have not been able to reproduce any such crash with our sample script, so this definitely points to an implementation issue only.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
To unsubscribe from this group and all its topics, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.

Markus Herbig

unread,
Oct 25, 2017, 1:58:33 AM10/25/17
to Deepika Uragayala- MobileAds SDK team, Google Mobile Ads SDK Developers
Hi and thanks again for looking into it.
After testing some things I found the "error". The problem is the PopupController.createPopup(...)
I am actually not really sure why because it usually works. It just instanciates a prefab that contains one sprite and a text with a button and nothing more but it somehow crashes the app after an admob video. So I am not really sure what the problem here is but it works for me to not spawn my own popup. I will try some time to reproduce it in the sample script and send it to you if its possible.
Thank you very much for your time! Best regards!
Markus

To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.

--

---
You received this message because you are subscribed to a topic in the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/aVLN6oMyscQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
To post to this group, send email to google-adm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/ee7ed781-3ac7-4761-85ba-fab1c2f3d4a7%40googlegroups.com.

Ticker 92

unread,
Oct 25, 2017, 3:51:53 PM10/25/17
to Google Mobile Ads SDK Developers

KTPL Dev

unread,
Jul 25, 2018, 3:33:17 AM7/25/18
to Google Mobile Ads SDK Developers
Hello,
Can you please help me. My interstitial ad is ok.When rewarded ad is finished the game is crashing on Android.Can you suggest me the splution please.its urgent.My ad id is
ca-app-pub-6748672626551932/3107934800

mobileadssdk-a...@google.com

unread,
Jul 25, 2018, 3:13:37 PM7/25/18
to KTPL Dev, Google Mobile Ads SDK Developers
Hi there,

Thanks for reaching out to us. I was able to load rewarded video ads with your Ad unit Id using our Sample app without any issues. Can you send us a sample app which reproduces the issue? Are you able to reproduce the issue with our Sample app? Please send us the complete device logs as well for us to take a look. You can use "Reply Privately to Author" option to send the requested information privately.

Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-admob-ads-sdk/85cc36ea-84ed-4314-9f2e-214aa733b3ca%40googlegroups.com.

Rob Adams

unread,
Apr 18, 2019, 4:07:31 PM4/18/19
to Google Mobile Ads SDK Developers
I know this is old but this happened to me as well... my issue was that Admob puts your application in pause while it displays ads.  My app purposely shut down the application when it was put in background

mobileadssdk...@google.com

unread,
Apr 19, 2019, 3:56:49 PM4/19/19
to Rob Adams, Google Mobile Ads SDK Developers
Hello there,

Can you elaborate on your issue and let us know how to reproduce this with our sample apps or provide us code snippets of your integration with complete device and charles logs. We will then have a look into this.


Regards,
Deepika Uragayala
Mobile Ads SDK Team
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+ page:
    http://googleadsdeveloper.blogspot.com
    https://plus.google.com/115658573333388777174/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
To post to this group, send email to google-admob-ads-sdk@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages