stripe-apps icon indicating copy to clipboard operation
stripe-apps copied to clipboard

fetchStripeSignature doesn't work well in a highly concurrent scenario

Open tobiasr opened this issue 2 years ago • 1 comments

Describe the bug We have an app that does quite a few requests on load. Each requests needs to call fetchStripeSignature to get the signature to send to the server. Some of the calls are made very concurrently.

It seems like (at least in development) that when the calls to fetchStripeSignature are to quick, we just get stuck on await and it never returns.

To solve this we've had to add a "sleep" based on the number of pending requests so to not call fetchStripeSignature to quickly.

Expected behavior That it is possible to call await fetchStripeSignature on each request without having to either cache the signature or implement "sleep"-patterns.

tobiasr avatar Sep 12 '23 20:09 tobiasr

Thanks for the report. We also became aware of this issue internally, and we're working on a fix. ETA is TBD, but it's definitely on our radar and not intended.

gabrielhurley-stripe avatar Sep 13 '23 18:09 gabrielhurley-stripe