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

Required user permissions are potentially incorrect? #8

Open
chkpwd opened this issue Jan 12, 2025 · 2 comments
Open

Required user permissions are potentially incorrect? #8

chkpwd opened this issue Jan 12, 2025 · 2 comments

Comments

@chkpwd
Copy link

chkpwd commented Jan 12, 2025

Quickstart states:

(...)
1. Uncheck the Use a pre-defined role, and set Live only for Protect, and None for OS Settings.

To avoid permission errors in the container logs, I had to promote the custom user to Full Managament instead of Live Only. Without it, the web socket streams are created but in both the browser's console logs and container logs, it complains.

Unfortunately, I do not have the logs from either of these events, it was a few weeks back (really sorry).

Unifi User Settings:

image

Versions:

UniFi OS 4.0.20
Protect 5.1.57

Could you touch up on what's the correct settings that are needed?

@chkpwd
Copy link
Author

chkpwd commented Jan 12, 2025

Seems View Only allows the stream(s) to load.

@chkpwd
Copy link
Author

chkpwd commented Jan 12, 2025

Spoke to soon:

primavista@camera-viewer:~/docker-confs/viewport$ docker logs -f camera-viewer-viewport-1
[2025-01-12 19:42:02.375] (12:MainThread) INFO    main                               Hello!
[2025-01-12 19:42:04.974] (15:MainThread) INFO    SimpleUnifiReflector               Simple Unifi Reflector is ready, WS: 0.0.0.0:8002
[2025-01-12 19:42:09.208] (12:MainThread) INFO    SimpleWebServer                    Simple Web Server is ready, HTTP: 0.0.0.0:8001
[2025-01-12 19:42:09.208] (12:MainThread) INFO    main                               Ready at http://localhost:8001
[2025-01-12 19:42:57.607] (12:PS_0      ) ERROR   ExceptionHandler                   Failed to parse JSON, offending line: KH-CloudKeyNVR [UCK-G2-PLUS]: The user 'protect' requires the Administrator role in order to automatically configure camera RTSP streams.

[2025-01-12 19:42:57.609] (12:PS_0      ) ERROR   ExceptionHandler                   Traceback (most recent call last):
  File "/opt/viewport/bin/../src/viewport/src/backend/protocols/unifi.py", line 60, in _reflector_log
    parsed_line = json.loads(line)
                  ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

[2025-01-12 19:42:57.609] (12:PS_0      ) ERROR   Controller._mirror_stream          Failed to parse JSON, offending line: KH-CloudKeyNVR [UCK-G2-PLUS]: The user 'protect' requires the Administrator role in order to automatically configure camera RTSP streams.

[2025-01-12 19:42:57.609] (12:PS_0      ) WARNING Controller                         Stream 'stdout' reached EOF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant