-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
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
Amcrest error in logs when password contains special characters #87967
Comments
Hey there @flacjacket, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) amcrest documentation |
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. |
This is still an issue but requires the python-amcrest library to be fixed. tchellomello/python-amcrest#224 |
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. |
I believe this is still an issue as the python-amcrest project still hasn't been updated. |
This is still an issue in the new 1.9.8 version of python-amcrest. |
I'll add that this issue seems to cause more than just error log messages, there is reduced functionality (can't view the full resolution video stream) for amcrest cameras as well. |
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. |
The fix still hasn't been merged in the amcrest library so this is still an issue for homeassistant. |
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. |
This is still an issue. |
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. |
The problem
If the password for an Amcrest camera contains special characters it results in an error in the logs because it can not parse the RTSP URL generated. The error looks something like:
2023-02-09 18:17:42.469 ERROR (stream_worker) [root] Uncaught thread exception
Traceback (most recent call last):
File "/srv/homeassistant/lib64/python3.10/site-packages/homeassistant/components/stream/worker.py", line 504, in stream_worker
container = av.open(source, options=pyav_options, timeout=SOURCE_TIMEOUT)
File "av/container/core.pyx", line 401, in av.container.core.open
File "av/container/core.pyx", line 272, in av.container.core.Container.cinit
File "av/container/core.pyx", line 292, in av.container.core.Container.err_check
File "av/error.pyx", line 336, in av.error.err_check
av.error.ValueError: [Errno 22] Invalid argument: 'rtsp://:@*******:554/cam/realmonitor?channel=1&subtype=0'; last error log: [tcp] Port missing in uri
It appears the error is also failing to redact the username/password despite being formatted to do so (I redacted the URL manually when posting).
It appears the solution is to URL encode the username and password. I have a pull request with the python-amcrest project for this change. tchellomello/python-amcrest#224
What version of Home Assistant Core has the issue?
2023.2.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
Integration causing the issue
Amcrest
Link to integration documentation on our website
https://www.home-assistant.io/integrations/amcrest/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: