adding a new domain with ssl throwing 500 error
LongBeachHXC opened this issue · 2 comments
Problem/Motivation
I have a successful deployment of NPM v1.0.1 running on my HA. I have two domains working great, both using Lets Encrypt SSL. I went to configure a third and am getting an 500 error from the server. I look at the logs of the container and see the following repeated:
2024-04-24 22:03:43.342 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 134, in async_refresh
updates = await self.api.update(force=force)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/api.py", line 662, in update
self._bootstrap = await self.get_bootstrap()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/api.py", line 998, in get_bootstrap
return Bootstrap.from_unifi_dict(**data, api=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/base.py", line 120, in from_unifi_dict
data = cls.unifi_dict_to_dict(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/bootstrap.py", line 224, in unifi_dict_to_dict
return super().unifi_dict_to_dict(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/base.py", line 369, in unifi_dict_to_dict
data[key] = cls._clean_protect_obj_dict(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/base.py", line 311, in _clean_protect_obj_dict
items[key] = cls._clean_protect_obj(value, klass, api)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/base.py", line 289, in _clean_protect_obj
return klass.unifi_dict_to_dict(data=data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/user.py", line 170, in unifi_dict_to_dict
return super().unifi_dict_to_dict(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/base.py", line 360, in unifi_dict_to_dict
data[key] = cls._clean_protect_obj_list(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/base.py", line 300, in _clean_protect_obj_list
items[index] = cls._clean_protect_obj(item, klass, api)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/base.py", line 289, in _clean_protect_obj
return klass.unifi_dict_to_dict(data=data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/user.py", line 34, in unifi_dict_to_dict
data["nodes"] = [PermissionNode(n) for n in parts[1].split(",")]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/user.py", line 34, in <listcomp>
data["nodes"] = [PermissionNode(n) for n in parts[1].split(",")]
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/enum.py", line 712, in __call__
return cls.__new__(cls, value)
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/enum.py", line 1135, in __new__
raise ve_exc
ValueError: 'readlive' is not a valid PermissionNode
Expected behavior
I expected to be able to configure a domain without issue
Actual behavior
The UI threw an Error because of the 500 server response
Steps to reproduce
Add a domain through the UI with Lets Encrypt SSL enabled
Proposed changes
None at the moment
I think this is a question for the nginx proxy manager project, not this addon. https://github.com/NginxProxyManager/nginx-proxy-manager
Also, i would share more info about what application you are proxying. Might need advanced settings for the application in question. Test if websockets, http/2, hsts / subdomains is needed. Play with the settings :)