IllegalStateException: PaymentConfiguration was not initialized
See original GitHub issueWe 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)````
Issue Analytics
- State:
- Created 4 years ago
- Comments:13
Top Results From Across the Web
Android Stripe app crashes on adding new payment source
It's complaining that you've not initialized the PaymentConfiguration object with a publishable key. PaymentConfiguration.init(<<YOUR ...
Read more >com.stripe.android.PaymentConfiguration java code examples
public static void init(@NonNull String publishableKey) { mInstance = new ... getInstance(); fail("Should not be able to get a payment configuration before ...
Read more >How To Integrate Stripe Payment Gateway In Android App?
1. Register project on stripe console. From there you will get a publishable key & a secret key. For stripe Android SDK integration,...
Read more >PaymentConfiguration (stripe API) - javadoc.io
init. public static void init(java.lang.String publishableKey). A publishable key from the Dashboard's API keys page.
Read more >stripe - Bountysource
If the payment is not successful, we log some data to our analytics backend, ... When I try to initiate " PaymentConfiguration.init(context, "key", ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I add PaymentConfiguration.init() before confirm pay intent。it’s resolved.
where did you put excatly