The app will crash when starting with OIDC enabled:
Aug 10 19:02:32 ingress docker[2554]: headscale-webui | [2024-08-10 15:02:32 -0400] [1] [INFO] Reason: Worker failed to boot.
Aug 10 19:02:32 ingress docker[2554]: headscale-webui | [2024-08-10 15:02:32 -0400] [1] [INFO] Shutting down: Master
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | [2024-08-10 15:02:31 -0400] [8] [INFO] Worker exiting (pid: 8)
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/app/.venv/lib/python3.11/site-packages/requests/models.py", line 968, in json
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | ^^^^^^^^^^^^^^^
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | oidc_info = response.json()
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/app/server.py", line 55, in <module>
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "<frozen importlib._bootstrap_external>", line 940, in exec_module
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | return _bootstrap._gcd_import(name[level:], package, level)
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/usr/local/lib/python3.11/importlib/__init__.py", line 126, in import_module
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | mod = importlib.import_module(module)
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/app/.venv/lib/python3.11/site-packages/gunicorn/util.py", line 359, in import_app
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | return util.import_app(self.app_uri)
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/app/.venv/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | ^^^^^^^^^^^^^^^^^^^
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | return self.load_wsgiapp()
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/app/.venv/lib/python3.11/site-packages/gunicorn/app/wsgiapp.py", line 58, in load
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | ^^^^^^^^^^^
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | self.callable = self.load()
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/app/.venv/lib/python3.11/site-packages/gunicorn/app/base.py", line 67, in wsgi
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | ^^^^^^^^^^^^^^^
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | self.wsgi = self.app.wsgi()
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/app/.venv/lib/python3.11/site-packages/gunicorn/workers/base.py", line 146, in load_wsgi
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | self.load_wsgi()
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/app/.venv/lib/python3.11/site-packages/gunicorn/workers/base.py", line 134, in init_process
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | worker.init_process()
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/app/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py", line 589, in spawn_worker
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | Traceback (most recent call last):
Aug 10 19:02:31 ingress docker[2554]: headscale-webui |
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | During handling of the above exception, another exception occurred:
Aug 10 19:02:31 ingress docker[2554]: headscale-webui |
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | raise JSONDecodeError("Expecting value", s, err.value) from None
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | obj, end = self.raw_decode(s, idx=_w(s, 0).end())
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | return _default_decoder.decode(s)
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | return complexjson.loads(self.content.decode(encoding), **kwargs)
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | File "/app/.venv/lib/python3.11/site-packages/requests/models.py", line 960, in json
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | Traceback (most recent call last):
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | [2024-08-10 15:02:31 -0400] [8] [ERROR] Exception in worker process
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | [2024-08-10 15:02:31,696] INFO in server: Loading OIDC libraries and configuring app...
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | [2024-08-10 15:02:31,695] INFO in server: DEBUG STATE: True
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | [2024-08-10 15:02:31,695] INFO in server: LOG LEVEL SET TO DEBUG
Aug 10 19:02:31 ingress docker[2554]: headscale-webui | [2024-08-10 15:02:31,691] INFO in server: Headscale-WebUI Version: v0.6.2 / main
Aug 10 19:02:26 ingress docker[2554]: headscale-webui | [2024-08-10 15:02:26 -0400] [8] [INFO] Booting worker with pid: 8
Aug 10 19:02:26 ingress docker[2554]: headscale-webui | [2024-08-10 15:02:26 -0400] [1] [INFO] Using worker: sync
Aug 10 19:02:26 ingress docker[2554]: headscale-webui | [2024-08-10 15:02:26 -0400] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)
Aug 10 19:02:26 ingress docker[2554]: headscale-webui | [2024-08-10 15:02:26 -0400] [1] [INFO] Starting gunicorn 20.1.0
It seems like it can't get the info from the OIDC URL but I've checked and the URL is accessible from within the container and returns the expected JSON.
The app will crash when starting with OIDC enabled:
It seems like it can't get the info from the OIDC URL but I've checked and the URL is accessible from within the container and returns the expected JSON.