# There was an unexpected error loading this library

**URL:** <https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library/711112>\
**Category:** Plex Media Server\
**Tags:** server-linux\
**Created:** [April 22, 2021, 6:34pm UTC](https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library/711112 "2021-04-22T18:34:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![snickers\_1](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/snickers_1/32/91590_2.png) [@snickers\_1](https://forums.plex.tv/u/snickers_1)\
**Post date:** [April 22, 2021, 6:34pm UTC](https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library/711112/1 "2021-04-22T18:34:20Z")

</div>

Server Version#: Version 1.22.2 and 1.22.3.4392 (same problem)  
Player Version#: latest

all of the sudden,  
for my **series section**  
**plex/web** : recommandations tab is gone, while the actual media-tab works (Home has no “Series” entry anymore). continue watching still shows Series-entries  
**androidtv:** the whole section is gone - says add media (while landingpage items still working in continue watching)

where an items shows up, it has metadata and is playable … O\_o

optimized database, rebooted, still nothing  
is this the “beta” in Plex-Series-Scanner(beta) ?

[PLEX.zip](https://forums.plex.tv/uploads/short-url/p4kMnE7XxHdXUL11aRFKXzS4Vgd.zip) (6.0 MB)

everything else works … except downloading logs results in " 500 Internal Server Error"

Anime Section (also plex-series-scanner(beta), is fully working on all devices …

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [April 22, 2021, 6:50pm UTC](https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library/711112/2 "2021-04-22T18:50:17Z")

</div>

A few feature flags got flipped today. Some things changed for the Home screen.

Some steps to try, easiest first:

- force-reload the web app (Shift+F5), make sure to use the hosted one [http://app.plex.tv](http://app.plex.tv)
- restart the server
- make sure the affected library has been pinned to the side bar
- edit the affected library, go to the ‘Advanced’ tab and toggle the ‘Visibility’ preference back and forth
- go to Settings - Server - Manage - Libraries  
and unfold the affected library and “Reset Customizations” there  
 ![grafik](https://global.discourse-cdn.com/plex/original/3X/9/d/9dcc175552259d716fa741d0d79c3d91ca350bd5.jpeg)

---

<div class="post-metadata">

**Author:** ![snickers\_1](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/snickers_1/32/91590_2.png) [@snickers\_1](https://forums.plex.tv/u/snickers_1)\
**Post date:** [April 22, 2021, 7:02pm UTC](https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library/711112/3 "2021-04-22T19:02:13Z")

</div>

thank you

yeah seems it was a bad idea to change the Agent a few days ago …

saving that options (visibility) gave an “error saving changes”.  
but somehow the Series section had recommandations on plex/web again. but now the movie section does not show up anymore and is loading forever 😕

seems there is pretty bad stuff going on with my database ☹  
optimizing the database again takes extremely long

okay… everything in settings loads forever too… restarting…

---

<div class="post-metadata">

**Author:** ![snickers\_1](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/snickers_1/32/91590_2.png) [@snickers\_1](https://forums.plex.tv/u/snickers_1)\
**Post date:** [April 22, 2021, 7:36pm UTC](https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library/711112/4 "2021-04-22T19:36:05Z")

</div>

so i restarted pms (again), deleted old packages (again), and hit optimize database (again). this takes now for 20mins+ without the circle moving, while “server settings not accessible” …

restarted (took also long),

only error that came up in console was

```auto
SQLITE3:(nil), 13, statement aborts at 38: [select distinct metadata_items.id as 'id', parents.id as 'parent_id', grandparents.id as 'grandparent_id', metadata_items.added_at as 'added_at', metadata_items.library_section_id as '

```

anyway to rebuild database without rebuilding the whole library ?

---

<div class="post-metadata">

**Author:** ![OttoKerner](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/ottokerner/32/10079_2.png) [@OttoKerner](https://forums.plex.tv/u/OttoKerner)\
**Post date:** [April 22, 2021, 8:03pm UTC](https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library/711112/5 "2021-04-22T20:03:29Z")

</div>

That’s not exactly an error. You will see that kind of msgs immediately on the first start after a server software update.  
If you see it on every start however, you might have a damaged database.

Unfortunately repairing is currently a bit complicated. If you’re not shy of the command line, you might wanna take a look at [Upgrades above 1.22.0 corrupting database](https://forums.plex.tv/t/upgrades-above-1-22-0-corrupting-database/708723)

---

<div class="post-metadata">

**Author:** ![snickers\_1](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/snickers_1/32/91590_2.png) [@snickers\_1](https://forums.plex.tv/u/snickers_1)\
**Post date:** [April 22, 2021, 8:07pm UTC](https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library/711112/6 "2021-04-22T20:07:36Z")

</div>

cli is fine. i’ll take a look. thank you

---

<div class="post-metadata">

**Author:** ![snickers\_1](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/snickers_1/32/91590_2.png) [@snickers\_1](https://forums.plex.tv/u/snickers_1)\
**Post date:** [April 22, 2021, 9:10pm UTC](https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library/711112/7 "2021-04-22T21:10:40Z")

</div>

that topic is a lot of noise…  
so i tried [Repair a Corrupt Database | Plex Support](https://support.plex.tv/articles/201100678-repair-a-corrupt-database/)

and now the server isn’t starting anymore … boy … a sophisticated , working guide would be nice

changing an agent in plex is horrible… really annoying… for years

---

<div class="post-metadata">

**Author:** ![snickers\_1](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/snickers_1/32/91590_2.png) [@snickers\_1](https://forums.plex.tv/u/snickers_1)\
**Post date:** [April 22, 2021, 9:41pm UTC](https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library/711112/8 "2021-04-22T21:41:01Z")

</div>

so i guess i have to reinstall a complete backup ?

---

<div class="post-metadata">

**Author:** ![snickers\_1](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/snickers_1/32/91590_2.png) [@snickers\_1](https://forums.plex.tv/u/snickers_1)\
**Post date:** [April 22, 2021, 11:13pm UTC](https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library/711112/9 "2021-04-22T23:13:19Z")

</div>

okay… installing backup… thanks for nothing … and please fix your still pretty broken product before adding more nonsense like the last couple of years … this must be like the 5th time the db was broken for me

and boy, fix/upgrade your (not working) guides …

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [July 21, 2021, 11:13pm UTC](https://forums.plex.tv/t/there-was-an-unexpected-error-loading-this-library/711112/10 "2021-07-21T23:13:50Z")

</div>

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