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

Plex Server error #684

Closed
X-static opened this issue Dec 26, 2023 · 14 comments
Closed

Plex Server error #684

X-static opened this issue Dec 26, 2023 · 14 comments

Comments

@X-static
Copy link

Describe the bug
Rules that were previously working now can't add media to collections. There's an error on the logs about plex server not responding but connection tested ok. I even redid the authentication.

To Reproduce
Steps to reproduce the behavior:
Not sure how to reproduce. I just hit 'run rules' and the collections stays empty.

Expected behavior
Media should be added to collections according to rules.

Screenshots
If applicable, add screenshots to help explain your problem.

Device (please complete the following information):

  • OS: Ubuntu 20.04
  • Version: latest

Additional context
Relevant logs:

maintainerr  | [Nest] 112  - 12/26/2023, 12:00:23 AM    WARN [CollectionsService] Couldn't add media to collection: 
maintainerr  | [Nest] 112  - 12/26/2023, 12:00:23 AM    WARN [CollectionsService] Couldn't add media to collection: 
maintainerr  | [Nest] 112  - 12/26/2023, 12:00:23 AM    WARN [CollectionsService] Error: Plex Server didnt respond with a valid 2xx status code, response code: 400
@jorenn92
Copy link
Owner

Hey, does it still work with the previous version (1.6.10)? & Could you post the corresponding Plex debug log as well?

you can get the Plex log by using Plex web -> console and re running rules.

@X-static
Copy link
Author

X-static commented Dec 26, 2023

Hi, on 1.6.10 it doesn't work as well.

There's a lot of logs on the console when the rules are running. A couple of them might be relevant.

This line repeats several times:
[Req#bd20] Query: Invalid field used: metadataItemID. Ignoring

And this one four times.
[Req#becc] Missing X-Plex-Container-Size header. This will fail with status code 400 in the future.

@jorenn92
Copy link
Owner

Are you seeing the ‘Missing X-Plex-container-size’ warning with the latest version as well? 1.7.0 contains a change where this header was added to all calls that missed it.

I’ll look into the ‘metadataItemID’ warning when i’ve got some free time. It seems odd that Plex would remove something from their API.

@jorenn92
Copy link
Owner

jorenn92 commented Jan 2, 2024

Are you still encountering this issue? The metadataItemID is used (and required) to fetch the Plex watchlist of an item and to update a collection's settings. Since this hasn't changed, I'm uncertain about the source of your error messages.

@X-static
Copy link
Author

X-static commented Jan 3, 2024

Hi. Yes, I'm still having this issue. Sorry, I thought I had replied to your previous message. On 1.7.0 I don't have the 'Missing X-Plex-container-size' warning but I'm seeing this one:

[Req#2392aa] X-Plex-Container-Size header exceeds limit 120. This will fail with status code 400 in the future.

Probably was there on 1.6.10 as well but I might missed it.

I filtered now for errors and warning and I got this:

Jan 03, 2024 11:04:59.559 [139868682783544] Warning — Held transaction for too long (/data/jenkins/server/3537965286/Statistics/StatisticsManager.cpp:301): 0.110000 seconds
Jan 03, 2024 11:05:05.780 [139868734532408] Warning — [Req#23cf6e] X-Plex-Container-Size header exceeds limit 120. This will fail with status code 400 in the future.
Jan 03, 2024 11:05:22.661 [139868748237624] Warning — [Req#23da46] X-Plex-Container-Size header exceeds limit 120. This will fail with status code 400 in the future.

@jorenn92
Copy link
Owner

jorenn92 commented Jan 5, 2024

Hi. Yes, I'm still having this issue. Sorry, I thought I had replied to your previous message. On 1.7.0 I don't have the 'Missing X-Plex-container-size' warning but I'm seeing this one:

[Req#2392aa] X-Plex-Container-Size header exceeds limit 120. This will fail with status code 400 in the future.

Probably was there on 1.6.10 as well but I might missed it.

I filtered now for errors and warning and I got this:

Jan 03, 2024 11:04:59.559 [139868682783544] Warning — Held transaction for too long (/data/jenkins/server/3537965286/Statistics/StatisticsManager.cpp:301): 0.110000 seconds
Jan 03, 2024 11:05:05.780 [139868734532408] Warning — [Req#23cf6e] X-Plex-Container-Size header exceeds limit 120. This will fail with status code 400 in the future.
Jan 03, 2024 11:05:22.661 [139868748237624] Warning — [Req#23da46] X-Plex-Container-Size header exceeds limit 120. This will fail with status code 400 in the future.

I'll fix the 'exceeds limit 120' in a next release as well.

Are you also still seeing the issue where media can't be added to the Plex collection?

@X-static
Copy link
Author

X-static commented Jan 5, 2024

Yes. The media still can't be added to the Plex collection.

@jorenn92
Copy link
Owner

jorenn92 commented Jan 5, 2024

Could you compare the Maintainerr collection to the Plex collection? Maybe something got corrupted there. Do the items in Maintainerrs collection match those in the Plex one?

@X-static
Copy link
Author

X-static commented Jan 5, 2024

The items weren't added to the Maintainerr collections as well. I'm using a custom collection name.

Anyway, it's working now. I deleted the sqllite file and started a fresh installation. Probably was something corrupted there.

You may close the issue. I'll get back if it happens again.

@jorenn92
Copy link
Owner

jorenn92 commented Jan 5, 2024

The items weren't added to the Maintainerr collections as well. I'm using a custom collection name.

Anyway, it's working now. I deleted the sqllite file and started a fresh installation. Probably was something corrupted there.

You may close the issue. I'll get back if it happens again.

Okay, if you come across it again, feel free to give a shout! :)

@jorenn92 jorenn92 closed this as completed Jan 5, 2024
@X-static
Copy link
Author

X-static commented Feb 6, 2024

Hi, again. I'm having that Plex error again when adding to a collection. And now I couldn't fix it deleting the sqllite file. But now only happens when using a custom collection. If I let it automatically create a collection with the rule name works fine.

@jorenn92
Copy link
Owner

jorenn92 commented Feb 7, 2024

What error are you seeing exactly? Make sure your manual collection is of the correct media type (movies, shows, seasons, or episodes). You can't add seasons or episodes to a collection of type show.

@X-static
Copy link
Author

X-static commented Feb 8, 2024

It was precisely the same error I had on the original post.
I was able to get through it by deleting the manual collections and creating new ones. But they were of the correct media type and was working until the update that changed the ports.

This post not to be in vain, if I may add a small suggestion. The reason I need custom collections is to edit the 'sort title' so I can push the collection to the top of the list. Would be a nice feature to add that to the rule option. Thank you

@jorenn92
Copy link
Owner

jorenn92 commented Feb 9, 2024

I'll need to test this theory, but it's possible that the link is lost after a reboot. However, this shouldn't happen, as the ID is persisted in the database. Nonetheless, it's always possible there might be scenarios where this happens.

Also, good suggestion. Sounds useful. I'll check it out!

FR #854 to track 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

No branches or pull requests

2 participants