Google Mobile Ads SDK for Unity - Ad failed to load error 3

613 views
Skip to first unread message

ad...@superpea.com

unread,
May 2, 2021, 11:13:28 AM5/2/21
to Google Mobile Ads SDK Developers
Hi,

We are using the Google Mobile Ads SDK (Version 5.4.0) for Unity and could use a little help if you would be so kind as it appears to be causing a crash on API 30 which we are in the process of trying to support for our app.

In a nutshell, we chose to write all 60,000 lines of our Android project in Unity's flagship language "Unityscript" back in 2013, which they later went on to deprecate in 2017 leaving us unable to update Unity further.

As Unity 2017 does not support API 30 due to an out-of-date and non-customizable Gradle implementation we cannot use it to keep our app up-to-date on your newer devices.

Our work-around is to use Unity to export the project to Android Studio, where we can upgrade the Gradle version, and support the latest SDK.

After a lot of work and a steep learning curve we're basically there but are a little stuck.

The .aab which Android Studio produces works perfectly across all APIs lower than 30 and Admob can serve ads as usual. Furthermore, it now appears to work perfectly in all Android Emulators provided by Android Studio that are running API 30. These emulators get "Test ads" however rather than the "true" delivery which is why I expect they work. 

On physical devices running API 30 however the behaviour is inconsistently buggy, ranging from total crashes on start-up to silent recovery but consistently involving Google Ads SDK returning "I/Ads: Ad failed to load : 3".

Prior to that, when connected through Android Studio's debugger the log says:

W/DynamiteModule: Local module descriptor class for com.google.android.gms.measurement.dynamite not found.

W/Parcel: **** enforceInterface() expected 'com.google.android.gms.ads.clearcut.IClearcut' but read 'com.google.android.gms.gass.internal.clearcut.IClearcut'

W/Ads: Update ad debug logging enablement as false
W/AdWorker(Defaul: type=1400 audit(0.0:299): avc: granted { execute } for path="/data/data/com.Superpea.Petal_Farm/app_pccache/5/CCFA22EBAF6E1880534512380E8EF01170FD9593/pcam.jar" dev="dm-12" ino=8955 scontext=u:r:untrusted_app:s0:c35,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c35,c257,c512,c768 tclass=file app=com.Superpea.Petal_Farm

If you would like the full logs please do let me know, there's a lot of other stuff in black text.

I'm a bit confused as to what could be causing this and what control we have to fix it our-end within Android Studio. 

If you could confirm that this is a correct implementation of the build.gradle file specific to the Module GoogleMobileAdsPlugin.androidlib I would immensely appreciate that or any other ideas you might have to narrow this down/understand it better.

buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
}
}

apply plugin: 'android-library'

dependencies {
implementation fileTree(dir: 'bin', include: ['*.jar'])
implementation fileTree(dir: 'libs', include: ['*.jar'])
}

android {
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
//java.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
}

compileSdkVersion 30
buildToolsVersion '31.0.0-rc3'
defaultConfig {
targetSdkVersion 30
}

lintOptions {
abortOnError false
}
}

Mobile Ads SDK Forum Advisor Prod

unread,
May 3, 2021, 1:29:21 AM5/3/21
to ad...@superpea.com, google-adm...@googlegroups.com
Hi there,

Thank you for reaching out to us. Could you please provide the details below (via Reply to author or a direct, private reply to mobileads...@gmail.com) so that I can further investigate this issue:
  • App ID
  • Ad Unit ID
Also, is the crash that you reported locally reproducible on your end? If so, kindly send us a test project and the steps to trigger the crash.

Regards,
Google Logo
Teejay Wennie Pimentel
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2GJKAv:ref
Reply all
Reply to author
Forward
0 new messages