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

[<firebase_admob>] <App Crashes After Rewarded Video Ends> #3253

Closed cemalarik closed 3 years ago

cemalarik commented 4 years ago

Hello,

I am developing an app using Flutter for Android and iOS. On Android side everything is OK, I already published it on Google Play. But nearly for a week, I am struggling on iOS side:

I use firebase_admob library for rewarding the user. After the video is loaded, "Watch now" button is enabled and when the user taps on it, video starts playing. As the video ends, application crashes and nothing is logged on the console. RewardedVideoAdEvent.rewarded event is not triggered and app is crashed just before that.

Normally, after video ends, I'd expect rewarded event to be triggered.

This bug happens both on real and simulator devices. Android works fine.

Firebase Admob Version: ^0.9.3+4

flutter run --verbose:

[+2109 ms] flutter: ad loaded //User taps on "watch now" button //Video playes //Video ends and app crashes [+18374 ms] Service protocol connection closed. [ +2 ms] Lost connection to device. [ +8 ms] DevFS: Deleting filesystem on the device (file:///Users/user178045/Library/Developer/CoreSimulator/Devices/592AF7C1-C104- 49B4-BA22-D8328E4BC7C/data/Containers/Data/Application/92DF73A1-A8EE-4DA6-8768- 8DF2999F667E/tmp/projectIt4yrw/project/) [ +257 ms] Ignored error while cleaning up DevFS: TimeoutException after 0:00:00.250000: Future not completed [ +2 ms] "flutter run" took 80,215ms. [ +76 ms] ensureAnalyticsSent: 71ms [ +2 ms] Running shutdown hooks [ ] Shutdown hook priority 4 [ +3 ms] Shutdown hooks complete [ ] exiting with code 0

Thanks for your help in advance.

Zeynal7 commented 3 years ago

Hey @cemalarik, did you manage to solve this problem?

It is also happening in my app. I can currently use test ads only. And waiting for google approval code to use real ads. I thought it might be because of the test ads. Are you using real or test ads on iOS? and Are you testing it on production version (downloaded from App Store or TestFlight)?

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.