fix uncatched error with missing polkit. Closes: #5955

I'm not sure about this... `127.0.0.1` is pretty much a well known string, should we do some `LOCAL_IP` variable?