Plex Doesn't Show any titles if I sort by Title

So I have just did a new library for my movies, and plex refuses to Sort by Title for it. I can sort any other way and see all of my stuff, but sort by title says an unexpected error occurred loading the library and stays blank, yet if I add a filter (i.e. genre or something along those lines) it finds all of those perfectly fine. The library is only 350 movies its not massive or anything like that and on my old PC I had it running with well over 1000 easily. I have a TV shows library and that one is just fine, just not the movies. And they are in the same drive and folders right next to each other. I have tried rebooting and deleting the whole library and redoing it but nothing seems to fix it. I even went from the stable release to beta to see if that would help with a new install. Nothing. Any ideas as to what i could try?

Quit Plex Server using the tray icon
Shutdown any other software which may be running in parallel.
wait 2 minutes
start Plex server again.
Wait 2 minutes, don’t try to use the computer for anything during this time.
‘Optimize Database’

wait 2 minutes


If it still doesn’t work afterwards

  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/hc/en-us/articles/201100678-Repair-a-Corrupt-Database

So I had to repair the database through CMD with sqlite and that fixed it. I am not sure what happened but everything is golden now. Thank you so much. That was bugging me like crazy. lol

For anyone going back and stumbling upon this, here is a quick tutorial on how I fixed the issue for me. My issue was on Windows 10

So what I did was the following:

I downloaded sqlite-tools-win32-x86-3230100.zip From the SQLite Download page (in the section titled Precompiled Binaries for Windows)
I then moved the program sqlite3 from the unzipped file into my AppData folder (%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases)
And then when I opened CMD Prompt I ran These lines (just copy and paste)

cd “%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases”

sqlite3 com.plexapp.plugins.library.db .dump > dump.sql

rename com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original

sqlite3 com.plexapp.plugins.library.db < dump.sql

I then went back into my appdata folder and made sure these 2 files weren’t in there:

com.plexapp.plugins.library.db-shm
com.plexapp.plugins.library.db-wal

Now for me, they weren’t but if they were you should just delete them or just move them to another folder out of the whole AppData area as a “backup”.

For current Plex versions, the above procedure is missing 2 commands.
Updated procedure here:

https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library-when-accessing-all-movies-server-bug/237460/24