-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trailing slash on hass url breaks connectivity #999
Comments
where do you have the trailing slash? if you mean ha_url in the plugin configuration then its only logical. any invalid url will make that AD cant connect to HA. |
Yeah in the ha_url. Agreed that it's incorrect, but appdaemon should throw a warning/error in my opinion if the url is malformed. It's easy to pick up a trailing slash if you copy + paste the url in from a browser. The only part in the docs that you would pick up on this is if you look at the example for providing a secret. No other ha_url example or trailing slash is mentioned on https://appdaemon.readthedocs.io/en/latest/CONFIGURE.html |
AD expects a valid url. or any other url you can think of. |
A url containing a trailing slash, is a valid url. That appdaemon blindly adds on a "/api/websocket" path without checking first that the url doesn't already contain a trailing slash, means it creates a malformed url from the valid one provided by the user. |
your right the docs for ha_url could be better. |
2.5 years and no fix? Imo this is not a documentation issue, this is a bug. Easy to fix, I can do it and strip trailing slashes if you like.. |
no one is holding you back from making a PR. |
I would re-open this issue and file this under both "bug" and "enhancement", since as suggested AppDaemon should validate the config passed in by the user and warn it accordingly, guarding against this corner cases.
With this attitude I don't think you can go very far in the open source community. We are talking about a project developed and maintained (for free) by volunteers using their spare time. If as you suggest it is an easy fix, why don't you show a bit of respect to all the developers and contribute your fix in a pull request? |
I'm a volunteer in the open source community who is working full time and I didn't get around to fix something for free in three months that noone cared about in years and you start to insult me? Thank your for your remarks. |
Which is why I closed this … |
(For context, I stumbled upon this thread by pure chance, notified by the project owner going through the backlog of issues, and I was quickly glancing at the whole thread).
It seemed to me as if you were bothered by the fact that no one fixed this bug in a long time, as if the developers owed you. This to me sounded like lacking respect for the effort put behind the various volunteers on this project. |
Fixed in 4.3.0 |
If you have a trailing slash on the end of the url, you'll just get this repeatedly:
Hass doesn't like the double slash and returns a 404:
The text was updated successfully, but these errors were encountered: