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

[Bug] | Guest User causes Wizarr to remove server access for everyone #339

Closed
2 tasks done
ArmonicPvP opened this issue Mar 24, 2024 · 2 comments · Fixed by #344
Closed
2 tasks done

[Bug] | Guest User causes Wizarr to remove server access for everyone #339

ArmonicPvP opened this issue Mar 24, 2024 · 2 comments · Fixed by #344
Labels
bug Something isn't working released

Comments

@ArmonicPvP
Copy link

Are you using the latest release?

  • Yes, I am using the latest release.

Have you checked a bug report doesn't already exist?

  • Yes, I have checked the existing bug reports.

What happened?

When I clicked to "Scan Users" I got a 500 error. Logging into Plex shows the server completely missing from my account. Restarting the Plex server fixes the issue. After disabling my Guest user, the issue seems to have fixed itself. I haven't scanned again, but it could just be an issue with me having a picture on my account.

Virtualisation

Unraid

What operating system are you seeing the problem on?

Windows

What browsers are you seeing the problem on?

Chrome

Project Location

Local

Bug Description

When I clicked to "Scan Users" I got a 500 error. Logging into Plex shows the server completely missing from my account. Restarting the Plex server fixes the issue. After disabling my Guest user, the issue seems to have fixed itself. I haven't scanned again, but it could just be an issue with me having a picture on my account.

Steps to Reproduce

  1. Scan Users with Guest account enabled

Relevant Log Output

�[32m06:59:35�[0m �[1;30mERROR�[0m �[31mException on /api/users/310486303/profile-picture [GET]�[0m
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask_restx/api.py", line 404, in wrapper
    resp = resource(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask/views.py", line 109, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask_restx/resource.py", line 46, in dispatch_request
    resp = meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask_jwt_extended/view_decorators.py", line 170, in decorator
    return current_app.ensure_sync(fn)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask_caching/__init__.py", line 399, in decorated_function
    rv = self._call_fn(f, *args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/flask_caching/__init__.py", line 175, in _call_fn
    return ensure_sync(fn)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wizarr/backend/api/routes/users_api.py", line 52, in get
    picture = global_get_user_profile_picture(user_id)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wizarr/backend/helpers/universal.py", line 238, in global_get_user_profile_picture
    return get_plex_profile_picture(user_id)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wizarr/backend/helpers/plex.py", line 318, in get_plex_profile_picture
    user = get_plex_user(user_id=user_id, server_api_key=server_api_key, server_url=server_url)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/wizarr/backend/helpers/plex.py", line 220, in get_plex_user
    response: MyPlexUser = plex.myPlexAccount().user(user_id)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/plexapi/myplex.py", line 659, in user
    raise NotFound(f'Unable to find user {username}')
plexapi.exceptions.NotFound: Unable to find user 310486303
�[32m06:59:35�[0m �[1;30mINFO�[0m 127.0.0.1 - - [2024-03-24 06:59:35] "GET /api/users/310486303/profile-picture HTTP/1.0" 500 383 1.088817
@ArmonicPvP ArmonicPvP added the bug Something isn't working label Mar 24, 2024
@ArmonicPvP
Copy link
Author

Just tested again, and it happened this time with no 500 error. The sever is completely removed from my dashboard. I have to restart Plex for it to show up again.

image

@wizarr-sentry
Copy link
Contributor

wizarr-sentry bot commented Apr 29, 2024

🎉 This issue has been resolved in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants