[FIX] ‘There Was an Unexpected Error Loading this Library’ in Plex

The ‘There Was an Unexpected Error Loading this Library‘ error with Plex Media Player is typically reported to occur in instances where the users are trying to view a certain library section in Plex Web. This problem is mainly reported to occur with Windows computers.

‘There Was an Unexpected Error Loading this Library’ in Plex Media Player

As it turns out, there are several different causes that might end up triggering this particular error code:

  • Unoptimized Plex database – One of the most common causes that will spawn this particular issue is an unoptimized database that is pointing to faulty resources. Fortunately, you can fix this problem easily by performing a database optimization directly from the Server Settings in your Plex account.
  • Incomplete metadata – Another potential instance that will trigger this problem is when the server struggles with inconsistent metadata. This is a little less common than an unoptimized database and can be resolved by refreshing all metadata from your Plex server settings inside your account.
  • Plex server doesn’t have admin access – As it turns out, this problem can also occur in instances where the main server executable doesn’t have the necessary permissions to access all the needed dependencies. In this case, you should be able to fix the problem by forcing the main executable to run with admin access.
  • Interference caused by Adblock or uBlock – If you’re using extensions like Adblock Plus or uBlock, keep in mind that those tend to conflict with locally hosted Plex servers. If this scenario is applicable, you should be able to fix the problem by disabling or uninstalling the problematic extensions.
  • Corrupted Plex database – Under certain circumstances, this problem can also occur due to some kind of corruption originating from your Plex server database. To resolve it, you will need to use an elevated Command Prompt to deploy a series of SQLite3 commands to fix the problem automatically.

Method 1: Performing a Database Optimization

As it turns out, the apparition of this particular error is a telltale sign that your database is in need of optimization. Several affected users have confirmed that they managed to fix this particular issue by optimizing the database that you’re currently encountering the ‘There Was an Unexpected Error Loading this Library‘ error.

If this scenario is applicable, follow the instructions below to start the process of optimizing a database in Plex Media Player:

  1. Access Plex.TV and login with your account by entering the required credentials.
  2. Once you have successfully signed in, use the menu on the left-hand side to click on the action icon related to that server.
  3. Next, from the newly appeared context menu, access the Manage Server menu and click on Optimize Database.
    Optimizing the Plex.TV database
  4. At the final confirmation screen, click Optimize to initiate this procedure, then wait for the operation to complete. Depending on the size of your server, this operation might end up taking several minutes.
    Optimizing the Database
  5. Once the operation is complete, repeat the action that was previously causing the ‘There Was an Unexpected Error Loading this Library‘ error and see if the problem has been resolved.

In case the same problem is still occurring, move down to the next potential fix below.

Method 2: Refreshing all Metadata

Some users that were previously encountered this particular error have successfully managed to fix the problem by refreshing all the relevant metadata associated with your Plex.TV server. This particular fix has been confirmed to work by a lot of affected users.

If you want to deploy this fix on the affected section, follow the instructions below to refresh the relevant metadata:

  1. Start by accessing your Plex.TV account and sign in with your credentials.
  2. Once you are successfully signed in, use the menu on the left to click on the action menu of your particular server.
  3. Next, click on Refresh all metadata, confirm your choice, and wait for the operation to complete.
    Refreshing all metadata in Plex.TV
  4. Once the operation is complete, restart your Plex server and see if the problem is now resolved.

In case you are still encountering the same There Was an Unexpected Error Loading this Library error, move down to the next potential fix below.

Method 3: Running Plex Server with Admin Access

As it turns out, this problem can also occur in instances where the Plex server infrastructure that you installed locally doesn’t have enough permissions to run properly on your machine. This problem is typically reported to occur in instances where there are strict UAC (User Account Control) rules.

If this scenario is applicable, you should be able to fix the problem by running the main Plex executable with admin privileges before relying on the action that was previously causing the error.

To open the Plex executable with admin access, start by navigating to the location. Unless you installed the Plex infrastructure on a custom location, you will be able to find it here:

C:\Program Files (x86)\Plex\Plex Media Server

Once you arrive at the correct location, right-click on the Plex Media Server.exe and thence click on Run as Administrator from the newly appeared context menu.

Running Plex server as an administrator

After you’ve ensured that you have opened the Plex server with admin privileges, repeat the action that was previously causing the “There was an unexpected error loading this library” issue and see if the problem has been resolved.

In case the problem is still occurring, move down to the next potential fix below.

Method 4: Disabling Adblock Plus/ uBlock (if applicable)

If you currently have Adblock Plus or uBlocks plug-ins installed on your browser (Chrome or Firefox), it’s possible that it might conflict with the Plex server that you are hosting locally. If your situation is similar, you will be able to resolve the issue by disabling the plugin while utilizing the Plex services.

Several affected users have confirmed that the “There was an unexpected error loading this library” error has stopped occurring once the Adblock plus or uBlock plugin was disabled.

To disable the Adblock extension on Chrome, type ‘chrome://extensions/’ inside the navigation bar and press Enter to open the Extensions tab. Once inside, scroll down through the list of installed extensions and disable the toggle associated with the AdBlock or uBlock extensions.

Removing or disabling Adblock

Note: On Firefox, type ‘about:addons‘ inside the navigation bar and press Enter to reach the Add-ons screen.

Once the Adblock Plus extension has been uninstalled or disabled, repeat the action that was previously causing the There was an unexpected error loading this item error to see if the problem is now resolved.

In case the same problem is still occurring, move down to the next potential fix below.

Method 5: Repairing the Corrupt Database

If none of the potential fixes above have worked for you, chances are you are dealing with some type of file corruption in your Plex server database. If this scenario is applicable, you should be able to fix the problem by using an elevated Command Prompt to run a series of commands capable of repairing inconsistencies with your Plex database.

Note: Before you initiate this operation, you need to ensure that you have the SQLite3 tools installed on your computer. Without them, the commands below will not work.

Once you meet the requirements to start repairing your potentially corrupt Plex database, follow the instructions below:

  1. Start by ensuring that the Plex Media Server that you’re currently storing locally is shut down.
  2. Open up a Run dialog box by pressing Windows key + R. Inside the text box, type ‘cmd’ and press Ctrl + Shift + Enter to open up an elevated Command Prompt.
    Running Command Prompt

    Note: When you’re prompted by the UAC (User Account Control), click Yes to grant administrative privileges.

  3. Once you’re inside the elevated Command Prompt, type the following commands in order and press Enter after each command to initiate a database repair on your Plex server:
    cd "%LOCALAPPDATA%\Plex Media Server\Plug-in Support\Databases"
    
    copy com.plexapp.plugins.library.db com.plexapp.plugins.library.db.original
    
    sqlite3 com.plexapp.plugins.library.db "DROP index 'index_title_sort_naturalsort'"
    
    sqlite3 com.plexapp.plugins.library.db "DELETE from schema_migrations where version='20180501000000'"
    
    sqlite3 com.plexapp.plugins.library.db .dump > dump.sql
    
    del com.plexapp.plugins.library.db
    
    sqlite3 com.plexapp.plugins.library.db < dump.sql

    Note: If you receive errors while inputting certain commands, don’t worry about them, they are to be expected.

  4. After you manage to input every command, close the elevated Command prompt, and restart your computer.
  5. Once the next startup is complete, open your Plex.TV library and see if the ‘There was an unexpected error loading the dashboard’ error is resolved.

Kevin Arrows


Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

[FIX] ‘There Was an Unexpected Error Loading this Library’ in Plex

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested