librespeed / speedtest

Self-hosted Speed Test for HTML5 and more. Easy setup, examples, configurable, mobile friendly. Supports PHP, Node, Multiple servers, and more
https://librespeed.org
GNU Lesser General Public License v3.0
11.93k stars 2.16k forks source link

Troubleshooting general #75

Closed adolfintel closed 5 years ago

adolfintel commented 6 years ago

If you need troubleshooting, send me an email at info@fdossena.com, or use this thread. Please don't make new issues if you just need help.

ahmadsarang commented 5 years ago

Hi Adolfintel Is there any chance that I can customise or choose which server that I want to do the speedtest. Thanks

adolfintel commented 5 years ago

@ahmadsarang Yes, if you have multiple test servers, use the mpot branch. There's an example with manual selection of the server under Frontend.

ahmadsarang commented 5 years ago

Hi Adolfintel,

I am testing this on localhost server. Is there any problem if I test on localhost because the process is not running when I click the ""START" button. Is there any other configuration that maybe I miss. Thanks

adolfintel commented 5 years ago

@ahmadsarang do you see errors in the console?

ahmadsarang commented 5 years ago

Hi Adolfintel, Thanks for your concern but my issue has been resolved. Thanks

brbr1982 commented 5 years ago

Hi adolftintel,

first of, nice project!

I got a problem when i test speed @ loacl network the upload is fine , but the download only get 1.X Mbps. Even i connect between laptop and server directly. Is there any other configuration that maybe I miss. Thanks

adolfintel commented 5 years ago

Make sure PHP is working and OpenSSL is installed

On October 8, 2018 8:56:11 AM GMT+02:00, brbr1982 notifications@github.com wrote:

Hi adolftintel,

first of, nice project!

I got a problem when i test speed @ loacl network the upload is fine , but the download only get 1.X Mbps. Even i connect between laptop and server directly. Is there any other configuration that maybe I miss. Thanks

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/adolfintel/speedtest/issues/75#issuecomment-427736332

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

brbr1982 commented 5 years ago

Yes,installed already.

adolfintel commented 5 years ago

Press F12, go to network and run the test, do you see a lot of 500 errors during the download test?

On October 8, 2018 11:59:46 AM GMT+02:00, brbr1982 notifications@github.com wrote:

Yes,installed already.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/adolfintel/speedtest/issues/75#issuecomment-427779394

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

mrAlexZT commented 5 years ago

Press F12, go to network and run the test, do you see a lot of 500 errors during the download test? On October 8, 2018 11:59:46 AM GMT+02:00, brbr1982 @.***> wrote: Yes,installed already. -- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: #75 (comment) -- Sent from my Android device with K-9 Mail. Please excuse my brevity.

There is a problem with var data=JSON.parse(e.data); in polling status from the worker.

VM864:1 Uncaught SyntaxError: Unexpected token ; in JSON at position 1
    at JSON.parse (<anonymous>)
    at Worker.w.onmessage (<anonymous>:18:18)
w.onmessage @ VM541:18
brbr1982 commented 5 years ago

Failed to load resource: http://192.168.2.168/counter.php?r=0.11896742615626232 the server responded with a status of 404 (Not Found) speedtest_worker.min.js:223 Uncaught TypeError: Cannot set property '4' of null

Show this 2 error

adolfintel commented 5 years ago

Did you copy the index.html from my demo site?

On October 11, 2018 7:47:17 AM GMT+02:00, brbr1982 notifications@github.com wrote:

Failed to load resource: http://192.168.2.168/counter.php?r=0.11896742615626232 the server responded with a status of 404 (Not Found) speedtest_worker.min.js:223 Uncaught TypeError: Cannot set property '4' of null

Show this 2 error

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/adolfintel/speedtest/issues/75#issuecomment-428828524

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

brbr1982 commented 5 years ago

i use this https://github.com/adolfintel/speedtest/blob/master/example-gauges.html Show below error speedtest_worker.min.js:223 Uncaught TypeError: Cannot set property '3' of null

speedtest_worker.min.js:223 Uncaught TypeError: Cannot set property '1' of null

empty.php?r=0.29606573281734017:1 POST http://192.168.2.168/empty.php?r=0.29606573281734017 net::ERR_CONNECTION_RESET

empty.php?r=0.9970933287012593:1 POST http://192.168.2.168/empty.php?r=0.9970933287012593 net::ERR_CONNECTION_RESET

brbr1982 commented 5 years ago

http://119.237.74.70/88.bmp Only download have problem, upload is fine.

adolfintel commented 5 years ago

@soklangsum REMOVED. I saw your other email, your server is not allowing connections to ipinfo.io

soklangsum commented 5 years ago

I have test connection from my server to address https://ipinfo.io as well with curl https://ipinfo.io command get data information of my ISP.

adolfintel commented 5 years ago

See if PHP can do it, it may be blocked.

On October 16, 2018 4:18:05 AM GMT+02:00, soklangsum notifications@github.com wrote:

I have test connection from my server to address https://ipinfo.io as well with curl https://ipinfo.io command get data information of my ISP.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/adolfintel/speedtest/issues/75#issuecomment-430077168

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

soklangsum commented 5 years ago

Now it working thanks you @adolfintel

zangetsu05 commented 5 years ago

Hi @adolfintel, i've a problem to implement the chart test page adding the telemetry, I tried to modify the page following the instructions in the wiki https://github.com/adolfintel/speedtest/wiki/Changing-the-test-settings but adding +JSON.stringify(params) on the start the test don't work.

adolfintel commented 5 years ago

@zangetsu05 show me your code please

jasoncash commented 5 years ago

I am running using nodejs 8.10 and nginx. Upload (900+Mbps), ping (1.48ms) and jitter (1.52ms) seem to be working fine but download will not go over 1 Mbps. The problem happens on all the example html files. I also tried IE, Firefox and Chrome. I get 404 errors only on the download.

Log output: [15/Nov/2018:21:39:16 +0000] "GET /garbage?r=0.6601703133703273&ckSize=20 HTTP/1.1" 404 152 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"

frizurd commented 5 years ago

Why can not upload when speed is detected in mobile browser?

Were you able to fix this? I am facing the same issue..

Tested on IPhone X, chrome and safari Ping and download are working fine, but upload never initiates

adolfintel commented 5 years ago

You're the first one to report this problem, but I don't have an iPhone to test it.

Can you provide some details? I don't know if the iPhone has some way to attach a developer console like Chrome on Android, if it does, screenshots of network activity would be useful.

adolfintel commented 5 years ago

@frizurd can you give me an update on this? I'm really interested to know if I have a bug with iphones or not

glennols commented 5 years ago

Hi man, quick question. So i installed it on IIS, cgi and PHP. The test works, but it takes like 10mins, clearly its holding on the check ip part of the script. But the result comes in about 10min, then it also shows this error msg : I did test that i can manually fetch the ip from the external site

IP Address: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

500 - Internal server error.

500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.

adolfintel commented 5 years ago

@glennols can you look in the PHP log and see what the error is?

glennols commented 5 years ago

[01-Dec-2018 12:28:21 Europe/Belgrade] PHP Warning: Unknown: POST Content-Length of 20971520 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

But i have increased POST both in php.ini and in IIS ? :/

http://xxxx/speedtest/getIP.php?isp=true&distance=km&r=0.8888563726362708

This is the URL that "hangs"

adolfintel commented 5 years ago

@glennols That's just a warning from the upload test.

Edit getIP.php and remove the line that says error_reporting(0), see if you get anything.

Also, make sure that your server is allowed to connect to ipinfo.io

glennols commented 5 years ago

Tried changing the error_reporting, nothing changed, the server can access ipinfo.io and also the API Its that URL i posted in earlier comment that expires somehow. Any way to disable it?

adolfintel commented 5 years ago

That's weird. You can disable the ISP detection if you want, you just have to start the test with getIp_ispInfo set to false. See here if you don't know how to change the test settings: https://github.com/adolfintel/speedtest/wiki/Changing-the-test-settings

frizurd commented 5 years ago

@frizurd can you give me an update on this? I'm really interested to know if I have a bug with iphones or not

@adolfintel So sorry man, I've been AFK for the last couple of days. I've been debugging the issue and I think it's a server configuration issue.

So uploading does not work on Safari and Chrome on my iPhone X. It works fine on Chrome on the desktop but the same thing happens on Safari on my laptop.

Errors in Safari desktop

[Error] Failed to load resource: the server responded with a status of 400 (Bad Request) (empty, line 0)
[Error] Origin x is not allowed by Access-Control-Allow-Origin.
[Error] Failed to load resource: Origin x is not allowed by Access-Control-Allow-Origin. (empty, line 0)

I made use of the mpot branch with no backend, I uploaded the replacement files to DigitalOcean spaces. I am not able to add a keep-alive header, I suspect this is the cause of this issue. If this is so, I would probably have to create a reverse proxy for the static content.

Do you think the Keep-Alive header is the cause of this? Thanks in advance.

adolfintel commented 5 years ago

@frizurd I'm 99% sure this is a server configuration issue. First of all, your server needs to send those CORS headers for garbage.dat, otherwise the client is not allowed to download it. You can copy them from the PHP files. Second, not having keep-alive will invalidate the ping test results, they'll be at least twice as high if not more.

frizurd commented 5 years ago

@adolfintel Alright thank you, I've added all the other required headers tho but DigitalOcean Spaces won't allow users to add the Keep-Alive header. Do you know if not having the Keep-Alive header can cause a similar timeout like the one I'm getting? Thank you for your time!

adolfintel commented 5 years ago

@frizurd Not having keep-alive shouldn't cause any timeouts. CORS headers are probably what's causing your issue, who knows how poorly safari implements them.

frizurd commented 5 years ago

@adolfintel I tested your mpot example (http://speedtest.fdossena.com/mpotdemo/) and I found out that you have the same issue. Tested with Safari Version 12.0 (14606.1.36.1.9) on MacOS 10.14 (18A391). The problem is also present on iPhones (tested with multiple devices).

Errors in Safari desktop

EDIT Also tested on Firefox Quantum 63.0.3 (64-bit) on Mac. Couldn't test upload speed on the first try but it was good on the tests after the initial one. Also a lot of CORS errors in the console tho. Errors in Firefox desktop

adolfintel commented 5 years ago

@frizurd I made a change to the CORS headers in empty.php, can you test it now?

adolfintel commented 5 years ago

Funny how these bugs are only on Mac and iOS

frizurd commented 5 years ago

@adolfintel on http://speedtest.fdossena.com/mpotdemo/ I suppose? Tested in a new private window but the error still persists. The browser keeps trying to load but fails in doing so in a neverending loop.

adolfintel commented 5 years ago

@frizurd Yes I'm talking about the mpot demo. Is the regular version affected too?

I've enabled a workaround for Safari. Can you try it again?

adolfintel commented 5 years ago

@frizurd news?

frizurd commented 5 years ago

@adolfintel my bad, just arrived home. Tested on phone and laptop, still the same on both

adolfintel commented 5 years ago

@frizurd well that sucks, it used to work on safari 2 months ago. There's nothing I can do if they broke CORS, it's never going to work without it.

frizurd commented 5 years ago

@adolfintel tried the regular version (http://speedtest.fdossena.com) on Safari, works fine

adolfintel commented 5 years ago

@frizurd Confirmed that they broke CORS then. It used to work about 2 months ago, so it must be a recent thing, I hope they fix it because there's nothing I can do about it.

I'll leave an issue open for reference. If you could check every once in a while, that would be great.

frizurd commented 5 years ago

@adolfintel yea for sure

adolfintel commented 5 years ago

@frizurd Thanks. Use issue #183 for updates

morrack2000 commented 5 years ago

The example pages don't render properly in IE 11. This can be fixed by adding:

<meta http-equiv="X-UA-Compatible" content="IE=11" />

in the head section.

adolfintel commented 5 years ago

@morrack2000 I don't have any rendering issue in IE11, can you be more specific or post a screenshot? Thanks

rovingrambler commented 5 years ago

Great project!

Were a municipal ISP offering synchronized speeds.

We are running an instance here speedtest.gcet.net

The upload is always about 15% lower then it should be. I've been experimenting with different block sizes etc without much luck. Any suggestions?

image

adolfintel commented 5 years ago

@rovingrambler I checked your installation and it seems fine, I get the correct result. Can you confirm that the upload is actually lower than what's measured from network activity?