Error Unknown metadata type: folder

Server Version#: 1.32.8.7639
Player Version#: Latest IOS and IPAD
<If providing server logs please do NOT turn on verbose logging, only debug logging should be enabled>
When I browse my Plex Library on Ios ipad os, apple tv or nvidia shield
I get the follow error in plex from time to time:

“ Error Unknown metadata type: folder ”
Also I get the warnings
QueryParser: Invalid field ‘contentDirectoryID’ found, ignoring.
QueryParser: Invalid field ‘libraryHubsOnly’ found, ignoring.
QueryParser: Invalid field ‘sectionID’ found, ignoring.

I also from time to time have a problem where plex can not match any items till i restart the plex server.
When trying to match nothing shows up at all . if it’s a tv show I have the content gets put into the right show but with no info about it.

I recently had a problem where I have too many folders watched which was fixed with the help of ChuckPa and I thought this would have fixed the match issue too but I got it again the other day.

Could this be connected with the errors?

Thank you all in advance

/Thrawn
Plex Media Server Logs_2024-01-12_10-48-12.zip (4.4 MB)

These errors ( QueryParser ) are because we’re fixing/improving the API and those changes aren’t finished yet. The apps know how to use it but some parts of PMS aren’t using those fields yet. If you look , it says “ignoring”.

As for not not matching media until PMS restarts; this is a separate problem.
We should look at the file names and folder structure to confirm everything is correct

One problem I see in your logs is how fragmented & slow your DB is.
Queries to lookup metadata or match will fail (timeout) if it’s too fragmented.

Jan 11, 2024 22:07:47.760 [140095429135160] DEBUG - Completed: [192.168.82.104:37190] 200 GET /library/metadata/50659/children (20 live) #a1fa5 TLS GZIP 352ms 5168 bytes
Jan 11, 2024 22:07:47.772 [140095106124600] WARN - [Req#a1fcf] SLOW QUERY: It took 210.000000 ms to retrieve 16 items.
Jan 11, 2024 22:07:47.781 [140095114562360] WARN - [Req#a1fd9] SLOW QUERY: It took 280.000000 ms to retrieve 24 items.
Jan 11, 2024 22:07:47.788 [140095288122168] WARN - [Req#a1fd7] SLOW QUERY: It took 270.000000 ms to retrieve 22 items.
Jan 11, 2024 22:07:47.795 [140095429135160] DEBUG - Completed: [192.168.82.104:37206] 200 GET /library/metadata/131089/children (18 live) #a1fe1 TLS GZIP 198ms 3173 bytes
Jan 11, 2024 22:07:47.801 [140095117982520] DEBUG - [Req#a1fec] It took 180.000000 ms to retrieve 12 items.
Jan 11, 2024 22:07:47.803 [140095087946552] DEBUG - [Req#a1fe2] It took 200.000000 ms to retrieve 8 items.
Jan 11, 2024 22:07:47.805 [140095429135160] DEBUG - Completed: [192.168.82.104:37198] 200 GET /library/metadata/35207/children (17 live) #a1fba TLS GZIP 279ms 7870 bytes
Jan 11, 2024 22:07:47.812 [140095148301112] DEBUG - [Req#a1fed] It took 150.000000 ms to retrieve 10 items.
Jan 11, 2024 22:07:47.822 [140095199222584] DEBUG - Request: [192.168.82.104:37228 (Allowed Network (Subnet))] GET /library/metadata/35182/children (17 live) #a200e TLS GZIP Signed-in Token (Thrawn_JL) (Safari (Overseerr))
Jan 11, 2024 22:07:47.826 [140095429135160] DEBUG - Completed: [192.168.82.104:37200] 200 GET /library/metadata/33060/children (17 live) #a1fcf TLS GZIP 282ms 5063 bytes
Jan 11, 2024 22:07:47.833 [140095431244600] DEBUG - Completed: [192.168.82.104:37208] 200 GET /library/metadata/19480/children (16 live) #a1fe2 TLS GZIP 201ms 2943 bytes
Jan 11, 2024 22:07:47.844 [140095074306872] DEBUG - Request: [192.168.82.104:37234 (Allowed Network (Subnet))] GET /library/metadata/33110/children (17 live) #a201e TLS GZIP Signed-in Token (Thrawn_JL) (Safari (Overseerr))
Jan 11, 2024 22:07:47.844 [140095131175736] DEBUG - Request: [192.168.82.104:37232 (Allowed Network (Subnet))] GET /library/metadata/19489/children (17 live) #a201b TLS GZIP Signed-in Token (Thrawn_JL) (Safari (Overseerr))
Jan 11, 2024 22:07:47.855 [140095429135160] DEBUG - Completed: [192.168.82.104:37214] 200 GET /library/metadata/140966/children (17 live) #a1fed TLS GZIP 152ms 3333 bytes
Jan 11, 2024 22:07:47.866 [140095429135160] DEBUG - Completed: [192.168.82.104:37212] 200 GET /library/metadata/38033/children (16 live) #a1fec TLS GZIP 219ms 4698 bytes
Jan 11, 2024 22:07:47.867 [140095431244600] DEBUG - Completed: [192.168.82.104:37192] 200 GET /library/metadata/132183/children (15 live) #a1fa8 TLS GZIP 460ms 9674 bytes
Jan 11, 2024 22:07:47.870 [140095175187256] WARN - [Req#a1fe4] SLOW QUERY: It took 400.000000 ms to retrieve 26 items.
Jan 11, 2024 22:07:47.877 [140095078525752] WARN - [Req#a200d] SLOW QUERY: It took 220.000000 ms to retrieve 23 items.
Jan 11, 2024 22:07:47.877 [140095112452920] DEBUG - [Req#a1fff] It took 180.000000 ms to retrieve 8 items.

Are you familiar with my DBRepair tool which defragments the databases?
Also, are you familiar with / comfortable with using Putty / SSH to log into the Syno at the command line ?

1 Like

I am not familiar with your DBrepair tool :slight_smile:
I am familiar with ssh and if there is a step by step guide I am comfortable with it.

Also is the error unknown metadata type: folder” part of the API fix thing?
that does not say ignore.

Ok I found your tool on github and installed it an ran it.

Which option should I chose in the menu?

In my tool:

Stop - Auto - Start - Exit

It’s that easy

(it accepts command name or command number)

i normally use it this way (as ‘root’ user after ‘sudo bash’).
This is the only thing I put in the PlexMediaServer shared folder :wink:

# /volume1/PlexMediaServer/DBrepair.sh  stop auto start exit

It will do it all in one shot.

1 Like

Right :smiley: ran number 2 Auto thing

Guessing it will take quite a bit of time?

It will show you what it’s doing at every step

The worse the DB is and the bigger it is, the longer it will take.

You’ll see a big improvement after it’s done putting it all back together

1 Like

Thanks a lot.

So my unknown metadata type:

Is this connected to fixing the database or api fix or something else?

“Unknown metadata type” is solely related to the API queries (internal to PMS)

They truly are harmless right now .

The apps know how to use those extra fields but PMS hasn’t implemented them for all media types

The DB performance will really help with matching and queries.
I’ve seen cases where the search completes (auto-complete) AS HE TYPED
It can/should be nearly instantaneous

Done yet or is it still working?

1 Like

Thank you so much for your help and answers!

Exporting blobs DB right now

Here’s how it looks (my little syno development box)

chuck@ds418:/volume1/PlexMediaServer$ sudo ./DBRepair.sh stop auto start exit
 
 
 
      Plex Media Server Database Repair Utility (Synology (DSM 7))
                       Version v1.0.8
 
 
[2024-01-12 12.40.09] Stopping PMS.
[2024-01-12 12.40.13] Stopped PMS.
 
[2024-01-12 12.40.14] Automatic Check,Repair,Index started.
[2024-01-12 12.40.14] 
[2024-01-12 12.40.14] Checking the PMS databases
[2024-01-12 12.40.14] Check complete.  PMS main database is OK.
[2024-01-12 12.40.15] Check complete.  PMS blobs database is OK.
[2024-01-12 12.40.15] 
[2024-01-12 12.40.15] Exporting current databases using timestamp: 2024-01-12_12.40.13
[2024-01-12 12.40.15] Exporting Main DB
[2024-01-12 12.40.17] Exporting Blobs DB
[2024-01-12 12.40.18] Successfully exported the main and blobs databases.  Proceeding to import into new databases.
[2024-01-12 12.40.18] Importing Main DB.
[2024-01-12 12.40.20] Importing Blobs DB.
[2024-01-12 12.40.21] Successfully imported databases.
[2024-01-12 12.40.21] Verifying databases integrity after importing.
[2024-01-12 12.40.21] Verification complete.  PMS main database is OK.
[2024-01-12 12.40.21] Verification complete.  PMS blobs database is OK.
[2024-01-12 12.40.21] Saving current databases with '-BACKUP-2024-01-12_12.40.13'
[2024-01-12 12.40.21] Making repaired databases active
[2024-01-12 12.40.21] Repair complete. Please check your library settings and contents for completeness.
[2024-01-12 12.40.21] Recommend:  Scan Files and Refresh all metadata for each library section.
[2024-01-12 12.40.21] 
[2024-01-12 12.40.21] Backing up of databases
[2024-01-12 12.40.21] Backup current databases with '-BACKUP-2024-01-12_12.40.21' timestamp.
[2024-01-12 12.40.21] Reindexing main database
[2024-01-12 12.40.22] Reindexing main database successful.
[2024-01-12 12.40.22] Reindexing blobs database
[2024-01-12 12.40.22] Reindexing blobs database successful.
[2024-01-12 12.40.22] Reindex complete.
[2024-01-12 12.40.22] Automatic Check, Repair/optimize, & Index successful.
 
[2024-01-12 12.40.22] Starting PMS.
[2024-01-12 12.40.29] Started PMS
 
chuck@ds418:/volume1/PlexMediaServer$ 

Crap :S

Should not have run it on my tablet
Lost connection while wating too long.

What happens if I run it again from a pc?

Does it ■■■■ something up because it might be already running?

???

What happened ?

Tablet ssh session failed ?

Diagnostic data

  1. Start tool – It doesn’t touch the DB’s until given the commands to do so.
  2. show command
  3. It will show you everything it’s done.

Share that with me.

See I was lazy and use my iPad to do it

iPad went in standby and the app I used dropped ssh connection and now I can’t see what it’s doing :face_with_peeking_eye:

SSH rules mean the connection terminates – and all attached processes terminate too

I plan for that.

That’s why I need to see (confirm) where it was at

  1. Start tool
  2. show command to see logfile
  3. Sit there at the menu (On your PC)

so putty pc

How do I copy the text? :open_mouth:

image

That’s the end of the logfile?

It is yes

Should I just run it again (on pc)?