firebase / flutterfire

🔥 A collection of Firebase plugins for Flutter apps.
https://firebase.google.com/docs/flutter/setup
BSD 3-Clause "New" or "Revised" License
8.68k stars 3.97k forks source link

[AdMob] Class not found (not using minifier or proguard) #2173

Closed JCKodel closed 3 years ago

JCKodel commented 4 years ago

Describe the bug Some of my users are experiencing a crash from class not found while using firebaseadmob plugin, when Flutter minifier and proguard are both disabled.

To Reproduce Impossible to say. It affected a Moto G6 Plus with Android 9, but can't say why.

Expected behavior To work. (At least know what can cause this issue)

Additional context Crash log from crashlytics:


Caused by java.lang.ClassNotFoundException: Didn't find class "bmjp" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/system/framework/com.android.media.remotedisplay.jar", zip file "/system/framework/com.android.location.provider.jar", zip file "/data/app/com.google.android.gms-LG7uCfuRs-4beTORbheqKg==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.android.gms-LG7uCfuRs-4beTORbheqKg==/lib/arm, /data/app/com.google.android.gms-LG7uCfuRs-4beTORbheqKg==/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
       at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
       at com.google.android.gms.ads.internal.config.o.a(:com.google.android.gms@200616026@20.06.16 (100306-296104215):2)
       at com.google.android.gms.ads.reward.RewardedVideoAdCreatorImpl.newRewardedVideoAd(:com.google.android.gms@200616026@20.06.16 (100306-296104215):2)
       at com.google.android.gms.ads.internal.reward.client.b.a(:com.google.android.gms@200616026@20.06.16 (100306-296104215):7)
       at cjs.onTransact(:com.google.android.gms@200616026@20.06.16 (100306-296104215):12)
       at android.os.Binder.transact(Binder.java:671)
       at com.google.android.gms.internal.ads.zzfn.transactAndReadException(com.google.android.gms:play-services-ads-base@@18.1.1:10)
       at com.google.android.gms.internal.ads.zzapp.zzb(com.google.android.gms:play-services-ads-lite@@18.1.1:7)
       at com.google.android.gms.internal.ads.zzaps.zza(com.google.android.gms:play-services-ads-lite@@18.1.1:6)
       at com.google.android.gms.internal.ads.zzum.zzob(com.google.android.gms:play-services-ads-lite@@18.1.1:7)
       at com.google.android.gms.internal.ads.zzul.zzoe(com.google.android.gms:play-services-ads-lite@@18.1.1:29)
       at com.google.android.gms.internal.ads.zzul.zzd(com.google.android.gms:play-services-ads-lite@@18.1.1:54)
       at com.google.android.gms.internal.ads.zzwv.getRewardedVideoAdInstance(com.google.android.gms:play-services-ads-lite@@18.1.1:58)
       at com.google.android.gms.ads.MobileAds.getRewardedVideoAdInstance(com.google.android.gms:play-services-ads-lite@@18.1.1:13)
       at io.flutter.plugins.firebaseadmob.RewardedVideoAdWrapper.<init>(RewardedVideoAdWrapper.java:80)
       at io.flutter.plugins.firebaseadmob.FirebaseAdMobPlugin.<init>(FirebaseAdMobPlugin.java:42)
       at io.flutter.plugins.firebaseadmob.FirebaseAdMobPlugin.registerWith(FirebaseAdMobPlugin.java:35)
       at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:38)```
iapicca commented 4 years ago

Hi @JCKodel due to the error coming from a production app I understand that could be hard at best to provide logs, but could you please provide your flutter doctor -v, your pubspec.yaml and if possible a reproducible minimal code sample for your implementation of admob Thank you

blasten commented 4 years ago

Would you be able to provide a sample app and sign the CLA on https://cla.developers.google.com/clas, so we can take a look?

JCKodel commented 4 years ago

Would you be able to provide a sample app and sign the CLA on https://cla.developers.google.com/clas, so we can take a look?

The app is in production (https://play.google.com/store/apps/details?id=br.art.code.meucronogramacapilar), but I can't tell how to trigger the issue (the error appears on my Firebase console, and that's all I know). If more details from Firebase Crashlytics helps, please ask.

russellwheatley commented 3 years ago

The firebase_admob plugin will be deprecated in April 2021 in favor of Google Mobile Ads SDK for Flutter. Google Mobile Ads SDK for Flutter is a new Flutter plugin that supports more Ads formats than firebase_admob does. Google Mobile Ads SDK for Flutter currently supports loading and displaying banner, interstitial (full-screen), native ads, and rewarded video ads across AdMob and AdManager. It also supports displaying banner and native ads as Widgets as opposed to being overlayed over all app content. We're now recommending projects currently using firebase_admob migrate to Google Mobile Ads SDK for Flutter following the instructions outlined here. Issues with migrating or with using the new package should now be raised over on the Google Mobile Ads SDK for Flutter repository.