Skip to content
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

Octoprint integration stopped working with basic auth #128264

Closed
2taras opened this issue Oct 12, 2024 · 5 comments
Closed

Octoprint integration stopped working with basic auth #128264

2taras opened this issue Oct 12, 2024 · 5 comments

Comments

@2taras
Copy link

2taras commented Oct 12, 2024

The problem

After installing update, octoprint showed 0 entries, after checking the logs found this message
Error while setting up octoprint platform for camera Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 361, in _async_setup_platform await asyncio.shield(awaitable) File "/usr/src/homeassistant/homeassistant/components/octoprint/camera.py", line 40, in async_setup_entry OctoprintCamera( File "/usr/src/homeassistant/homeassistant/components/octoprint/camera.py", line 66, in __init__ device_info=coordinator.device_info, ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/octoprint/coordinator.py", line 82, in device_info configuration_url = URL.build( ^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/yarl/_url.py", line 385, in build netloc = cls._make_netloc( ^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/yarl/_url.py", line 1057, in _make_netloc ret = cls._encode_host(host) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/yarl/_url.py", line 1038, in _encode_host _host_validate(host) File "/usr/local/lib/python3.12/site-packages/yarl/_url.py", line 1607, in _host_validate raise ValueError( ValueError: Host 'user:pass@example.com' cannot contain ':' (at position 6), if the value includes a username or password, use 'authority' instead of 'host'
basic auth is recommend way of exposing octoprint, maybe add basic auth to integration parameters, like other apps

What version of Home Assistant Core has the issue?

core-2024.10.2

What was the last working version of Home Assistant Core?

core-2024.8.0

What type of installation are you running?

Home Assistant OS

Integration causing the issue

octoprint

Link to integration documentation on our website

https://www.home-assistant.io/integrations/octoprint

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

Hey there @rfleming71, mind taking a look at this issue as it has been labeled with an integration (octoprint) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of octoprint can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign octoprint Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


octoprint documentation
octoprint source
(message by IssueLinks)

@rfleming71
Copy link
Contributor

Can you tell me which version of octoprint you are on? I don't believe anything has changed with the integration in many releases.

@2taras
Copy link
Author

2taras commented Oct 14, 2024

#126961
They changed how url parse inside core lib?
HA 2024.10.2
Octoprint 1.10.2

@2taras
Copy link
Author

2taras commented Oct 14, 2024

Found bug fix in yarn aio-libs/yarl#880 (comment), now it’s impossible to use basic auth in url, but it’s not recommended to just leave octoprint open. Maybe add auth to plugin?

@issue-triage-workflows
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@issue-triage-workflows issue-triage-workflows bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 19, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Feb 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants