-
-
Notifications
You must be signed in to change notification settings - Fork 58
Native Ad not working - MissingPluginException #114
Comments
Any update I'm facing the same issue after upgrading to Flutter 2.8.0 |
I can't reproduce this |
I had this issue too, on Flutter 2.8.0 with dart 2.15.0 @bdlukaa try to change pages with banner ad on each page. Then you will see |
I also upgraded Flutter to 2.8.0 and started to encounter this problem (with native ads) on Android. Can't say for other platforms. |
|
I've published my app into release version with Flutter 2.8 and Dart 2.15.0 and got a lot of crashes on splash because of AppOpen Ad Click here to see the last 30 min crash event report That's because I didn't involve it into a try catch (and never think about it) |
same problem when I upgraded Flutter to 2.8.0 |
Same also with macos Flutter 2.8.0, android physical device |
Problem is continues. This is the flutter doctor result. Flutter 2.9.0-0.1.pre • channel beta • https://github.com/flutter/flutter.git Running flutter doctor... • No issues found! |
@bdlukaa were you able to simulate this error? It's for all ads, not only native. |
|
Any update on this. This plugin is so useful because the official is so buggy. |
same problem when I upgraded Flutter to 2.8.1 |
rewardvideo |
I recommend you all change to official package. I think this one is no longer maintained due to unapproved PRs and I saw that the package is no longer in the author's pins 😅 |
|
|
thank |
same problem when I upgraded Flutter to 2.8.1 |
@bdlukaa fix it please! This plugin is very good! |
+1 |
Hi, You can check out my commit for lib/src/native/native_ad_widget.dart. I changed the _load method to be a future and wait for it to finish in the initstate, looks more solid.
Before this issue occurred all the time with native ads on changing pages, especially after upgrading to the latest flutter version. Right now I don't have the time to change this in all the ad types and test it because Christmas and stuff, maybe after the holidays, if it makes sense. Please have a look if this solution works for you or if it can be improved. Thanks for the great package, performance is much better than the official google one. |
void init() async {
channel.setMethodCallHandler(_handleMessages);
await MobileAds.pluginChannel.invokeMethod('initRewardedAd', {'id': id});
} init method donot wait final ad = RewardedAd(
unitId: "xxxx",
loadTimeout: const Duration(seconds: 10),
timeout: const Duration(seconds: 10)
);
// wait initRewardedAd
await Future.delayed(Duration(milliseconds: 100));
// load ad
await ad.load(); |
It looks like this solution doesn't work, still got a lot of errors in production from several users. |
The root cause is that the initialization |
How to implement this? Do we need to change the plugin's source or need to change our app source? |
Ensure that MethodChannel is initialized before invoke the loadAd method.
You can try this commit. Fix bug |
@mondongx I've tried with your fork, but the error still persists. |
@davidgalarza Can you provide flutter doctor result and exception stack? |
@mondongxr Thanks for the reply. Flutter doctor output:
Error Stack
build.gradle:
The error occurs randomly about every 5 of 10 times that I navigate to a new page with a banner ad. |
@davidgalarza It's not the same issue, because the log you provided that banner ads are loaded, not native ads. The repair method of banner ads is different from that of native ads. |
Fix bug "MissingPluginException" on loading banner ad |
Any new answer? @bdlukaa please help. it s working fine with flutter 2.6.0-5.2.pre. i downgrade it. But its not working with newer versions. |
Reproduced for native ads in case usage in feed - with multiple ad items.
Any updates with solutions/workarounds? With latest flutter plugin not work with Native ads for Android. |
I got this error and stopped getting it when I put in main.dart: String get nativeAdUnitId {
String adNativeId = "ca-app-pub-3940256099942544/2247696110"; //Test AD
return adNativeId;
} I am aware that the question will sound arrogant, but are you sure that the native ID you use is correct? In previous versions, there was a check that the ID was correct and if not it used the test ID, but I think it doesn't do that now.
|
its working fine on iOS. I am getting error above on android
The text was updated successfully, but these errors were encountered: