Closed nixstrom closed 1 day ago
I have a bit more information.
I was originally trying to test a slow endpoint, but found that the error happens on a fast endpoint as well. Today I tried turning off my VPN, and lo' and behold the fast endpoint now works (but the slow one doesn't).
Now, if I turn my VPN back on, I can replicate the error even on Google.com – although it takes more iterations before it does so. So perhaps it's a latency thing?
pnpx @clobbr/cli run --url "https://google.com" --iterations "50" --parallel
hi @nixstrom, I've done some fixes in the area and I hope this'll get it working for you. Unfortunately, I could not reproduce the issue no matter how hard I tried :D
So it's a bit of a shot in the dark. Let me know if you still have issues. I am not sure how pnpm cache works, but perhaps you want to run e.g.
pnpx @clobbr/cli@1.16.1 run --url "https://google.com" --iterations "50" --parallel
to make sure you get the latest version.
Let me know how it goes 🙈
Hi @danmindru
Thanks for looking into this. Unfortunately, it did not solve the problem for me. 😭
Do you accept contricutions? Perhaps I can look at this next week.
Darn. What is the error you get this time?
Sure, that would be awesome if you have time! I’d like to have another go at it too. Will keep you posted 🙌
Same error as before.
There are two situations where I get this error:
I got the craziest idea @nixstrom. Maybe your terminal does not support a certain color I'm using to output the very bad times :D
I took that out. Can you try with v1.16.2
? 😬
Yes! That was it. I'm on a different network now, but it seems that v1.6.2
works while v1.6.1
still fails.
For reference, I'm using Warp on macOS Ventura.
Awesome! That was a nice one haha 🙈 Thanks for reporting!
I'm trying to stress test an endpoint to see how many concurrent requests if can handle. I'm running the command:
When doing so, the script fails with the following message:
TypeError: Cannot read properties of undefined (reading '0')
.Full error with stacktrace:
One observation I have is that the first request is green, the following will turn yellow, amber and finally fail. It seems it's failing already after 2-4 requests.
What works?
If the requests are not parallel, everything seems fine and the results are parsed nicely.
What have I tried?
I've tried running the command with both
npx
andpnpx
, as well asGET
andPOST
. I've also tried switching to a different endpoint, to one I know will succeed (a stupid endpoint that only returnsOK 200
).I've also tried firing off multiple requests in Postman and other applications, but this is a bit tricky to time correctly.
Finally, I've tried firing off parallel requests with
cURL
with inspiration from Stack Overflow. In this case all requests succeeded – but it's just not as nice as clobbr!