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
No Home Assistant URL found in config or detected; forcing user form #1727
Comments
Well, this is quite funny... You are right, the Settings -> Network URL was not set correctly. So I would say it is a bit unexpected/misleading that the configuration flow does not proceed even if the correct URL was provided in the GUI (but not in Settings -> Network), isn't it? At a minimum, I would say this requirement should be explicitly stated in the documentation, as it seems the GUI field for Home Assistant URL is not effective by itself. Does this make sense? Or did I miss something? |
I'm saying there's no code I can change to pull the data from the GUI differently. HA doesn't think you entered anything into the form so fell back to the auto discover settings which were also missing. There's literally nothing I can do to solve this problem because I don't have any form processing code. It's all HA's. Perhaps there's a bug for Italian language in how HA handles forms. I really don't know as you're the only person who has reported this condition. Regardless, I'm glad you managed to log in. |
I see; thanks for clarifying. Maybe adding this weird corner case to the FAQs could help other users, in the future. Thanks for helping! |
I had this exact issue, and had defined "homeassistant:" in the config. As a result, I did not have external_url: and internal_url: defined, which resulted in the Settings -> Network being blank. I was also entering the correct url in the form, yet it just looped, and I received identical debug logs above. Seems it's taking the URL from Home assistant field, not the GUI form... odd I received the "cannot connect to URL, but if certain you can ignore this message" - worked a treat and all working again. Very odd, but I appreciate the comments, I've been at this for hours! |
What HA language? Maybe it's related to a language setting. |
HA language is user specific I think? Under administrator user, I have "English (GB)" selected. |
I did a test, I modified the try statement at line 248 in config_flow.py from this...
to this, and it worked / took the user input.. I hope that helps.
|
That change shouldn't do anything. The second parameter for get is the default value if |
I agree, I had a read of the .get function, it should not default unless the key is not found... I will add some debug outputs before and after.. standby. |
Thanks. The only thing I can think of is perhaps user_input is being modified by something else? In which case it should be saved in the config and we could access it from there. |
The exception I believe is being thrown when it evaluates the default value, even though it's not needed, it seems it is evaluated, creates an exception and thus never uses the user input, as the catch exception code then runs. Test code, and resulting logs, it never ran the remaining log entry (I never received "String_656 Log End"), as the exception was already thrown at get_url.
|
Damn. I know what is happening. You're right. The get_url is being evaluated first and throwing the exception before user input. This would only happen if Network Settings is wrong. Ok. I know how to fix it (or if you feel confident, I'd also appreciate a PR). Thanks for doing the testing with your system to show the reason. |
No problem. Thanks for the custom component! I've never coded python, (other languages yes) I don't think I can pull off a PR. |
No biggie. You helped enough. I'll post the fix and tag you so you can see the changes made. It'll be obvious once you see it. |
Describe the bug
Cannot setup the integration (via the Integrations GUI)
To Reproduce
Expected behavior
Integration should be setup
Screenshots
System details
const.py
or HA startup): 4.1.2pip show alexapy
or HA startup): 1.26.3Logs
Please provide logs.
Additional context
Even if debug is enabled in GUI, no additional log (alexa_media.(email).get.html nor alexa_media.(email).post.html) is output inside the configuration directory
The URL entered in the configuration window is a duckdns .org URL, with https enabled.
The text was updated successfully, but these errors were encountered: