Pi-CLI icon indicating copy to clipboard operation
Pi-CLI copied to clipboard

add some feedback for non-connection errors

Open devoid1 opened this issue 8 months ago • 2 comments

installed precompiled binary for linux. i have a browser window open to https://192.168.1.7/admin/ and can see full functioning (its been running for weeks). i can also go to plain http://192.168.1.7/admin/ and see dashboard.

dave@huge ~> ./picli-linux setup

Please enter the IP address of your Pi-Hole: 192.168.1.7 Please enter the port that exposes the web interface (default 80): Validating http://192.168.1.7:80/admin/api.php Pi-Hole doesn't seem to be alive, check your details and try again!

Please enter the IP address of your Pi-Hole: 192.168.1.7 Please enter the port that exposes the web interface (default 80): Validating http://192.168.1.7:80/admin/api.php Pi-Hole doesn't seem to be alive, check your details and try again!

Please enter the port that exposes the web interface (default 80): 443 Validating http://192.168.1.7:443/admin/api.php Address not reachable!

no idea why it cant connect. ufw inactive. no messages in Pi-Hole. if i curl 192.168.1.7 i get:

curl http://192.168.1.7/api.php
{"error":{"key":"not_found","message":"Not found","hint":"/api.php"},"took":0.00029635429382324219}⏎                                                                                          

curl http://192.168.1.7/admin/api.php
{"error":{"key":"bad_request","message":"Bad request","hint":"The API is hosted at pi.hole/api, not pi.hole/admin/api"},"took":0.00028491020202636719}⏎

so its acting like the URL is incorrect anyway. i changed the call and recompiled but it deadends in

color.Yellow("Validating " + address)
req, err := http.NewRequest("GET", address, nil)

i would like to be more helpful but im not sure what to check next. maybe ill try a debug statement with the actual http return code?

devoid1 avatar May 02 '25 17:05 devoid1

Hi, thanks for the bug report. I'm quite busy and am not actively maintaining this atm (nor have I actually been developing it for a while). I can't promise a prompt resolution I'm afraid :/

Reeceeboii avatar May 16 '25 00:05 Reeceeboii

Actually. I just had a thought. There was a big PiHole update recently and I believe they made some pretty breaking changes to their API. That's probably it tbh

Reeceeboii avatar May 16 '25 20:05 Reeceeboii