pi-hole / web

Pi-hole Dashboard for stats and more
https://pi-hole.net
Other
2.06k stars 559 forks source link

Dashboard doesnt show stats - browser console has exceptions #523

Closed gnfpt closed 7 years ago

gnfpt commented 7 years ago

In raising this issue, I confirm the following (please check boxes, eg [X] - no spaces) Failure to fill the template will close your issue:

How familiar are you with the codebase?: Not familiar _1


[FEATURE REQUEST | QUESTION | OTHER]:

Please submit your feature request here, so it is votable by the community. It's also easier for us to track.

[BUG | ISSUE] Expected Behaviour: Show the graphs in the dashboard.

[BUG | ISSUE] Actual Behaviour: objectToArray http://192.168.2.241/admin/scripts/pi-hole/js/index.js:17:16 updateForwardedOverTime/< http://192.168.2.241/admin/scripts/pi-hole/js/index.js:158:26 j http://192.168.2.241/admin/scripts/vendor/jquery.min.js:2:26920 fireWith http://192.168.2.241/admin/scripts/vendor/jquery.min.js:2:27738 x http://192.168.2.241/admin/scripts/vendor/jquery.min.js:4:11251 b/< http://192.168.2.241/admin/scripts/vendor/jquery.min.js:4:14765

[BUG | ISSUE] Steps to reproduce: Running: Pi-hole Version v3.0.1 Web Interface Version v3.0.1 FTL Version v2.8 Open the PiHole dashboad and the browser developer tools. Check the console output.

(Optional) Debug token generated by pihole -d:

<token>

This template was created based on the work of udemy-dl.

AzureMarker commented 7 years ago

Run pihole -d for a debug token. Perhaps taking a screenshot of the error would be better?

gnfpt commented 7 years ago

Re: [pi-hole/AdminLTE] Dashboard doesnt show stats - browser console has exceptions (#523)

Run pihole -d for a debug token. Perhaps taking a screenshot of the error would be better? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

I've fixed this for a day deleting the log files on my RPI. The next day the issue was back - no stats - and the errors on the console.

1 2 3

jacobsalmela commented 7 years ago

@gnfpt it appears all of your screenshots show zero queries. Do you have clients set up to use Pi-hole as their DNS server? Without any queries, there is nothing to graph.

gnfpt commented 7 years ago

If aí recall correctly I had bind installed alongside with dnsmasq. So it was a matter of which one started 1st. Nevertheless, the console exhibit some js errors that should be polished.

Sent from my iPhone

On 7 Jul 2017, at 15:19, Jacob Salmela notifications@github.com wrote:

@gnfpt it appears all of your screenshots show zero queries. Do you have clients set up to use Pi-hole as their DNS server? Without any queries, there is nothing to graph.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

jacobsalmela commented 7 years ago

Well if bind was installed, that would cause issues with DNS resolution.

@Mcat12 will you check out the JS errors?

AzureMarker commented 7 years ago

There should always be at least an empty array returned for those API calls, unless you are not authenticated: https://github.com/pi-hole/AdminLTE/blob/master/api_FTL.php#L245 https://github.com/pi-hole/AdminLTE/blob/master/api_FTL.php#L284

jacobsalmela commented 7 years ago

So are the errors something we need to look into?

AzureMarker commented 7 years ago

I'll have to look into it more next week, but it seems that it is an edge case.

jacobsalmela commented 7 years ago

OK thanks.

AzureMarker commented 7 years ago

I'm unable to replicate this or find a reason it should do this. If it happens again, take a screenshot of the requests that trigger the errors (under the "Network" tab).

gnfpt commented 7 years ago

Can you try with an empty dns log file? 

--  ~/gnf

From: Mcat12 notifications@github.com Reply: pi-hole/AdminLTE reply@reply.github.com Date: 19 July 2017 at 20:23:55 To: pi-hole/AdminLTE adminlte@noreply.github.com Cc: gnfpt goncalo.farias@gmail.com, Mention mention@noreply.github.com Subject:  Re: [pi-hole/AdminLTE] Dashboard doesnt show stats - browser console has exceptions (#523)

I'm unable to replicate this or find a reason it should do this. If it happens again, take a screenshot of the requests that trigger the errors (under the "Network" tab).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

AzureMarker commented 7 years ago

I haven't been able to reproduce these errors with an empty log.

gnfpt commented 7 years ago

Re: [pi-hole/AdminLTE] Dashboard doesnt show stats - browser console has exceptions (#523)

There should always be at least an empty array returned for those API calls, unless you are not authenticated: https://github.com/pi-hole/AdminLTE/blob/master/api_FTL.php#L245 https://github.com/pi-hole/AdminLTE/blob/master/api_FTL.php#L284 — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

PS: I wasn't authenticated.

-- Best regards, Goncalo Farias

Typos? Blame my cat. mid:pi-hole/AdminLTE/issues/523/313780389@github.com

gnfpt commented 7 years ago

Re: [pi-hole/AdminLTE] Dashboard doesnt show stats - browser console has exceptions (#523)

I haven't been able to reproduce these errors with an empty log. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

I don't know if it matters but I believe I wasn't authenticated when it happened.

-- Best regards, Goncalo Farias

"Is it winter yet?" - Zippy mid:pi-hole/AdminLTE/issues/523/318239856@github.com

AzureMarker commented 7 years ago

There should always be at least an empty array returned for those API calls, unless you are not authenticated: https://github.com/pi-hole/AdminLTE/blob/master/api_FTL.php#L245 https://github.com/pi-hole/AdminLTE/blob/master/api_FTL.php#L284

If you aren't authenticated, then the API won't try to return any data. However, the summary API calls refresh your session, so you shouldn't have this problem anyways.