I’m running into a weird issue right now. I set up jellyplex-watched, and the tool itself runs without issue and does its job just fine. The problem is that after jellyplex-watched has run, my Plex server is completely missing from every client—not just as if the server is offline and you cannot connect to it, but as if I created a new Plex account and never claimed a server before.
The same issue happens with plexanisync. Both tools figure out what items are marked as watched and seem to make a lot of API requests very quickly.
More observations:
After restarting the Plex server, the issue is resolved immediately, as if nothing had ever happened.
Plex clients that were already open and connected to the server or currently streaming are unaffected (at least for a while).
In the logs, I can see a lot of “We’re going to try to auto-select an audio stream for account 1,” which seems to be caused by the API requests. Is that normal?
Since the server seems to still work, I let it run for a while to see if it would recover, but it seems this is not the case even after hours.
This is the debug log from my server and pretty much just starting the server, running jellyplex-watched, confirming its dead and shutting it down again.
you have errors in the singular log you provided.
Seeing all the logs would be much more helpful.
Dec 29, 2024 11:40:40.671 [136956434877072] DEBUG - Image transcode cache directory: "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Cache/PhotoTranscoder"
Dec 29, 2024 11:40:40.671 [136956434877072] DEBUG - Transcoder: Cleaning old transcode directories.
Dec 29, 2024 11:40:40.671 [136956434877072] ERROR - Error creating directory "/transcode": Permission denied
Dec 29, 2024 11:40:40.671 [136956434877072] DEBUG - MyPlex: using cached data for request for https://plex.tv/api/v2/server/access_tokens?auth_token=xxxxxxxxxxxxxxxxxxxx
Dec 29, 2024 11:40:40.672 [136956434877072] DEBUG - MyPlex: updating with 39 access tokens
I would need to see how that third-party tool is hitting the api to give you ideas.
Regardless, you’ll very likely need to speak / chat with the tool’s author to throttle back the API hits so you don’t bury your server.
First of all, thanks @ChuckPa for pointing out the issue with the transcodes directory! That happened because I moved the server from a Docker to a non-Docker install for better testing.
Ok, so I figured out what the problem is, and it is not because of the amount of requests or something like that.
What triggers the issue is calling GET https://plex.tv/api/v2/user with the PlexOnlineToken found in Preferences.xml instead of the X-Plex-Token you obtain from viewing the XML in the X-Plex-Token header of the request.
Calling GET https://plex.tv/api/v2/user, both tokens return a HTTP 200 and the same data. The only difference is that using PlexOnlineToken makes the server disappear from the Plex account.