stripe / stripe-js

Loading wrapper for Stripe.js
https://stripe.com/docs/js
MIT License
633 stars 156 forks source link

[BUG]: Stripe.js Attempting to JSON.parse '[object Object]' #609

Closed ElizabethSchafle closed 5 months ago

ElizabethSchafle commented 5 months ago

What happened?

Similar to https://github.com/stripe/stripe-js/issues/534 we are seeing a number of sentry issues with the error Stripe.js Attempting to JSON.parse '[object Object]'

While this bug is difficult to track down, we were able to figure out that it only reliably occurs when users have certain browser plugins installed. One in particular is this plugin https://chromewebstore.google.com/detail/modheader-modify-http-hea/idgpnmonknjnojddfkpgkljpfnnfcklj?hl=en-US&utm_source=ext_sidebar&pli=1. Once the user disabled the plugin, or used incognito, the errors went away. If they had it however, we ended up in a loop of these errors.

Environment

No response

Reproduction

No response

awalker-stripe commented 5 months ago

Hello @ElizabethSchafle! Thank you for all the info. We just pushed out a fix earlier this week!

From what we could tell, certain browser plugins like the one you mentioned send extra post messages that our scripts were trying (unsuccessfully) to parse. With the way things are set up, we do not believe this caused any problems outside of the analytics noise (i.e. folks could still check out).

With any luck, you should no longer get these errors. However in the event there's still any problems, please feel free to reopen the issue!