Skip to content

showManageSubscriptionsSettings throws NullPointerException #96

@ciriousjoker

Description

@ciriousjoker

We found this via Crashlytics. Haven't tried reproducing it yet.

  1. Seems to only happen on Android
  2. We pass null as the productId, since it is marked as optional, ie this is our code:

Code:

Chargebee.showManageSubscriptionsSettings(
  null,
  Platform.isIOS ? "hardcoded string" : "other hardcoded string",
)

Here's the stacktrace:

Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: PlatformException(error, null cannot be cast to non-null type kotlin.String, null, java.lang.NullPointerException: null cannot be cast to non-null type kotlin.String
	at p7.b.s(SourceFile:1)
	at p7.b.onMethodCall(SourceFile:1)
	at gl.k$a.a(SourceFile:1)
	at xk.c.l(SourceFile:1)
	at xk.c.m(SourceFile:1)
	at xk.c.i(SourceFile:1)
	at xk.b.run(SourceFile:1)
	at android.os.Handler.handleCallback(Handler.java:900)
	at android.os.Handler.dispatchMessage(Handler.java:103)
	at android.os.Looper.loop(Looper.java:219)
	at android.app.ActivityThread.main(ActivityThread.java:8668)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1109)
)
       at StandardMethodCodec.decodeEnvelope(message_codecs.dart:648)
       at MethodChannel._invokeMethod(platform_channel.dart:334)
       at Chargebee.showManageSubscriptionsSettings(chargebee.dart:112)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions