#eagle-stripejs-conflict

1 messages · Page 1 of 1 (latest)

inner shoalBOT
junior ice
#

Hi 👋

Could you explain more thoroughly what you are referring to?

crude comet
#

Hello, sorry for the abrupt description. We're dealing with an ongoing issue seemingly caused by a newly surfaced conflict on websites with Google Translate and Stripe.

#

I'm gathering the details. Will share in a sec.

crude comet
#

really odd, so looks like the latest version of google translate has an inline/embedded version of a gzip library

we happen to load StripeJSv3 using requirejs as an amd

so Google Translate's new embedded gzip module ends up trying to define itself with requirejs as an anonymous module at the same time as we're loading StripeJSv3 and defining it as a requirejs shim

junior ice
#

Unfortunately I cannot offer any help about this. If this is an issue with incompatability between Google Translate and Stripe.js I recommend writing in to Support. We will need to investigate async and that will allow you to get updated once we have some answers

https://support.stripe.com/contact

crude comet
#

understood, at first it seemed that Google introduced a new global variable called Stripe, so i figured it would be an actively discussed issue since the problem surfaced just last night

junior ice
#

That's an understandable worry, I just won't be able to troubleshoot in real time here.

inner shoalBOT
heavy garnet
#

@crude comet do you have a live page with a basic example I can look at? I can always flagged internally to see if we can do something about it (though unlikely)

#

eagle-stripejs-conflict

crude comet
#
#

the issue is difficult to replicate since the loading timing of StripeJS and Google Translate has to coincide, i've been able to replicate with a 100ms latency network throttle in Chrome, but surprising we've received quite a few reports from customers

heavy garnet
#

Sure but if you can provide a really basic page that loads those 2 libs specifically and renders something that would help narrow it down

#

also providing the exact error in the console + callstack

crude comet
#

will do

#

would there be any plans to add amd based initialization to StripeJS, it would solve such issues directly, since we wouldn't have to use a shim definition of a globally defined library

heavy garnet
#

I don't think we have plans for this anytime soon

crude comet
#

sharing a jsfiddle example in a min

heavy garnet
#

do you have a clear error message in the meantime

#

also is there no way to do a simple repro on your own domain with the most basic things? Jsfiddle is noisy for things like this as it loads a lot of over things

crude comet
#

it's just a single self contained html file, you can grab it from there

#

there's no specific error since the entire Stripe object isn't what you'd expect, it's Google's gzip module instead

#

so calling new Stripe("a") throws a Stripe is not a constructor error

#

if you just refresh the page, you'll see sometimes it works, sometimes it doesn't, depending on the timing

#

if it wasn't for the pci requirement to load the stripe js from you guys, we'd fix it directly

heavy garnet
#

ah yeah I can repro

crude comet
#

for now we'll just remove define.amd from requirejs to avoid 3rd party libraries trying to use it

#

@heavy garnet @junior ice thank you for looking into it

heavy garnet
#

Of course, thanks for the report and the clear repro. I'm dubious we can do anything here but I flagged to the product team that owns Stripe.js to look into mitigations