Skip to content
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

Zero download speed at times #182

Closed
Terrance opened this issue Mar 7, 2024 · 11 comments · Fixed by #195
Closed

Zero download speed at times #182

Terrance opened this issue Mar 7, 2024 · 11 comments · Fixed by #195

Comments

@Terrance
Copy link

Terrance commented Mar 7, 2024

On several occassions I've found the download speed to be reported as zero:

$ speedtest-go

    speedtest-go v1.6.10 @showwin

✓ ISP: ...
✓ Found 20 Public Servers

✓ Test Server: ...
✓ Latency: 8.735036ms Jitter: 851.809µs Min: 7.714099ms Max: 10.439103ms
✓ Download: 0.00Mbps (used: 0.00MB) (latency: 8ms jitter: 0ms min: 6ms max: 9ms)
✓ Upload: 95.58Mbps (used: 113.94MB) (latency: 8ms jitter: 0ms min: 7ms max: 11ms)

This happens both on Arch Linux (using the speedtest-go AUR package) and on Android in Termux (also 1.6.10), though it seems to be a temporary issue that comes and goes -- download speed is currently reported correctly (~450Mbps) on both devices.

Running with -d I can see the download URL being repeatedly logged, whether the speed is being reported correctly or not:

[DBG]2024/03/07 22:11:00 XdlURL: http://...:8080/speedtest/random1000x1000.jpg
@r3inbowari r3inbowari added the bug label Mar 8, 2024
@r3inbowari
Copy link
Collaborator

I think this is caused by the third-party server being temporarily unreachable. Does this always happen on a certain server?

@Terrance
Copy link
Author

It's possible, will keep an eye on it and make a note of the host next time it happens (tried a few times today but yet to repro).

@Terrance
Copy link
Author

✓ Test Server: [9060] ... Norwich (United Kingdom) by Voicehost Ltd
✓ Latency: 8.713507ms Jitter: 535.181µs Min: 7.695769ms Max: 9.533825ms
✓ Download: 0.00Mbps (used: 0.00MB) (latency: 8ms jitter: 0ms min: 6ms max: 9ms)
✓ Upload: 96.34Mbps (used: 114.84MB) (latency: 9ms jitter: 0ms min: 6ms max: 10ms)

Yes, looks like it's specific to this server -- repro'd on two devices hitting the same server, but both are happy when they choose other hosts.

@r3inbowari
Copy link
Collaborator

r3inbowari commented Mar 12, 2024

.\speedtest-go.exe -s 9060

    speedtest-go v2.0.0-beta1 @showwin

✓ ISP: *.*.*.* (x x) [*, *]
✓ Found 1 Specified Public Servers

✓ Test Server: [9060] *km Norwich by Voicehost Ltd
✓ Latency: 294.17822ms Jitter: 53.580903ms Min: 238.36955ms Max: 448.8789ms
✓ Download: 0.00Mbps (used: 0.00MB) (latency: 276ms jitter: 15ms min: 235ms max: 295ms)
✓ Upload: 11.64Mbps (used: 13.88MB) (latency: 326ms jitter: 157ms min: 235ms max: 739ms)

Yes, I can reproduce this on this server.

@r3inbowari
Copy link
Collaborator

r3inbowari commented Mar 12, 2024

What is certain is that the server 9060 is actively rejecting download requests from user-agent showwin/speedtest-go x.y.z

Related #159

All download requests containing the speedtest-go field in the first position in the user-agent are rejected.
I think this is a deliberate setting by the third-party server. Maybe it touches their interests.
This is a bad start and indicates someone is abusing this repo.

@r3inbowari r3inbowari removed the bug label Mar 12, 2024
@vaygr
Copy link

vaygr commented Apr 16, 2024

I can reproduce this issue with 53972 (Dish Wireless).

@r3inbowari
Copy link
Collaborator

I can reproduce this issue with 53972 (Dish Wireless).

I think we can add a flag --user-agent to the cli, so that users can modify the default user-agent to avoid being banned by the server.

@r3inbowari
Copy link
Collaborator

# with default ua
.\speedtest-go.exe -s 9060

    speedtest-go v1.6.11 @showwin

✓ ISP: *.*.*.* (*) [*, *]
✓ Found 1 Specified Public Server(s)

✓ Test Server: [9060] *.*km Norwich by Voicehost Ltd
✓ Latency: 380.061155ms Jitter: 11.047864ms Min: 368.896ms Max: 404.33695ms
⠦ Download: 0.00Mbps (latency: 374ms)
# with specified ua
.\speedtest-go.exe -s 9060 --ua="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36"

    speedtest-go v1.6.11 @showwin

✓ ISP: *.*.*.* (*) [*, *]
✓ Found 1 Specified Public Server(s)

✓ Test Server: [9060] *.*km Norwich by Voicehost Ltd
✓ Latency: 189.173855ms Jitter: 63.365714ms Min: 163.31595ms Max: 377.1291ms
⠼ Download: 23.11Mbps (latency: 164ms)

@vaygr
Copy link

vaygr commented Apr 24, 2024

@r3inbowari thanks! Would it make sense to display N/A or some kind of error string instead of a confusing zero speed number in cases like this?

@r3inbowari
Copy link
Collaborator

⠦ Download: N/A Mbps (latency: 374ms)
⠦ Download: N/A (latency: 374ms)

or?

@vaygr
Copy link

vaygr commented Apr 24, 2024

The second one looks great to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants