Closed gerryflux closed 4 months ago
The feature is meant to scan for and list all existing Plex users on the server. It instead fails with error 401 and does not produce the list.
Docker
Windows
Firefox, Microsoft Edge
Local
Clicking on the "Scan Users" to get the list of users fails, giving the error below:
Go to Users section Click on "Scan Users"
wizarr | 21:54:17 ERROR Exception on /api/users/scan [GET] wizarr | Traceback (most recent call last): wizarr | File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1484, in full_dispatch_request wizarr | rv = self.dispatch_request() wizarr | ^^^^^^^^^^^^^^^^^^^^^^^ wizarr | File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1469, in dispatch_request wizarr | return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) wizarr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ wizarr | File "/usr/local/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper wizarr | resp = resource(*args, **kwargs) wizarr | ^^^^^^^^^^^^^^^^^^^^^^^^^ wizarr | File "/usr/local/lib/python3.12/site-packages/flask/views.py", line 109, in view wizarr | return current_app.ensure_sync(self.dispatch_request)(**kwargs) wizarr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ wizarr | File "/usr/local/lib/python3.12/site-packages/flask_restx/resource.py", line 46, in dispatch_request wizarr | resp = meth(*args, **kwargs) wizarr | ^^^^^^^^^^^^^^^^^^^^^ wizarr | File "/usr/local/lib/python3.12/site-packages/flask_jwt_extended/view_decorators.py", line 170, in decorator wizarr | return current_app.ensure_sync(fn)(*args, **kwargs) wizarr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ wizarr | File "/wizarr/backend/api/routes/users_api.py", line 64, in get wizarr | return global_sync_users_to_media_server(), 200 wizarr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ wizarr | File "/wizarr/backend/helpers/universal.py", line 214, in global_sync_users_to_media_server wizarr | sync_plex_users() wizarr | File "/wizarr/backend/helpers/plex.py", line 279, in sync_plex_users wizarr | plex_users = get_plex_users(server_api_key=server_api_key, server_url=server_url) wizarr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ wizarr | File "/wizarr/backend/helpers/plex.py", line 191, in get_plex_users wizarr | response: list[MyPlexUser] = plex.myPlexAccount().users() wizarr | ^^^^^^^^^^^^^^^^^^^^ wizarr | File "/usr/local/lib/python3.12/site-packages/plexapi/server.py", line 322, in myPlexAccount wizarr | self._myPlexAccount = MyPlexAccount(token=self._token, session=self._session) wizarr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ wizarr | File "/usr/local/lib/python3.12/site-packages/plexapi/myplex.py", line 124, in __init__ wizarr | data, initpath = self._signin(username, password, code, remember, timeout) wizarr | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ wizarr | File "/usr/local/lib/python3.12/site-packages/plexapi/myplex.py", line 129, in _signin wizarr | return self.query(self.key), self.key wizarr | ^^^^^^^^^^^^^^^^^^^^ wizarr | File "/usr/local/lib/python3.12/site-packages/plexapi/myplex.py", line 239, in query wizarr | raise Unauthorized(message) wizarr | plexapi.exceptions.Unauthorized: (401) unauthorized; https://plex.tv/api/v2/user <?xml version="1.0" encoding="UTF-8"?> <errors> <error code="1001" message="User could not be authenticated" status="401"/> </errors>
same
I confused the issue, this is an issue with your plex token
Are you using the latest release?
Have you checked a bug report doesn't already exist?
What happened?
The feature is meant to scan for and list all existing Plex users on the server. It instead fails with error 401 and does not produce the list.
Virtualisation
Docker
What operating system are you seeing the problem on?
Windows
What browsers are you seeing the problem on?
Firefox, Microsoft Edge
Project Location
Local
Bug Description
Clicking on the "Scan Users" to get the list of users fails, giving the error below:![image](https://github.com/wizarrrr/wizarr/assets/52464120/1f1cc86a-cc16-49e3-b84a-044454a4b1f4)
Steps to Reproduce
Go to Users section Click on "Scan Users"
Relevant Log Output