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] Unable to run if WHITELIST_USERS not specified #53

Closed
1 of 2 tasks
meestark opened this issue Mar 17, 2023 · 8 comments · Fixed by #54
Closed
1 of 2 tasks

[BUG] Unable to run if WHITELIST_USERS not specified #53

meestark opened this issue Mar 17, 2023 · 8 comments · Fixed by #54

Comments

@meestark
Copy link

Describe the bug
The process is unable to run if WHITELIST_USERS variable doesn't have anything in it

To Reproduce
Steps to reproduce the behavior:

  1. Deploy docker with req'd env vars
  2. Do not provide the WHITELIST_USERS var

Expected behavior
A clear and concise description of what you expected to happen.

Logs

[INFO]: Dryrun: False
[INFO]: Creating (black/white)lists
[INFO]: Blacklist Library: []
[INFO]: Blacklist Library Type: []
[INFO]: Blacklist Users: []
[INFO]: Whitelist Library: []
[INFO]: Whitelist Library Type: []
[INFO]: Whitelist Users: []
[INFO]: Creating server connections
[INFO]: Creating users list
[INFO]: User list that exist on both servers { <REMOVED> }
[INFO]: Filtered user list {<REMOVED>}
[INFO]: Server 1 users: [<REMOVED - but was many MyPlexUser: and a single MyPlexAccount: >]
[INFO]: Creating watched lists
[ERROR]: Plex: Failed to login, Error: No complete plex credentials provided
[ERROR]: Plex: Failed to get watched, Error: No complete plex credentials provided
[ERROR]: No complete plex credentials provided
[ERROR]: Traceback (most recent call last):
  File "/app/src/plex.py", line 269, in login
    raise Exception("No complete plex credentials provided")
Exception: No complete plex credentials provided
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/app/src/plex.py", line 310, in get_watched
    user_plex = self.login(
                ^^^^^^^^^^^
  File "/app/src/plex.py", line 278, in login
    raise Exception(e)
Exception: No complete plex credentials provided
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/app/src/main.py", line 373, in main
    main_loop()
  File "/app/src/main.py", line 306, in main_loop
    server_1_watched = get_server_watched(
                       ^^^^^^^^^^^^^^^^^^^
  File "/app/src/main.py", line 155, in get_server_watched
    return server_connection[1].get_watched(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/plex.py", line 348, in get_watched
    raise Exception(e)
Exception: No complete plex credentials provided
Retrying in 3600.0

Type:

  • Docker
  • Native

Additional context
Works perfectly fine if I provide users in the WHITELIST_USERS variable. I tried both my account in the WHITELIST_USERS, as well as just a user's account and there was no difference, successful run every time.

@meestark meestark changed the title [BUG] [BUG] Unable to run if WHITELIST_USERS not specified Mar 17, 2023
@meestark
Copy link
Author

Hmm additional context - I provided the full list of users into the WHITELIST_USERS field and it also failed...

@luigi311
Copy link
Owner

Looking at the logs it looks like its complaining about your Plex credentials. Are you syncing two Plex servers? Did you include the baseurl and token for both?

@meestark
Copy link
Author

meestark commented Mar 17, 2023

Yup, both servers baseURLs are provided as well as token (the token is the same for both servers as they're both from my Account, imagine Plex01 and Plex02)

eg.
PLEX_BASEURL: "http://10.10.100.40:32407, http://10.10.100.40:32405"
PLEX_TOKEN: "ababa, ababa"

As mentioned, with a smaller list of users, it seems to be fine. I'm suspecting one of the users, so going through and trying to identify which user and what's unique...

@luigi311
Copy link
Owner

Hmm that's bizarre. The whitelist user variable shouldnt affect that login process that is failing. Let me take a look and get back to you.

@meestark
Copy link
Author

Managed to narrow it down - had two users, 1 who had no shares to any server, and 1 who only had shares from 1 of the servers. With those added to BLACKLIST_USERS the rest run fine.

@luigi311
Copy link
Owner

Interesting thank you very much for finding that. I'll see if I can do a check so it doesn't fail like this and will just skip the user.

@luigi311
Copy link
Owner

Can you try the Dev branch, i think i got a fix implemented so it will skip over generating the watch list and marking watched for the user that has no access to libraries.

@luigi311
Copy link
Owner

I believe this is solved now per my personal testing. I created a test user on both jellyfin and plex and in plex i did not provide the user any library access. In cases like this the user does not have a token for the server as such it was causing errors. This now skips the user for getting watched and marking. This does not seem to be an issue with jellyfin based on some quick testing but if something comes up on the jellyfin side we can create a new ticket for it.

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

Successfully merging a pull request may close this issue.

2 participants