App crashes in run-time due to Mobile.MobileAds.initialize(this) {}

214 views
Skip to first unread message

Igor Morozov

unread,
Jun 4, 2022, 2:33:07 AM6/4/22
to Google Mobile Ads SDK Developers
Hi all,
I am struggling with an issue: My app crashes after initialization of the MobileAds.


 I have an app with dynamic features (on-demand delivery modules).  I initialize the MobileAds in onAttachBaseContent and this is destroying my resources:

 I researched logs and found that the crash happens due to lack of layout in dex files.

Do you also have the same problem? Really thanks in advance

Mobile Ads SDK Forum Advisor

unread,
Jun 6, 2022, 6:27:51 AM6/6/22
to igor.mo...@gmail.com, google-adm...@googlegroups.com

Hi Igor,

Thanks for reaching out to the Mobile Ads SDK forum.

For us to further investigate this, could you please provide us the following:

  • Please confirm if the issue is reproducible by testing with our sample apps on your end?  
  • Your sample app project said crashes are happening
  • Steps to replicate and complete stack traces/device logs or Charles logs that you have during one of the crashes.

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002bc2iKQAQ&entry.80707362=00109986

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

Regards,

Google Logo
Yasar
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2bc2iK:ref
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Mobile Ads SDK Forum Advisor

unread,
Jun 14, 2022, 9:01:42 AM6/14/22
to igor.mo...@gmail.com, google-adm...@googlegroups.com

Hi Igor,

Thank you for your response.

I've check your sample app project provided, but I wasn't able to encounter the error "Resources NotFoundException resource ID #". Can you provide us the steps to replicate this error, so that we can better look into this?

Regards,

Google Logo
Princess Pamela
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2bc2iK:ref

Igor Morozov

unread,
Aug 19, 2022, 6:11:41 AM8/19/22
to Google Mobile Ads SDK Developers
you can see how it crashes here (this is link for Open Test my app from Play Google Console):

Mobile Ads SDK Forum Advisor

unread,
Aug 19, 2022, 2:44:32 PM8/19/22
to igor.mo...@gmail.com, google-adm...@googlegroups.com
Hi Igor,

Would it be possible for you to provide a project file instead? Rest assured that the shared project file will be used for investigative purposes only and will not be shared externally. You may send the requested file following the steps and links provided on this thread.

Regards,
Google Logo
Teejay Wennie
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2bc2iK:ref

Igor Morozov

unread,
Aug 20, 2022, 5:18:38 AM8/20/22
to Google Mobile Ads SDK Developers
Hello,
sure I can provide it here. But please pay attention that this problem happens  only if you download on-demand modules  from Google Store. 
I mean if you don't download modules ( you already have them in a phone memory) so no problem is there.
But when you download these modules from Google Store thus app is crashes.

In conclusion, this issue happens if you have Ads in on-demand modules and if you download them from Google Store

Mobile Ads SDK Forum Advisor

unread,
Aug 22, 2022, 3:14:43 AM8/22/22
to igor.mo...@gmail.com, google-adm...@googlegroups.com

Hi Igor,

Thank you for your response.

Upon checking your sample app provided, I wasn't able to replicate the behavior or crash you've mentioned. As we mentioned previously, can you provide us the steps you made to replicate this behavior? Also, is this only happening to a specific device? If yes, kindly provide us the device name and versions affected.

Regards,

Google Logo
Princess Pamela
Mobile Ads SDK Team
 

 

ref:_00D1U1174p._5004Q2bc2iK:ref

Igor Morozov

unread,
Aug 24, 2022, 7:18:29 PM8/24/22
to Google Mobile Ads SDK Developers
Thank you for answer.
This issue happens also on other devices. I just checked it on my virtual device in Android Studio : Pixel 4 API 30.
Main problem happens after I download on-demand module from Play Google and this module has ads from AdMob. After downloading is finished,  assets in this module unavailable. I suppose it happens because path to assets is destroyes,

Step 1: I download my app from Play Google Store 

Screenshot_1661382177.png

Step 2: I open this 
Screenshot_1661382037.png


Step 3: I  press on button "Animated Stickers" or "Static Stickers" (it is doesn't matter)
App is downloading a choosen module from Play Store
Screenshot_1661382095.png


Step 4: Now we can see that assets are unavailable
Screenshot_1661382121.png


Thank you in advance

Mobile Ads SDK Forum Advisor

unread,
Aug 25, 2022, 3:24:12 AM8/25/22
to igor.mo...@gmail.com, google-adm...@googlegroups.com

Hi Igor,

Thank you for your response.

Upon following the steps you've provided, I wasn't able to replicate this in my end using your sample app project provided to us. I've also checked this in our test device, and installed your app in the play store, and I wasn't able to replicate this. In addition to that, I see that your app is for internal testing, can you confirm if you have a different app where you are testing this behavior? If yes, kindly provide it to us using the link below.

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:

1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=Mobile+Ads+SDK&entry.460850823=5004Q00002bc2iKQAQ&entry.80707362=00109986

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

Regards,

Reply all
Reply to author
Forward
0 new messages