fix uncatched error with missing polkit. Closes: #5955

Right, we should use somthing like `SERVER_PORT` or something.