chargebee / chargebee-flutter

MIT License
5 stars 8 forks source link

`showManageSubscriptionsSettings` throws NullPointerException #96

Open ciriousjoker opened 4 months ago

ciriousjoker commented 4 months ago

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)
OrunayanTD commented 1 week ago

Yes our team is also facing this issue. The Issue is basically for android users.

Start Trail Button is not working at all! Issue Details: Error Code: 502 Platform Affected: Android Issue Description: When users attempt to start a free trial on Android, the process fails, and the application displays a 502 error message (found through debugging). As per your documentation, 5xx error codes indicate a server-side issue with Chargebee. iOS Platform Status: The same functionality is working properly on iOS, where the payment process is managed through the Apple App Store Server, indicating that the issue is isolated to Android.