Location, location...
mateatslc opened this issue · 11 comments
@mateatslc Would you be able to log what server.distance
holds? https://github.com/sindresorhus/speed-test/blob/master/cli.js#L78
Seems like the speed-test
API we use might not return a numeric value in your case.
// @ddsol
server.distance
is null
here is the complete server
object stringified:
{
"bestPing": 165.76601300000002,
"cc": "NO",
"country": "Norway",
"dist": null,
"distMi": null,
"id": "3433",
"lat": "69.9403",
"lon": "23.3106",
"name": "Alta",
"sponsor": "Eltele AS",
"url": "http://speedo.eltele.no/speedtest/upload.php"
}
Same issue, testing from China.
@sindresorhus What should be shown if distance
is null
? Grayed out Unknown
?
I'm not understanding how dist could ever be null. Is this data coming from before that line? Maybe some more console.log
lines could help here, together with where these lines are.
@mateatslc I think this is related to the issue I was seeing when running this module. I was finding it always defaulting to the Norway server you mentioned as well. Digging deeper I found it to be an issue where the dependency module, speedtest.net, had a request being blocked by the speedtest.net service. See more details here: ddsol/speedtest.net#19
This should be fixed now. Reinstall speed-test, making sure it pulls in speedtest-net@1.2.5
and you should see the expected results.
@clarkio thanks! works indeed, with speedtest-net@1.2.5
@sindresorhus created #34
No need to bump the version. Because of semver, speedtest-net@1.2.5
will be installed automatically when reinstalling speed-test
.
Better safe than sorry ;)
Yes, no need to bump the version. I was referring to the install log when installing speed-test
to see that it shows speedtest-net@1.2.5
.