stripe/stripe-apps

fetchStripeSignature doesn't work well in a highly concurrent scenario

tobiasr opened this issue · 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.

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.