googleads-mobile-flutter: Load ads crash the app in release mode
Plugin Version
google_mobile_ads: ^0.13.5
Steps to Reproduce
When i run the app in debug mode it run without any problem, but when i run in release mode the crash happen with first ad load and it stop the app.
Notes:
1- i have tried to use test unit-id and my app id, both have the same issue. 2- i have added meta-data in my app manifest correctly.
flutter run --release --verbose
[ +68 ms] E/AndroidRuntime(23328): FATAL EXCEPTION: main
[ +2 ms] E/AndroidRuntime(23328): Process: com.araktek.abra, PID: 23328
[ ] E/AndroidRuntime(23328): java.lang.LinkageError: Method java.lang.Object com.google.android.gms.internal.ads.ro3.zzb()
overrides final method in class Lcom/google/android/gms/internal/ads/jo3; (declaration of 'com.google.android.gms.internal.ads.ro3'
appears in /data/app/com.araktek.abra-zJbCG33S15XOP9NIIaF6Pw==/base.apk)
[ +1 ms] E/AndroidRuntime(23328): at com.google.android.gms.internal.ads.lv0.zza(Unknown Source:23)
[ ] E/AndroidRuntime(23328): at com.google.android.gms.internal.ads.sk2.a(Unknown Source:297)
[ ] E/AndroidRuntime(23328): at com.google.android.gms.internal.ads.m82.p0(Unknown Source:75)
[ ] E/AndroidRuntime(23328): at com.google.android.gms.internal.ads.m82.L2(Unknown Source:5)
[ ] E/AndroidRuntime(23328): at com.google.android.gms.internal.ads.g70.h(Unknown Source:28)
[ ] E/AndroidRuntime(23328): at com.google.android.gms.ads.e0.a.b(Unknown Source:29)
[ ] E/AndroidRuntime(23328): at io.flutter.plugins.b.f.d(Unknown Source:0)
[ ] E/AndroidRuntime(23328): at io.flutter.plugins.b.r.j(Unknown Source:25)
[ ] E/AndroidRuntime(23328): at io.flutter.plugins.b.v.j(Unknown Source:822)
[ ] E/AndroidRuntime(23328): at d.a.c.a.j$a.a(Unknown Source:17)
[ +2 ms] E/AndroidRuntime(23328): at io.flutter.embedding.engine.f.b.e(Unknown Source:49)
[ +1 ms] E/AndroidRuntime(23328): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(Unknown Source:4)
[ ] E/AndroidRuntime(23328): at android.os.MessageQueue.nativePollOnce(Native Method)
[ ] E/AndroidRuntime(23328): at android.os.MessageQueue.next(MessageQueue.java:363)
[ +1 ms] E/AndroidRuntime(23328): at android.os.Looper.loop(Looper.java:173)
[ +1 ms] E/AndroidRuntime(23328): at android.app.ActivityThread.main(ActivityThread.java:8178)
[ +1 ms] E/AndroidRuntime(23328): at java.lang.reflect.Method.invoke(Native Method)
[ +1 ms] E/AndroidRuntime(23328): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
[ ] E/AndroidRuntime(23328): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
flutter doctor -v
[√] Flutter (Channel stable, 2.5.2, on Microsoft Windows [Version 10.0.19042.1288], locale en-US)
• Flutter version 2.5.2 at C:\Src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3595343e20 (5 weeks ago), 2021-09-30 12:58:18 -0700
• Engine revision 6ac856380f
• Dart version 2.14.3
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\mahmo\AppData\Local\Android\sdk
• Platform android-31, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[!] Visual Studio - develop for Windows (Visual Studio Enterprise 2019 16.10.3)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise
• Visual Studio Enterprise 2019 version 16.10.31424.327
• Windows 10 SDK version 10.0.19041.0
X The current Visual Studio installation is incomplete. Please reinstall Visual Studio.
[√] Android Studio (version 4.1)
• Android Studio at C:\Program Files\Android\Android Studio1
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[!] Android Studio (version 4.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
X Unable to determine bundled Java version.
• Try updating or re-installing Android Studio.
[√] VS Code, 64-bit edition (version 1.60.0)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.27.0
[√] Connected device (4 available)
• SNE LX2 (mobile) • 64X0218B07002965 • android-arm64 • Android 10 (API 29)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19042.1288]
• Chrome (web) • chrome • web-javascript • Google Chrome 95.0.4638.69
• Edge (web) • edge • web-javascript • Microsoft Edge 95.0.1020.30
! Doctor found issues in 3 categories.
android/build.gradle
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.google.gms:google-services:4.3.8'
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
android/app/build.gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('keystore.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 30
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
checkReleaseBuilds false
}
defaultConfig {
applicationId "com.araktek.abra"
minSdkVersion 23
targetSdkVersion 30
multiDexEnabled true
versionCode 5
versionName "0.3"
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.android.gms:play-services-ads:20.4.0'
implementation("com.android.support:multidex:2.0.1")
}
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 14
- Comments: 17 (1 by maintainers)
i talk about mediation in comment above but now i get same error from a diffrent app that i didnt use mediation in , i only upgrade the plugin to version 1
same problem with me , but not everytime , also i couldnt reproduct it locally but i got it from firebase crashlytics (This issue has 337 crash events affecting 83 users) with diffrent device type and android version
firebase crashlytics title
logs
it start apperse after i release new update to my app releated stuff in that update i add facebook mediation (but it work fine on my device in release mode ) i update google_mobile_ads from ^0.13.4 to ^0.13.5
I am also facing this issue in release mode not locally.
This is marked as a “Repetitive Crash” for us in Crashlytics.
Affected devices seem to be solely Samsung (Galaxy S10+, Galaxy A21S, Galaxy S9).
On the other hand, 99.71% of our Android users is crash-free. There are definitely more Samsung users than 0.29% of our Android install userbase - so I suspect it might be linked to an issue with the Google Play Services app on those devices, or at least it is a hard-to-reproduce issue but an issue none the less.
This is our stacktrace on all affected devices:
EDIT: Got some more devices since, now also including Huawei and more Samsung devices: Galaxy A7 (2018), Galaxy S21 5G, Galaxy A52, Huawei PPA-LX2, Huawei P20 lite All android versions between 9, 10 or 11.
In the last 7 days, we’ve had 20 occurances of this issue with 8 users, out of a total of 4.1k users. Still shown as a “Repetitive Crash” and our nr 1 Android issue in Crashlytics though.
FlutterAdLoader.java line 2 io.flutter.plugins.googlemobileads.FlutterAdLoader.loadInterstitial
Looks like the same that #471, but it’s more information there. May be you should combine them?
Same here:
This is the same error as sent above:
Fatal Exception: java.lang.LinkageError: Method java.lang.Object com.google.android.gms.internal.ads.dq3.zzb() overrides final method in class Lcom/google/android/gms/internal/ads/vp3; (declaration of 'com.google.android.gms.internal.ads.dq3' appears in /data/app/~~CRDpc3lkcGl1AzukjCquOw==/com.noegcoil.theorystudy-JCH9mizxzid_Th2py9C3pg==/base.apk) at com.google.android.gms.internal.ads.zzcqd.<init>(zzcqd.java:307) at com.google.android.gms.internal.ads.zzcqc.zza(zzcqc.java:66) at com.google.android.gms.internal.ads.zzexc.zza(zzexc.java:297) at com.google.android.gms.internal.ads.zzelg.zze(zzelg.java:75) at com.google.android.gms.internal.ads.zzelg.zzP(zzelg.java:5) at com.google.android.gms.internal.ads.zzbrw.zza(zzbrw.java:28) at com.google.android.gms.ads.interstitial.InterstitialAd.load(InterstitialAd.java:29) at io.flutter.plugins.googlemobileads.FlutterAdLoader.loadInterstitial(FlutterAdLoader.java:2) at io.flutter.plugins.googlemobileads.FlutterInterstitialAd.load(FlutterInterstitialAd.java:23) at io.flutter.plugins.googlemobileads.GoogleMobileAdsPlugin.onMethodCall(GoogleMobileAdsPlugin.java:1362) at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:17) at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:18) at io.flutter.embedding.engine.dart.DartMessenger.lambda$handleMessageFromDart$0(DartMessenger.java:20) at io.flutter.embedding.engine.dart.DartMessenger.lambda$handleMessageFromDart$0$DartMessenger(DartMessenger.java) at io.flutter.embedding.engine.dart.-$$Lambda$DartMessenger$6ZD1MYkhaLxyPjtoFDxe45u43DI.run(-.java:12) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:246) at android.app.ActivityThread.main(ActivityThread.java:8506) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)I haven’t been able to reproduce the issue, The app builds and loads fine in release mode using the
google_mobile_ads:1.0.1labeling this issue for further investigation from the team.cc: @jjliu15
return to version
google_mobile_ads: ^0.13.6fix the errorSamp here today, google_mobile_ads: ^1.0.0