tapsellorg / TapsellPlusSDK-FlutterPlugin

Other
6 stars 2 forks source link

Error when using show banner Ad function on Android #4

Closed DanialV closed 3 years ago

DanialV commented 4 years ago

When I used showBannerAdfunction in order to get a standard banner ad an exception happened. here is the error log:

E/MethodChannel#tapsell_plus(21797): Failed to handle method call
E/MethodChannel#tapsell_plus(21797): kotlin.KotlinNullPointerException
E/MethodChannel#tapsell_plus(21797):    at ir.tapsell.tapsell_plus.TapsellPlusPlugin.onMethodCall(TapsellPlusPlugin.kt:136)
E/MethodChannel#tapsell_plus(21797):    at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:226)
E/MethodChannel#tapsell_plus(21797):    at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#tapsell_plus(21797):    at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:631)
E/MethodChannel#tapsell_plus(21797):    at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#tapsell_plus(21797):    at android.os.MessageQueue.next(MessageQueue.java:336)
E/MethodChannel#tapsell_plus(21797):    at android.os.Looper.loop(Looper.java:174)
E/MethodChannel#tapsell_plus(21797):    at android.app.ActivityThread.main(ActivityThread.java:7682)
E/MethodChannel#tapsell_plus(21797):    at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#tapsell_plus(21797):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
E/MethodChannel#tapsell_plus(21797):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
E/flutter (21797): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, null, null)
E/flutter (21797): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
E/flutter (21797): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:156:18)
E/flutter (21797): <asynchronous suspension>
E/flutter (21797): #2      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:329:12)
E/flutter (21797): #3      TapsellPlus.showBannerAd (package:tapsell_plus/tapsell_plus.dart:118:10)
E/flutter (21797): #4      TapsellService.standardBannerAd (package:instadown/src/services/tapsell.service.dart:40:29)
E/flutter (21797): #5      PostPageState.getAllPosts (package:instadown/src/ui/posts.dart:149:26)
E/flutter (21797): <asynchronous suspension>
E/flutter (21797): #6      PostPageState.initState (package:instadown/src/ui/posts.dart:75:5)
E/flutter (21797): #7      StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4640:58)
E/flutter (21797): #8      ComponentElement.mount (package:flutter/src/widgets/framework.dart:4476:5)
E/flutter (21797): #9      Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
E/flutter (21797): #10     Element.updateChild (package:flutter/src/widgets/framework.dart:3214:18)
E/flutter (21797): #11     SingleChildRenderObjectElement.mount (package:flutter/src/widgets/framework.dart:5830:14)
E/flutter (21797): #12     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
E/flutter (21797): #13     Element.updateChild (package:flutter/src/widgets/framework.dart:3214:18)
E/flutter (21797): #14     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4527:16)
E/flutter (21797): #15     Element.rebuild (package:flutter/src/widgets/framework.dart:4218:5)
E/flutter (21797): #16     ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4481:5)
E/flutter (21797): #17     ComponentElement.mount (package:flutter/src/widgets/framework.dart:4476:5)
E/flutter (21797): #18     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3446:14)
E/flutter (21797): #19     Element.updateChild (package:flutter/src/widgets/framework.dart:3214:18)
E/flutter (21797): #20     RenderObjectElement.updateChildren (package:flutter/src/widgets/framework.dart:5580:32)
E/flutter (21797): #21     MultiChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5957:17)
E/flutter (21797): #22     Element.updateChild (package:flutter/src/widgets/framework.dart:3201:15)
E/flutter (21797): #23     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4527:16)
E/flutter (21797): #24     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4675:11)
E/flutter (21797): #25     Element.rebuild (package:flutter/src/widgets/framework.dart:4218:5)
E/flutter (21797): #26     StatefulElement.update (package:flutter/src/widgets/framework.dart:4707:5)
E/flutter (21797): #27     Element.updateChild (package:flutter/src/widgets/framework.dart:3201:15)
E/flutter (21797): #28     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4527:16)
E/flutter (21797): #29     Element.rebuild (package:flutter/src/widgets/framework.dart:4218:5)
E/flutter (21797): #30     StatelessElement.update (package:flutter/src/widgets/framework.dart:4583:5)
E/flutter (21797): #31     Element.updateChild (package:flutter/src/widgets/framework.dart:3201:15)
E/flutter (21797): #32     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5837:14)
E/flutter (21797): #33     Element.updateChild (package:flutter/src/widgets/framework.dart:3201:15)
E/flutter (21797): #34     SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:5837:14)
E/flutter (21797): #35     Element.updateChild (package:flutter/src/widgets/framework.dart:3201:15)
E/flutter (21797): #36     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4527:16)
E/flutter (21797): #37     Element.rebuild (package:flutter/src/widgets/framework.dart:4218:5)
E/flutter (21797): #38     StatelessElement.update (package:flutter/src/widgets/framework.dart:4583:5)
E/flutter (21797): #39     Element.updateChild (package:flutter/src/widgets/framework.dart:3201:15)
E/flutter (21797): #40     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4527:16)
E/flutter (21797): #41     Element.rebuild (package:flutter/src/widgets/framework.dart:4218:5)
E/flutter (21797): #42     ProxyElement.update (package:flutter/src/widgets/framework.dart:4862:5)
E/flutter (21797): #43     Element.updateChild (package:flutter/src/widgets/framework.dart:3201:15)
E/flutter (21797): #44     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4527:16)
E/flutter (21797): #45     StatefulElement
mahdi-malv commented 3 years ago

Following issue should not happen in favor of remaking the plugin. Use v2.1.3 to get the latest stable changes.

Feel free to re-open the issue if current version repeats this problem