Unable to update media library settings

Server Version#: FreeBSD (TrueNAS) 1.27.2.5929
Player Version#: Plex Web 4.88.1

Each time I press “Save Changes” while updating the folder list (or any settings or none) for my TV Shows or Movies library, the dialog says “Your changes could not be saved.”

Inspecting the response in the browser dev tools I see:

'agent' is missing or invalid
'language' is invalid

How many folders did you add?
Are the paths consisting of rather many characters?

No, that particular library is for TV Shows. It’s paths are:

  • /media/TV
  • /media/Optimized/TV

My library for Movies also has the same behavior. It’s paths are:

  • /media/Movies
  • /media/Optimized/Movies

The latter path, in both cases, is devoid of files at this point.

Place a single .txt file in there. It doesn’t have to be large, a few bytes are sufficient.

root@plex-plexpass:/media/Optimized/TV # echo "A small text file" > smallfile.txt

I also rescanned both libraries after, but I’m still seeing the same behavior.

Request parameters from the Browser dev console:

name: TV Shows
type: show
agent: tv.plex.agents.series
scanner: Plex TV Series
language: en-US
importFromiTunes: 
enableAutoPhotoTags: 
location: /media/Optimized/TV
location: /media/TV
X-Plex-Product: Plex Web
X-Plex-Version: 4.88.1
X-Plex-Client-Identifier: [REDACTED]
X-Plex-Platform: Chrome
X-Plex-Platform-Version: 104.0
X-Plex-Features: external-media,indirect-media,hub-style-list
X-Plex-Model: hosted
X-Plex-Device: OSX
X-Plex-Device-Name: Chrome
X-Plex-Device-Screen-Resolution: 1100x755,1512x982
X-Plex-Token: [REDACTED]
X-Plex-Language: en

From the console:

Do you have any web browser add-ins activated?
The error message reads as if something is stripping URL parameters or form data.

I just installed Firefox and tried there and I get the same behavior and same messages, both in logs and in the browser.

I also noticed I have no Plex Agents in my Agents settings pane. Under TheTVDB and The Movie Database, I have “Plex Theme Music” as the only “Plex” Agents.
Screen Shot 2022-08-10 at 10.06.49 AM

Then there might be an issue with your server installation in general.
But unfortunately I am absolutely not familiar with your server platform, so I’m not able to give you any tips how to debug this.

That being said, there is nothing irregular about your screen shot of the old agent settings page.

Hmmm, yeah. It appears there’s some problem with the agents. I switched Movies and Shows to The Movie Database and TheTVDB respectively. After finishing the scan, I got the “Upgrade Library” option, but it fails with the exact same error.

That is probably a problem. Downgrading away from the modern agents doesn’t really work. You may have to delete the libraries and recreate them.

(Apart from the opensubtitles plugin, there is actually no good reason to perform a downgrade.)

Well, I can’t create new libraries now, either. I get the exact same error message when trying to add them.

Apart from checking the health of your main Plex database file, I have no idea I’m afraid.

I think it is looking more like a database issue. According to the logs, queries to com.plexapp.plugins.library.db is timing out at 24seconds.

There are also lots of these:

Aug 10, 2022 10:20:05.683 [0x80e8a9f00] WARN - [Req#3740a] QueryParser: Invalid field 'pinnedContentDirectoryID' found, ignoring.
Aug 10, 2022 10:20:05.683 [0x80e8a9f00] WARN - [Req#3740a] QueryParser: Invalid field 'contentDirectoryID' found, ignoring.

Hence why I’m recommending to check its health.

  1. activate debug logging (not ‘verbose’!)
  2. quit Plex Server
  3. wait 1 minute
  4. start Plex Server
  5. wait 5 minutes
  6. fetch log files and attach them here

Or inspect them yourself. Take a look at the Plex Media Server.log file and seek for messages about database corrupt or malformed.
If you find these, you may have to repair your database.
https://support.plex.tv/articles/repair-a-corrupted-database/

I don’t see any corrupt or malformed lines, but I do see errors with plugins:

Aug 10, 2022 11:07:35.222 [0x80d936400] ERROR - [Req#33f] Timeout or error reading status line from plug-in pipe [tv.plex.agents.movie], we're killing it.            
Aug 10, 2022 11:07:35.222 [0x80d936400] DEBUG - [Req#33f] Stopping [tv.plex.agents.movie].                                                                            
Aug 10, 2022 11:07:35.222 [0x80d936400] DEBUG - [Req#33f] [tv.plex.agents.movie] Killing.                                                                             
Aug 10, 2022 11:07:35.222 [0x80d936400] ERROR - [Req#33f] Error received reading configuration for tv.plex.agents.movie                                               
Aug 10, 2022 11:07:35.222 [0x80d936400] DEBUG - [Req#33f] Stopping [tv.plex.agents.movie].                                                                            
Aug 10, 2022 11:07:35.226 [0x807fd6e00] DEBUG - Completed after connection close: [192.168.159.94:60170] 500 GET /:/plugins/tv.plex.agents.movie/prefs (15 live) TLS G
ZIP 273956ms 0 bytes (pipelined: 12)                                                                                                                                  
Aug 10, 2022 11:07:35.229 [0x8065cd600] WARN - JobManager: Could not find job for handle 52263                                                                        
Aug 10, 2022 11:07:35.292 [0x80c9f5a00] ERROR - Timeout or error reading status line from plug-in pipe [tv.plex.agents.series], we're killing it.                     
Aug 10, 2022 11:07:35.292 [0x80c9f5a00] DEBUG - Stopping [tv.plex.agents.series].                                                                                     
Aug 10, 2022 11:07:35.292 [0x80c9f5a00] DEBUG - [tv.plex.agents.series] Killing.                                                                                      
Aug 10, 2022 11:07:35.292 [0x80c9f5a00] ERROR - Error received reading configuration for tv.plex.agents.series                                                        
Aug 10, 2022 11:07:35.292 [0x80c9f5a00] DEBUG - Stopping [tv.plex.agents.series].                                                                                     
Aug 10, 2022 11:07:35.292 [0x80952c800] DEBUG - Updating the list of agents known by the system.                                                                      
Aug 10, 2022 11:07:35.292 [0x80952c800] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /system/agents                                                  
Aug 10, 2022 11:07:35.292 [0x80952c800] DEBUG - [HCl#4a] HTTP requesting GET http://127.0.0.1:61574/system/agents                                                     

also, adding the library:

Aug 10, 2022 11:12:18.365 [0x807fd6900] ERROR - [Req#7c3] Library: Couldn't create section: 'agent' is missing or invalid
Aug 10, 2022 11:12:18.365 [0x807fd6900] ERROR - [Req#7c3] Library: Couldn't create section: 'language' is invalid
Aug 10, 2022 11:12:18.365 [0x807fd6900] ERROR - [Req#7c3] Library: Couldn't create section: new scanner needs to be paired with new agent

Ok following up here. I managed to fix this issue. The short version is: the two agents weren’t successfully starting.

I took two actions:

I’m not certain which of those two fixed the issue, but when looking at the plugin logs for those two providers there were a ton of python stacktraces in both. “Network missing in FoundationCore” etc. (Sorry, I nuked the logs in the process of my debugging, so no exact error messages.)

Most likely the second one.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.