Server Version#: Version 1.32.8.7639
Player Version#: Version 4.9.5
Using Plexamp either on my Windows Desktop or my Android phone, I am not able to use the Search function on Plexamp. It sometimes returns an item based on only the initial Letter of the search. For example if I’m searching for “Tycho”, the “T” only returns a song titled “T”. Same happens with a few other letters in the Alphabet. If I complete the search string, I am only left with “All that you seek is already within you”. My server has the Visibility set to “Include in home screen and global search” and can access my full catalogue using the Artist/Album functionality in Plexamp, but cannot figure out why the Search isn’t working. Plexamp also shows the correct Music Library Source, and is populating as expected, just search functionality is not there.
Any help would be appreciated,
EDIT: Searching throught he Plexamp Logs, I see the following entries (with some server IP information removed)
> Jan 13, 2024 13:59:59.228 [0x00012c78] DEBUG - Networking: Completed request 1167: (GET ***/hubs/search? Query=Incubus&excludeFields=summary&limit=4&includeCollections=1&includeFields=thumbBlurHash&X-Plex-Device-Name=DESKTOP%20KAC7H01) with code 500 (have 109 bytes) in 4 ms.
> Jan 13, 2024 13:59:59.229 [Javascript] INFO - Networking: Error parsing JSON from request 1167: 500 Unexpected token '<', "<html><hea"... is not valid JSON
> Jan 13, 2024 13:59:59.229 [Javascript] INFO - Error loading: get *****/hubs/search? Query=Incubus&excludeFields=summary&limit=4&includeCollections=1&includeFields=thumbBlurHash&X-Plex-Device-Name=DESKTOP%20KAC7H01: HTTP status 500
> Jan 13, 2024 13:59:59.339 [0x00012c78] DEBUG - Networking: Completed request 1168: (POST https://analytics.plex.tv/collect/event) with code 200 (have 0 bytes) in 110 ms.
EDIT #2: Also looks like search isn’t working in normal Plex Web either, it is adding new content to the server automatically, but search is failing. Might be a sqlite database issue.
Jan 13, 2024 14:22:21.359 [140068354136888] Error — [Req#6e1d47] SQLITE3:0x80000001, 1, no such table: fts4_metadata_titles_icu in "select distinct metadata_items.id from metadata_items join fts4_metadata_titles_icu on metadata_items.id=fts4_metadata_titles_icu.rowid join metadata_item_accounts on metadata_item_accounts.metadata_item_id=metadata_items.id where fts4_metadata_titles_icu.title match 'Umphrey''s*' and metadata_items.metadata_type=15 and metadata_item_accounts.account_id=1 order by metadata_items.`index` desc, metadata_items.title_sort collate icu_root asc limit 100"
Jan 13, 2024 14:22:21.359 [140068354136888] Error — Got exception from request handler: sqlite3_statement_backend::prepare: no such table: fts4_metadata_titles_icu for SQL: select distinct metadata_items.id from metadata_items join fts4_metadata_titles_icu on metadata_items.id=fts4_metadata_titles_icu.rowid join metadata_item_accounts on metadata_item_accounts.metadata_item_id=metadata_items.id where fts4_metadata_titles_icu.title match 'Umphrey''s*' and metadata_items.metadata_type=15 and metadata_item_accounts.account_id=1 order by metadata_items.`index` desc, metadata_items.title_sort collate icu_root asc limit 100
Optimizing gives me this in the logs, followed by the same metadata exception from edit #2, looks like db corruption, right? I’ll try running through the repair db procedure.
Jan 13, 2024 14:32:34.112 [140068259167032] Debug — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] Rebuilding full text search tables.
Jan 13, 2024 14:32:34.112 [140068259167032] Debug — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] Activity: updated activity d1719385-4d32-4a57-941b-c5c269f2567f - completed 40.0% - Optimizing database
Jan 13, 2024 14:32:34.113 [140068259167032] Debug — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] Database optimization: starting.
Jan 13, 2024 14:32:34.113 [140068259167032] Debug — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] Activity: updated activity d1719385-4d32-4a57-941b-c5c269f2567f - completed 60.0% - Optimizing database
Jan 13, 2024 14:32:38.884 [140068259167032] Debug — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] Database optimization: complete.
Jan 13, 2024 14:32:38.889 [140068259167032] Info — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 58: [select * from metadata_items limit 1] database schema has changed
Jan 13, 2024 14:32:38.894 [140068259167032] Info — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 58: [select * from metadata_items limit 1] database schema has changed
Jan 13, 2024 14:32:38.898 [140068259167032] Info — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 58: [select * from metadata_items limit 1] database schema has changed
Jan 13, 2024 14:32:38.903 [140068259167032] Info — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 58: [select * from metadata_items limit 1] database schema has changed
Jan 13, 2024 14:32:38.906 [140068259167032] Info — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 58: [select * from metadata_items limit 1] database schema has changed
Jan 13, 2024 14:32:38.909 [140068259167032] Info — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 58: [select * from metadata_items limit 1] database schema has changed
Jan 13, 2024 14:32:38.913 [140068259167032] Info — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 58: [select * from metadata_items limit 1] database schema has changed
Jan 13, 2024 14:32:38.916 [140068259167032] Info — [Req#6e2e1a/Database optimization/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 17, statement aborts at 58: [select * from metadata_items limit 1] database schema has changed
That actually looks fine, the “schema changed” thing is just due to the vacuum on the underlying database. Something is still wonky though if you’re seeing the same exception.
A message like that should only appear during the first restart after a server software update. If it appears each time, this suggests that the database file is damaged. You should urgently try to repair it or restore one of the backups.
Wow! No idea that Database repair utility existed, have been doing it manually for years, so useful! Initial check showed main/blobs were good, ran through “automatic” to refresh/reindex, restarted PMS, went into my libraries and re-scanned/refreshed metadata, and still getting these sqlite3 errors in the plex server logs.
I haven’t quite restored from backup yet, which is probably my next course of action.
Jan 13, 2024 18:04:17.569 [139847111367480] Error — [Req#1f5f5] SQLITE3:0x80000001, 1, no such table: fts4_metadata_titles_icu in "select distinct metadata_items.id from metadata_items join fts4_metadata_titles_icu on metadata_items.id=fts4_metadata_titles_icu.rowid join metadata_item_accounts on metadata_item_accounts.metadata_item_id=metadata_items.id where fts4_metadata_titles_icu.title match 'Umph*' and metadata_items.metadata_type=15 and metadata_item_accounts.account_id=1 order by metadata_items.`index` desc, metadata_items.title_sort collate icu_root asc limit 100"
Jan 13, 2024 18:04:17.569 [139847111367480] Error — Got exception from request handler: sqlite3_statement_backend::prepare: no such table: fts4_metadata_titles_icu for SQL: select distinct metadata_items.id from metadata_items join fts4_metadata_titles_icu on metadata_items.id=fts4_metadata_titles_icu.rowid join metadata_item_accounts on metadata_item_accounts.metadata_item_id=metadata_items.id where fts4_metadata_titles_icu.title match 'Umph*' and metadata_items.metadata_type=15 and metadata_item_accounts.account_id=1 order by metadata_items.`index` desc, metadata_items.title_sort collate icu_root asc limit 100
Tried restoring to the oldest backup I had, and still getting the same errors in my PMS logs. Search across all platforms is failing, with the same SQLITE3 exception. Guess this was in my db for longer than I thought. Is there anything else I could try doing aside from rebuilding my libraries from scratch?
I have a rudimentary knowledge of SQL, but know how to run SQLite via command line and could probably meander through it with some basic guidance.
As for betas, I have in the past, but not in a while. I’ve been sticking to the Public releases for the last 6- 12 months or so.
I did have some issues near the end of December, since I had added a new harddrive to my server and accidentally pulled one of my main content folders out of the library sources (which caused a mass delete of content from Plex) and then readded the directories, which caused SQL to have some issues, that one was definitely my fault, but unfortunately the backups prior to that have been purged.
Did some digging, the current db doesn’t have the fts4_metadata_titles_icu table (hence those errors). I started looking at an older table that I thought was corrupt, but ran through the sql checks to see if it was actually corrupt, and it didn’t appear to be, so I made a copy of the current, moved them out with blobs, and linked that old “corrupt” db back in. Ran through the “automatic” command with DBRepair.sh, everything checked out, and started PMS back up.
Have to repopulate about a month of content but initial looks like search is good in plex web and plexamp. So I think i’m good!