#titan-stripejs-loadtime
1 messages ยท Page 1 of 1 (latest)
Hi @obsidian coral Possibly. The main js file sometimes has issues also.
What do you mean exactly by "the main js file"?
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.
Gotcha and you have profiled the loading here for these requests?
And see them timing out? Are you loading the script async here?
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!
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?
When you look at the Network tab what is the time for the loading of the Stripe.JS assets?
Those assets that were pending - 14.1 mins!
Hmmm ๐ค
If you go to https://stripe.com/docs/payments/card-element I assume it loads quickly for you?
Hmm can you show me how you are loading the Stripe.JS script exactly?
Just in the head of a html doc:
<script src="https://js.stripe.com/v3/"></script>
Sorry - Discord escaped stuff - url is https://js.stripe.com/v3/
๐ hopping in here as well since bismarck has to head out soon - give me a minute to catch up
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.
@supple hawk The first step would be to figure out if you see the same load times on other websites/domain
We had a look at a link that @obsidian coral provided and it loaded immediately
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?
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.
does this happen across browsers? Also do you have network throttling enabled in your Chrome Developer Tools options?
titan-stripejs-loadtime
No network throttling. Will try Firefox.
Also can I ask where you're located and maybe you IP address? Feel free to DM me to not leak this publicly
Firefox seems to be the same issue. Am based in UK. Can message IP if still needed?
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?
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)
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/
I didn't know you used Fastly but yeh the issue is happening now.
We use multiple CDNs
Can you run https://www.fastly-debug.com/ and give me the output? Feel free to DM since it's sensitive info about your IP/network
Just to respond to the simple page - that url we accessed before does seem to indicate that it is fine in some circumstances.
@supple hawk sorry let's switch back here
discord makes it hard to do a DM + helping others here
Of course!!
Just refreshed and it was immediate! Will try again!
Do you want a HAR for the request/response?
just the headers is enough for now I'd say
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
As an example. I'm waiting for https://js.stripe.com/v3/m-outer-93afeeb17bc37e711759584dbfc50d47.html. Request is:
: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!
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 ^
when you click on that slow one, then there would be a Timing tab, that's what we need a picture of
Sorry - that's for https://js.stripe.com/v3/m-outer-93afeeb17bc37e711759584dbfc50d47.html
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
Just looking at that
Have you been able to build the most basic HTML page that loads Stripe.js but nothing else?
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!