-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read properties of undefined (reading 'transferSize') #17
Comments
@bruceharrison1984 thanks for reaching out. The issue that you're experiencing is essentially because the The issue of There is more info on this issue in that repo. This essentially means that currently this module is not compatible with Node.js environments. It requires a browser environment, where the API spec is fully implemented and conforming to the spec. Thus, integrating it in a CLI poses quite difficult challenges until the time that node fully supports it. |
@vasturiano Thanks for the response. I presumed it was something along those lines but it's nice to hear some verification as well. I'm going to mark this as closed. |
same issues on react native app, so is there a plan to add a react native plugin for this ? maybe, we should replace the browser web api with https://github.com/oblador/react-native-performance |
nodejs/undici#2481 was just merged, which gets us one step closer to getting a working CLI version. Still need to wait for undici to get updated in Node though, but replacing the isomorphic-fetch-polyfill with undici (main) in this library seems to give us node compatibility now. |
I was trying to incorporate this into a small CLI project(not within a browser), but every request appears to fail, but they are actually succeeding in the background, the error message just isn't very good.
I chased it down to this line:
speedtest/src/engines/BandwidthEngine/BandwidthEngine.js
Line 294 in 25be964
For my testing, I simply tried to log the matching entries via:
Closer inspection revealed that the
name
property ofPerformanceResourceTiming
being set to a URL object instead of a string. I'm unfamiliar with the Performance API, but the spec seems to state that the name property would be a string rather than an object, but it's not immediately clear to me if that is correct.https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/name
The following is just a dump of the
PerformanceResourceTiming
itself, if I dont usegetEntriesByName
. You can see the entries exist, but they are not being matched via URL for some reason.The text was updated successfully, but these errors were encountered: