Open trickstival opened 5 months ago
I am also running into this error. I cannot make rhyme nor reason for when this bug appears. I have reduced the config to a bare minimum in order more effectively test it:
const measurements = [
{ type: 'download', bytes: 1e5, count: 1, bypassMinDuration: true }, // initial download estimation
];
I am using Firefox 127.0.2 on MacOS Sonoma 14.5 but have also run into the same error on Chrome.
As can be seen in the following screenshot, the initial speedtest works (my app logs the results to console currently), but the second one fails with the same errors as @trickstival (the message being different is just because I'm using firefox - my log messages are the same as theirs on Chrome).
Edit: hmm it looks like we're running into the same issue as #17
Not exactly sure what's going on, but I'm getting exactly the same error from time to time
TypeError: Cannot read properties of undefined (reading 'transferSize')
Linux with Chrome 109.0.5414.120
I am using SpeedTest on a normal front-end web app. Every now and then it randomly gives me errors. Those errors do not happen all the time. I keep getting them if I try to re-run the tests during the same browser session. If I refresh the page, the errors are gone and only happen again after a while. I tried to create a new instance of SpeetTest to mitigate that behavior, but the errors keep popping up.
Those include:
I inspected the network tab, and all requests were responded with status 200, so I suppose it is not a problem with the network.
Then I tried to debug the issue, and it looks like
performance.getEntriesByName(url)
returns an empty array. I found a PR that attempted to fix a similar problem but for node.js: https://github.com/cloudflare/speedtest/pull/24 In that issue you mentioned it is a problem with the fetch implementation, but I am using native fetch, since I am on the browser and window.fetch returns native code, and not some polyfill.Here are the settings I am using:
This is a problem because the speed test does not work until the user refreshes the page. More info about the environment were the tests were run:
All tests were run using chrome with the device toolbar set to iPhone 12 Pro. I would guess that it doesn't affect the Performance API, but I figured it could be a good idea to mention