googleads / googleads-mobile-flutter

A Flutter plugin for the Google Mobile Ads SDK
Apache License 2.0
340 stars 285 forks source link

Open Ads and Interstitial Ad show nothing sometime (even in release mode) #581

Closed HuyNguyen1590 closed 1 year ago

HuyNguyen1590 commented 2 years ago

These ad work fine almost time but sometime i still get black screen without X button on Interstitial Ads and Invisible Open Ads widget (only show "Test Ad" in debug) with no content. The way to close it is hit Android Back Button (Navigator) and it would close. Any help?

Plugin Version

google_mobile_ads 1.2.0

maheshj01 commented 2 years ago

Hi @HuyNguyen1590, Thanks for filing the issue. Can you please share a minimal and complete code sample along with the screenshot of the issue? Also please share the logs when the issue occurs.

HuyNguyen1590 commented 2 years ago
W/cr_AwContents(21702): Application attempted to call on a destroyed WebView
W/cr_AwContents(21702): java.lang.Throwable
W/cr_AwContents(21702):     at org.chromium.android_webview.AwContents.l(chromium-TrichromeWebViewGoogle.aab-stable-500507833:1727)
W/cr_AwContents(21702):     at com.android.webview.chromium.WebViewChromium.setBackgroundColor(chromium-TrichromeWebViewGoogle.aab-stable-500507833:2278)
W/cr_AwContents(21702):     at android.webkit.WebView.setBackgroundColor(WebView.java:2986)
W/cr_AwContents(21702):     at com.google.android.gms.ads.internal.webview.y.ah(:com.google.android.gms.policy_ads_fdr_dynamite@221310604@221310604057.439654529.439654529:0)
W/cr_AwContents(21702):     at com.google.android.gms.ads.internal.overlay.k.v(:com.google.android.gms.policy_ads_fdr_dynamite@221310604@221310604057.439654529.439654529:33)
W/cr_AwContents(21702):     at com.google.android.gms.ads.internal.overlay.k.d(:com.google.android.gms.policy_ads_fdr_dynamite@221310604@221310604057.439654529.439654529:23)
W/cr_AwContents(21702):     at com.google.android.gms.ads.internal.overlay.client.a.bO(:com.google.android.gms.policy_ads_fdr_dynamite@221310604@221310604057.439654529.439654529:23)
W/cr_AwContents(21702):     at adu.onTransact(:com.google.android.gms.policy_ads_fdr_dynamite@221310604@221310604057.439654529.439654529:4)
W/cr_AwContents(21702):     at android.os.Binder.transact(Binder.java:1043)
W/cr_AwContents(21702):     at com.google.android.gms.internal.ads.zzaoj.zzbt(com.google.android.gms:play-services-ads-base@@20.6.0:2)
W/cr_AwContents(21702):     at com.google.android.gms.internal.ads.zzcbq.zzk(com.google.android.gms:play-services-ads-lite@@20.6.0:3)
W/cr_AwContents(21702):     at com.google.android.gms.ads.AdActivity.onCreate(com.google.android.gms:play-services-ads-lite@@20.6.0:3)
W/cr_AwContents(21702):     at android.app.Activity.performCreate(Activity.java:8157)
W/cr_AwContents(21702):     at android.app.Activity.performCreate(Activity.java:8129)
W/cr_AwContents(21702):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310)
W/cr_AwContents(21702):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3512)
W/cr_AwContents(21702):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3699)
W/cr_AwContents(21702):     at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
W/cr_AwContents(21702):     at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
W/cr_AwContents(21702):     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
W/cr_AwContents(21702):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2135)
W/cr_AwContents(21702):     at android.os.Handler.dispatchMessage(Handler.java:106)
W/cr_AwContents(21702):     at android.os.Looper.loop(Looper.java:236)
W/cr_AwContents(21702):     at android.app.ActivityThread.main(ActivityThread.java:8037)
W/cr_AwContents(21702):     at java.lang.reflect.Method.invoke(Native Method)
W/cr_AwContents(21702):     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
W/cr_AwContents(21702):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
W/Ads     (21702): #004 The webview is destroyed. Ignoring action.`
this is the Log when the error come
maheshj01 commented 2 years ago

Thanks for the info @HuyNguyen1590, Can you please share a minimal and complete code sample to investigate further?

HuyNguyen1590 commented 2 years ago

https://developers.google.com/admob/flutter/app-open i copy and paste the code in this document and nothing special. I just explore that it almost error everytime i do share intent on my Android device ( Xiaomi Redmi note 8)

maheshj01 commented 2 years ago

@HuyNguyen1590 Can you please share a sample repo or reproducible steps for us to investigate ?

github-actions[bot] commented 2 years ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

michaeldiener commented 1 year ago

@HuyNguyen1590 Where you able to solve the problem? I experience the same issue with App Open Ads and am looking for a solution.

Thanks!

(Just FYI I posted about this issue in the Google Mobile Ads SDK Developers forum: https://groups.google.com/g/google-admob-ads-sdk/c/hi4uYxFtg-o/m/viK7SDkbAgAJ )

HuyNguyen1590 commented 1 year ago

@HuyNguyen1590 Where you able to solve the problem? I experience the same issue with App Open Ads and am looking for a solution.

Thanks!

(Just FYI I posted about this issue in the Google Mobile Ads SDK Developers forum: https://groups.google.com/g/google-admob-ads-sdk/c/hi4uYxFtg-o/m/viK7SDkbAgAJ )

I still not able to solve it. I think it happen when the ad automatic dispose.

michaeldiener commented 1 year ago

@HuyNguyen1590 Thanks! The worst thing about this is that the transparent com.google.android.gms.ads.AdActivity is displayed on top of my app and thus no touch events go through. Looks like the app froze for users. Only the back button/gesture works in that case. So I'm thinking about putting a text there that appears after a timeout, that users should use back in that case. It's the most ugly workaround, but I don't see an alternative.

HuyNguyen1590 commented 1 year ago

I though it only happen to me. Transparent ads is the worst. Don't know why people are not talking about it or fix it

michaeldiener commented 1 year ago

I think because it happens not often enough and I also had a hard time reproducing it. If there would be a reliable method to reproduce it, it would also be easier to make a sample project,

huycozy commented 1 year ago

@michaeldiener Are you seeing this issue on the production app and Android native app? Looking at the stack trace, it seems to be caused by native part that is not in the flutter ads plugin's scope.

michaeldiener commented 1 year ago

@huycozy For me it has nothing to do with flutter, to be honest, but pure Android ads (not using the term "native" here, because that has a different meaning in the context of AdMob). I just commented here because haven't been able to find anybody else having the issue and so I was curious if @HuyNguyen1590 had find a solution in the meantime. If I find the time in the coming weeks I hope to put together a minimal sample project that shows the same behavior. Main problem with this is that the bug only happens occasionally and is not easily reproducible.

github-actions[bot] commented 1 year ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

dhng22 commented 3 weeks ago

I also faced this problem, also tested with a Xiaomi device so I thought it might be the problem? Also I use Jetpack Compose so maybe it's similar to flutter somehow I guess? Still I can't find any solution