flutterhole
flutterhole copied to clipboard
fetchClientsOverTime failed with unexpected error
I have recently set privacy to maximum, so I'm not recording what clients are querying. Where the graph once was, is now replaced with the following warning :
{message: fetchClientsOverTime failed with unexpected error, error: type '_GrowableList<dynamic>' is not a subtype of type 'Map<dynamic, dynamic>' in type cast}
The clients and domains tabs at the bottom, also suffer from this.
Hello @davidhart82 👋 - Thanks for opening an issue!
Sounds like the requests that require authentication are failing. Could you try out the following URL in your browser (adjust as necessary and add your API token):
http://pi.hole/admin/api.php?getClientNames&auth=MY_TOKEN
A successful response yields some JSON data. If authentication fails, you should see something like [ ]
.
Everything else works; its because there is no data available due to enhanced privacy settings. I will run that when I am at home later tonight though for you!
This is what is returned:
{"clients":[]}
It looks like _valueToHitsOverTime
is casting an empty list to a map, which causes the error?
{"clients":[]}
That seems like a normal response... I will look into handling empty lists more gracefully, that seems to be the culprit.
I'm facing this same issue. This same issue occurs on client page and query page also if your pi is offline it occurs there too.