#KevH
1 messages · Page 1 of 1 (latest)
Hi! Let me help you with this.
Could you please share screenshots where you see this.
We see it in our Sentry client monitoring which is capturing all the console logs.
Any other context? Maybe you could share how are you loading Stripe?
it is being loaded as follows when the page is loaded: const [stripePromise, setStripePromise] = useState(() => loadStripe(config.stripe.key));
It is a react site
I have seen some issues on the sdk github, such as this one: https://github.com/stripe/stripe-js/issues/26 which suggest implementing retry logic
and this one: https://github.com/stripe/react-stripe-js/issues/159
I don't believe it to be an issue with the site itself, or even stripe. But a connection issue on their device. This does cause the user to not be able to checkout though. So would need to implement a solution.
Do you ever use setStripePromise?
no, the state is never updated after the initial load
Can you just use const stripePromise = loadStripe(config.stripe.key)?
Outside of React components.
wouldn't this still cause the load issue?
I don't know what's causing it, but this code looks unusual. Why return a promise inside a function?
I believe I found an example of it being done in that way.
I can see on the stripe github here: https://github.com/stripe/react-stripe-js#:~:text=> )%3B-,const%20stripePromise%20%3D%20loadStripe(%27pk_test_6pRNASCoBOKtIshFeQd4XMUh%27)%3B,-const%20options%20%3D It is done as you mentioned earlier, just set outside of the component
Could you try this and see what happens? I'm not sure this will help, but I lack information to make any other suggestions.
I may have gotten it from here: https://stackoverflow.com/a/64694798
I'll try it an see what happens. Fingers crossed!
Please let me know.