arevindh / pihole-speedtest

Pihole Speedtest Mod
https://arevindh.github.io/pihole-speedtest/
MIT License
215 stars 22 forks source link

Graphs not showing properly #49

Closed bravenut closed 4 years ago

bravenut commented 4 years ago

Hi,

I just installed the speedtest you've implemented for pihole. It's working, saving and showing speedtests properly, but if I visit pi.hole/admin at the first place the "Total queries", "Client activity", "Query Types" and "Queries answered by" graphs aren't showing up to the point I hover over them with the mouse. The following picture was taken right after refreshing the pi.hole/admin page:

speedtestpihole

Somehow on the time axis, only one hour is shown at the first place. After hovering over the corresponding graph, it's correctly shown as usually (for the last 24 hours).

arevindh commented 4 years ago

Can you check console for any errors ?

bravenut commented 4 years ago

Could you tell me which logs I am looking for exactly? In the syslog and pihole.log files I can't find any errors.

bravenut commented 4 years ago

I also noticed, that the speedtests aren't run automatically each hour. Instead, I execute them via cron for now.

Myth0ne commented 4 years ago

Yeah I also had this problem with the graphs not showing. I uninstalled the mod and reverted back to default pihole settings.

arevindh commented 4 years ago

@josh3003 can you check any errors on browser developer console

Myth0ne commented 4 years ago

@arevindh you'll have to give me 5 mins to reinstall it again. Hold on

arevindh commented 4 years ago

@josh3003 Please clear cache too after installing

Myth0ne commented 4 years ago

@arevindh done the install, ran in icognito mode. Set speedtest schedule and Display range Tick Flush speedtest history (for the first time only) Set speedtest mode to Official CLI.

GO to run the final command: sudo "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest-official.sh"

get the following result

root@raspberrypi:/opt/pihole# sudo "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest-official.sh"
Testing with
usage: speedtest [-h] [--no-download] [--no-upload] [--bytes] [--share]
                 [--simple] [--csv] [--csv-delimiter CSV_DELIMITER]
                 [--csv-header] [--json] [--list] [--server SERVER]
                 [--exclude EXCLUDE] [--mini MINI] [--source SOURCE]
                 [--timeout TIMEOUT] [--secure] [--no-pre-allocate]
                 [--version]
speedtest: error: unrecognized arguments: --accept-gdpr --accept-license -f json-pretty
2020-08-06 14:05:34     2020-08-06 14:05:35                             0
Error: near ",": syntax error
arevindh commented 4 years ago

@josh3003 : have you installed this ? https://www.speedtest.net/apps/cli May be you are still using python speedtest

Myth0ne commented 4 years ago

@arevindh followed the install instructions and still same result.

Myth0ne commented 4 years ago

@arevindh tried the one click upgrade sudo "/var/www/html/admin/scripts/pi-hole/speedtest/speedtest-official.sh"

Still no luck there either.

arevindh commented 4 years ago

@josh3003 : sudo apt-get remove speedtest-cli OR sudo pip uninstall speedtest-cli

Your device is still using python version

Myth0ne commented 4 years ago

@arevindh That fixed it. Thanks.

Myth0ne commented 4 years ago

@arevindh The graphs also look fine as well. Sounds like my old install was a bit borked. Will monitor and update if there's any issue.

arevindh commented 4 years ago

@slimyPhlegma Can you also try the above method ?

Myth0ne commented 4 years ago

@arevindh Hey, bad news. So when you go to the login page I think it displays an empty default speedtest graph? Then when you mouse over the graph it switches back to the query graph. Same happens when you sign in. Same issue as before. Not related to the old python speedtest as I thought. Check here

arevindh commented 4 years ago

Can you check browser console for errors

Myth0ne commented 4 years ago

@arevindh what am I looking for? I got no idea what to look out for in the dev console.

arevindh commented 4 years ago

@josh3003 : https://javascript.info/devtools

Myth0ne commented 4 years ago

@arevindh https://pastebin.com/8LHAAdBh

arevindh commented 4 years ago

Can you check the network tab too ? Open the tab and reload the page .. Check for any urls with red color. image

arevindh commented 4 years ago

If you are have discord, we can troubleshot live https://discord.gg/anKMZq