#titan-stripejs-loadtime

1 messages ยท Page 1 of 1 (latest)

urban quailBOT
obsidian coral
#

Hi there

#

Hmmm so loading the Stripe.JS script itself is causing the issue here?

supple hawk
#

Hi @obsidian coral Possibly. The main js file sometimes has issues also.

obsidian coral
#

What do you mean exactly by "the main js file"?

supple hawk
#

I just add js.stripe.com/v3 to the head of my document. That main script may come down or not.

#

This is invariably the state I find the requests in when refreshing the checkout page.

obsidian coral
#

Gotcha and you have profiled the loading here for these requests?

#

And see them timing out? Are you loading the script async here?

supple hawk
#

Script is loaded async but not profiled. I've not really used that before if I'm honest, what would it tell me?

#

Sorry - re: timing out - yes. I do wait just to see if the error will give me any clues. Have refreshed again but I think I get a ERR_CONN_RESET. Will confirm in a sec if it fails!

urban quailBOT
supple hawk
#

Okay. So that request ended up being successful and all assets are downloaded and the card field is rendered correctly. So odd. Just have no idea why it is taking so long - that was approx 10 mins?

obsidian coral
#

When you look at the Network tab what is the time for the loading of the Stripe.JS assets?

supple hawk
#

Those assets that were pending - 14.1 mins!

obsidian coral
#

Hmmm ๐Ÿค”

supple hawk
#

It is curious!

#

Just for reference:

obsidian coral
supple hawk
#

Yeh.

#

Instant

obsidian coral
#

Hmm can you show me how you are loading the Stripe.JS script exactly?

supple hawk
potent pasture
#

๐Ÿ‘‹ hopping in here as well since bismarck has to head out soon - give me a minute to catch up

supple hawk
#

No worries @potent pasture Thanks for your help @obsidian coral

#

I have an idea actually!

#

This site is behind a reverse-proxy and I think my config may need updating. Am I right in that stripejs uses web sockets? (I'm a bit green around the gills when it comes to this!)

#

Ah no. Think I'm barking up the wrong tree.

cinder cargo
#

@supple hawk The first step would be to figure out if you see the same load times on other websites/domain

supple hawk
#

We had a look at a link that @obsidian coral provided and it loaded immediately

cinder cargo
#

ah gotcha, sorry we're drowning a bit with asks so I'm just jumping fresh into it

#

So it's really just on your domain? Does it happen on every load or just some loads?

supple hawk
#

Its hit and miss. It doesn't fail all the time but takes ages.

#

If there was an error, I'd be happier! I can work with that! ๐Ÿ™‚ It just takes a long time to download - 14.1 mins by last recording.

#

If it does fail, It's a connection refused or time out which I would expect with it taking so long but no indication of why the request takes so long.

cinder cargo
#

does this happen across browsers? Also do you have network throttling enabled in your Chrome Developer Tools options?

#

titan-stripejs-loadtime

supple hawk
#

No network throttling. Will try Firefox.

cinder cargo
#

Also can I ask where you're located and maybe you IP address? Feel free to DM me to not leak this publicly

supple hawk
#

Firefox seems to be the same issue. Am based in UK. Can message IP if still needed?

cinder cargo
#

yeah that'd help

#

Can you also check which CDN you are connecting to for those slow loads? It's appear as the Server in the response headers

#

Also do you use a firewall?

supple hawk
#

I have a "via" field in the response header for a CloudFront Url?

#

I do use a firewall - if diff ports need opening, then I can open them but just assumed 80 and 443 would be enough. I do have others open for development using Vite (This is a Laravel App)

cinder cargo
#

Gotcha and you can reproduce with the most basic HTML page that just loads Stripe.js and nothing else right?

#

Just to be clear: this is happening right now still also right? Fastly had some potential issues in London this morning based on https://www.fastlystatus.com/

supple hawk
#

I didn't know you used Fastly but yeh the issue is happening now.

cinder cargo
#

We use multiple CDNs

supple hawk
#

Just to respond to the simple page - that url we accessed before does seem to indicate that it is fine in some circumstances.

cinder cargo
#

@supple hawk sorry let's switch back here

#

discord makes it hard to do a DM + helping others here

supple hawk
#

Of course!!

#

Just refreshed and it was immediate! Will try again!

#

Do you want a HAR for the request/response?

cinder cargo
#

just the headers is enough for now I'd say

supple hawk
#

Main v3 script came down immediately. Am including here as a reference:

#

REQUEST

:Authority:
js.stripe.com
:Method:
GET
:Path:
/v3/
:Scheme:
https
Accept:
/
Accept-Encoding:
gzip, deflate, br
Accept-Language:
en-US,en;q=0.9
Cache-Control:
no-cache
Pragma:
no-cache
Referer:
http://myurl.test/
Sec-Ch-Ua:
"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"
Sec-Ch-Ua-Mobile:
?0
Sec-Ch-Ua-Platform:
"Linux"
Sec-Fetch-Dest:
script
Sec-Fetch-Mode:
no-cors
Sec-Fetch-Site:
cross-site
User-Agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

#

RESPONSE

Access-Control-Allow-Origin:
*

Age:
50
Alt-Svc:
h3=":443"; ma=86400
Cache-Control:
max-age=60
Content-Encoding:
br
Content-Type:
text/javascript; charset=utf-8
Date:
Wed, 30 Aug 2023 18:27:44 GMT
Etag:
W/"bb70a5d1541804b43f363446ff48cff8"
Last-Modified:
Wed, 30 Aug 2023 17:42:07 GMT
Server:
Cloudfront
Strict-Transport-Security:
max-age=31556926; includeSubDomains; preload
Timing-Allow-Origin:
*
Vary:
Accept-Encoding
Via:
1.1 a8b7634d43d34d3012abdadcd589091a.cloudfront.net (CloudFront)
X-Amz-Cf-Id:
HiJDB7S4aJ4SMUkehlcC1VOZxD_bB0Zk9T0uMZ4V0MLALO1Vp09ACA==
X-Amz-Cf-Pop:
MAN50-C3
X-Cache:
Hit from cloudfront
X-Content-Type-Options:
nosniff

#

Still waiting on some assets being pulled down

#

:Authority:
js.stripe.com
:Method:
GET
:Path:
/v3/m-outer-93afeeb17bc37e711759584dbfc50d47.html
:Scheme:
https
Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.7
Accept-Encoding:
gzip, deflate, br
Accept-Language:
en-US,en;q=0.9
Cache-Control:
no-cache
Pragma:
no-cache
Referer:
http://myurl.test/
Sec-Ch-Ua:
"Not.A/Brand";v="8", "Chromium";v="114", "Google Chrome";v="114"
Sec-Ch-Ua-Mobile:
?0
Sec-Ch-Ua-Platform:
"Linux"
Sec-Fetch-Dest:
iframe
Sec-Fetch-Mode:
navigate
Sec-Fetch-Site:
cross-site
Upgrade-Insecure-Requests:
1
User-Agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

#

Just come back now with response of:
Accept-Ranges:
bytes

Access-Control-Allow-Origin:
*
Age:
25050966
Alt-Svc:
h3=":443";ma=86400,h3-29=":443";ma=86400,h3-27=":443";ma=86400
Cache-Control:
max-age=31536000
Content-Encoding:
br
Content-Length:
122
Content-Security-Policy:
base-uri 'none'; connect-src 'self' https://r.stripe.com; default-src 'self'; font-src 'none'; form-action 'none'; frame-src https://m.stripe.network; img-src https://q.stripe.com; media-src 'none'; object-src 'none'; script-src 'self'; style-src 'self'; report-uri https://q.stripe.com/csp-report
Content-Security-Policy-Report-Only:
base-uri 'none'; connect-src 'self' https://r.stripe.com; default-src 'self'; font-src 'none'; form-action 'none'; frame-src https://m.stripe.network; img-src https://q.stripe.com; media-src 'none'; object-src 'none'; script-src 'self'; style-src 'self'; report-uri https://q.stripe.com/csp-report
Content-Type:
text/html; charset=utf-8
Date:
Wed, 30 Aug 2023 18:42:06 GMT
Etag:
"93afeeb17bc37e711759584dbfc50d47"
Last-Modified:
Sun, 13 Nov 2022 20:03:40 GMT
Server:
Fastly
Strict-Transport-Security:
max-age=31556926; includeSubDomains; preload
Timing-Allow-Origin:
*
Vary:
Accept-Encoding
Via:
1.1 varnish
X-Cache:
HIT
X-Cache-Hits:
46568
X-Content-Type-Options:
nosniff
X-Request-Id:
4dca0c0d-1b78-4d5a-a545-117a4f00ad9b
X-Served-By:
cache-man4140-MAN

#

Apologies for the formatting. Taken straight from Chrome!

urban quailBOT
cinder cargo
#

all good

#

a screenshot of the timing panel from request inspector/devtools for a slow request too would be helpful i think

#

can you get ^

supple hawk
#

It won't allow me to scroll out that far on the timeline! ๐Ÿ™‚

cinder cargo
#

when you click on that slow one, then there would be a Timing tab, that's what we need a picture of

supple hawk
cinder cargo
#

so it does look like some network issue either on your end or something in your code that is maybe taking all the CPU or whatever

supple hawk
#

Just looking at that

cinder cargo
#

Have you been able to build the most basic HTML page that loads Stripe.js but nothing else?

supple hawk
#

Yeh - I can see that it aint your end. I really appreciate your help on this. I think its the way I've set the network. I'm using a reverse-proxy against some docker containers. I can turn that off and spin up the server so it is not using that and see what happens.

#

If I get a solution, I'll let you know! Thank you again and apologies if I've wasted your time. You've helped me learn something though!