peterldowns / localias

custom local domain aliases for local dev servers
MIT License
605 stars 3 forks source link

localias daemon stop: error - request to /stop failed: performing request: Post "http://%!/(MISSING)stop": http: invalid Host header #10

Closed gedw99 closed 1 year ago

gedw99 commented 1 year ago

The daemon starts, but fails to be stopped....

env: darwin amd64 latest

localias daemon start

localias daemon stop 
error: request to /stop failed: performing request: Post "http://%!/(MISSING)stop": http: invalid Host header
gedw99 commented 1 year ago

Same bug with reload too...

localias daemon status
daemon running with pid 37527

localias daemon reload
error: failed to send config to daemon: performing request: Post "http://%!/(MISSING)load": http: invalid Host header
peterldowns commented 1 year ago

Interesting, thank you for the bug report and the details! I can reproduce this failure with the same error message by doing the following:

Since localias is pretty new, it's likely there are other users in exactly the same scenario. I'll push a bugfix soon. Thank you for reporting this I did not think to test this scenario before I switched the admin api communication method.

peterldowns commented 1 year ago

The bugfix is pretty annoying because it means attempting to communicate with the localias daemon in two different ways. I'm going to close this as wontfix. For any other developers who have run into this issue, you can fix the problem by killing your existing localias daemon process and then relaunching it using the latest version of Localias.

pkill localias
ps aux | grep -i localias # confirm that the process has been stopped
localias daemon start