appodeal / Appodeal-Flutter-Plugin

Official Flutter Plugin that adds Appodeal SDK support to your Flutter application.
https://pub.dev/packages/stack_appodeal_flutter
Apache License 2.0
18 stars 3 forks source link

Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: PlatformException #35

Closed dimat closed 12 months ago

dimat commented 1 year ago

Unfortunately, I don't have steps to reproduce, as I get the logs from Firebase Crashlytics.

It happens for 30% of users and 54% of the crashes on Google (Pixel?) devices, 50% on Android 13. I've personally experienced crashes after finishing playing video ads, but I can't confirm if it is exactly this crash. Crashlytics shows that the crash also happens 100% when device state is in background, which might be the case for playing videos.

This is the crashlogs:

Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: PlatformException(error, Required value was null., null, java.lang.IllegalStateException: Required value was null.
    at com.appodeal.appodeal_flutter.f.a(AppodealBaseFlutterPlugin.kt:1)
    at com.appodeal.appodeal_flutter.g.g(AppodealFlutterPlugin.kt:3)
    at com.appodeal.appodeal_flutter.g.onMethodCall(AppodealFlutterPlugin.kt:50)
    at r.a.c.a.j$a.a(MethodChannel.java:2)
    at io.flutter.embedding.engine.e.e.k(DartMessenger.java:2)
    at io.flutter.embedding.engine.e.e.l(DartMessenger.java:3)
    at io.flutter.embedding.engine.e.e.m(Unknown Source:0)
    at io.flutter.embedding.engine.e.a.run(Unknown Source:12)
    at android.os.Handler.handleCallback(Handler.java:978)
    at android.os.Handler.dispatchMessage(Handler.java:104)
    at android.os.Looper.loopOnce(Looper.java:238)
    at android.os.Looper.loop(Looper.java:357)
    at android.app.ActivityThread.main(ActivityThread.java:8089)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)
)
       at StandardMethodCodec.decodeEnvelope(message_codecs.dart:653)
       at MethodChannel._invokeMethod(platform_channel.dart:315)

Versions that are used:

stack_appodeal_flutter: ^3.0.2

Flutter 3.7.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision 9944297138 (8 weeks ago) • 2023-02-08 15:46:04 -0800 Engine • revision 248290d6d5 Tools • Dart 2.19.2 • DevTools 2.20.1

da2gl commented 1 year ago

Hello @dimat. Thank you for your request. We have started to investigate your issue.

For faster resolution of the following issues, you can also write to us in support in the chat directly in your personal Appodeal account or contact by email support@appodeal.com

da2gl commented 12 months ago

Hi @dimat.

You described an unusual use case where certain methods are being called in the background, and we don't have direct access to the activity or context. To address this issue, we made some minor modifications to the last release 3.1.3-beta.2.

Thank you for your issue.