#joshexplodingtopics-stripejs-loaderrror

1 messages · Page 1 of 1 (latest)

raven vergeBOT
loud monolith
#

hi! I'd ask them if there any logs in their browser console, or check any remote monitoring/reporting of errors that you might have like Sentry.

raven vergeBOT
thin prairie
#

Thanks karllekko. We're currently not reporting clientside 3rd party javascript errors.

I did add a try catch to the loadStripe call, in order to alert the user to contact our support on stripe.js load error. However this didn't show for the user when the missing card element was there.

So how would I catch a loadStripe error to send to Datadog/Sentry in this case?

deep mesa
#

Hey there, taking a look at what you've shared

thin prairie
#

Thank you

deep mesa
#

how would I catch a loadStripe error
Are you sure this is even the issue?

#

If you're in touch with some of these customers, having them share a screenshot with you including any console errors visible would likely be revealing.

#

Do you have any details about when this started, or if its happening on every load vs some for them? Do you know where these customers accessing your site are located?

thin prairie
#

Thanks synthrider, appreciate the help.

My best guess is it's a loadStripe issue since the rest of the page and inputs are functional, except for the Stripe Card element input which fails to load/display.

I will ask the next user for which this occurs to get their console errors. They're not tech savvy though and usually a cold lead, so it's not the easiest ask.

But this is a screenshot from one of them:
https://www.loom.com/i/c1feef27f8f1455fa06dc06e421d1d45

I don't have details of when it started – we've had 3 or 4 reports of it from different users (France, US, etc.) in the last couple of months. I suspect it's always been a potential issue for a tiny percentage of users, but since we're growing in scale and getting pretty big it's become a problem with some users reaching out about. We haven't changed our checkout code or setup for 2+ years. So I suspect some other potential customers have faced the issue but don't report it.

For one user, reloading the page resolved the issue. But for another, reloading the page and trying an incognito window didn't help. And it's not something I've been able to reproduce to debug.

I'm wondering if it's an occasional network issue that causes Stripe.js to fail to load. And the fail is cached as per this Github issue: https://github.com/stripe/stripe-js/issues/26#issuecomment-1477716731

Thanks,
Josh

deep mesa
#

So we are looking at improving that loadStripe behaviour to allow for retries in some fashion, but I think that's a secondary concern to whatever is happening here. Yes, its possible for a small portion of users to encounter transient network failures, and a refresh would resolve it. The retry system would ideally make it possible for you to detect & recover that edge case without a customer refresh.

#

Unfortunately I don't think we're going to be able to say much more beyond that without the ability to reproduce. ie, if this is a transient network issue, then it does happen with some non-zero probability.

#

For a user who sees this consistently, you'd need to gather more details about any errors they encounters, specific browser version and extensions, etc. Does it happen in other browsers, or on other devices even?

thin prairie
#

Okay, thanks synthrider.

So in that case, I think I'll go to a previous user who faced the issue, and ask to them to see if the issue is still present. And if so, ask them to screenshot there browser console.log.

What's the best way to handle a loadStripe error that you'd recommend? Since my try-catch implementation doesn't fire for users who see the issue (https://www.loom.com/i/716cbb7a9c0647768fa8c742944010bd). I think it'd be helpful so we can flag the issue when it happens versus relying on user reporting.

raven vergeBOT
deep mesa
#

I would expect what you've got to catch errors specifically there, which I why I suspect the actual error is somewhere else. I could be wrong, though. I assume you added some console/remote logging to that catch block?

#

Because as written I don't expect there to be any obvious sing the catch path was entered

thin prairie
#

Yeah in the catch block we trigger a window alert for the user to tell them to contact our support. But this didn't show for the latest user report, he just had the missing card input field.

But I agree, it's not 100% that the error is there, it could be something else.

I'm reaching out to the user to try to reproduce with browser console logs now. Besides that, is there anything else you'd recommend as next steps?

thin prairie
#

The most recent user that reported the issue a few days ago, just replied to say that they no longer see the issue and the card element input field looks good.

deep mesa
#

Nope, that would be where i'd start. Getting any errors from their console, which hopefully illuminate an issue. Also having them try another browser etc.

#

Ok great!

thin prairie
#

So it seems like a transitory issue for a very small % of users

#

They also tried safari at the time they experienced the issue, and safari worked fine

#

This making me feel like it's more likely a network issue sometimes with loadstripe

deep mesa
#

Yep,we're working on making this more flexible

#

Currently the only fix for a failed load is to refresh, which is not ideal

thin prairie
#

I tested via a manual throw(). But does loadStripe() throw to the catch block on error here too.

raven vergeBOT
deep mesa
#

The way to test that failing would be to use the browser dev tools to block the network request to load stripe.js