stripe-android: IllegalStateException: PaymentConfiguration was not initialized
We have integrated an Stripe and it is running successfully. But in Crashlytics we are showing one crash related to stripe that we are not able to solve. The entire log of an error is as below
The line at which this crash pointing is CustomerSession.initCustomerSession to generate an EphemeralKey. And we have initialized the PaymentConfiguration before generating EphemeralKey. See this issues is not replicated to all users but to the few users.
Solution or cause for a crash would be appreciated
at com.stripe.android.PaymentConfiguration.getInstance(PaymentConfiguration.java:56)
at com.stripe.android.CustomerSession.initCustomerSession(CustomerSession.java:145)
at com.stripe.android.CustomerSession.initCustomerSession(CustomerSession.java:155)
at com.stripe.android.CustomerSession.initCustomerSession(CustomerSession.java:172)
at com.*******.BillingInfoActivity.generateEphemeralKey(BillingInfoActivity.java:1731)
at com.*******.BillingInfoActivity.checkForCustomerId(BillingInfoActivity.java:1676)
at com.*******.BillingInfoActivity.onCreate(BillingInfoActivity.java:382)
at android.app.Activity.performCreate(Activity.java:7458)
at android.app.Activity.performCreate(Activity.java:7448)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1286)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3409)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3614)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:86)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2199)
at android.os.Handler.dispatchMessage(Handler.java:112)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)````
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15
I’m stuck with this error in expo react native.
I add PaymentConfiguration.init() before confirm pay intent。it’s resolved.