Latest PMS update broken? - PMS 1.14.1.5488

Server Version#: Version 1.14.1.5487
Player Version#: Web Client Version 3.79.0

After updating to the latest PMS version this morning, I can’t get the dashboard to load (“There was an unexpected error loading the dashboard”), and my media sections either won’t load at all, or load with no artwork, and items in the sections won’t load (“There was an unexpected error loading this item”). I have tried reinstalling the dpkg, rebooting the machine, and I tried restoring a backup of the PMS db from prior to the update. Based on what I see in the logs, it looks like PMS can’t find half the DB tables:

|Dec 13, 2018 22:56:39.559|ERROR|SQLITE3:0x10, 1, no such table: media_stream_settings|
|---|---|---|
|Dec 13, 2018 22:56:39.559|ERROR|Soci Exception handled: sqlite3_statement_backend::prepare: no such table: media_stream_settings for SQL: select media_items.id as 'media_items_id', media_items.library_section_id as 'media_items_library_section_id', media_items.section_location_id as 'media_items_section_location_id', media_items.metadata_item_id as 'media_items_metadata_item_id', media_items.type_id as 'media_items_type_id', media_items.width as 'media_items_width', media_items.height as 'media_items_height', media_items.size as 'media_items_size', media_items.duration as 'media_items_duration', media_items.bitrate as 'media_items_bitrate', media_items.container as 'media_items_container', media_items.video_codec as 'media_items_video_codec', media_items.audio_codec as 'media_items_audio_codec', media_items.display_aspect_ratio as 'media_items_display_aspect_ratio', media_items.frames_per_second as 'media_items_frames_per_second', media_items.audio_channels as 'media_items_audio_channels', media_items.interlaced as 'media_items_interlaced', media_items.source as 'media_items_source', media_items.hints as 'media_items_hints', media_items.display_offset as 'media_items_display_offset', media_items.settings as 'media_items_settings', media_items.created_at as 'media_items_created_at', media_items.updated_at as 'media_items_updated_at', media_items.optimized_for_streaming as 'media_items_optimized_for_streaming', media_items.deleted_at as 'media_items_deleted_at', media_items.media_analysis_version as 'media_items_media_analysis_version', media_items.sample_aspect_ratio as 'media_items_sample_aspect_ratio', media_items.proxy_type as 'media_items_proxy_type', media_items.extra_data as 'media_items_extra_data', media_items.channel_id as 'media_items_channel_id', media_items.begins_at as 'media_items_begins_at', media_items.ends_at as 'media_items_ends_at',metadata_items.id as 'metadata_items_id', metadata_items.library_section_id as 'metadata_items_library_section_id', metadata_items.parent_id as 'metadata_items_parent_id', metadata_items.metadata_type as 'metadata_items_metadata_type', metadata_items.guid as 'metadata_items_guid', metadata_items.hash as 'metadata_items_hash', metadata_items.media_item_count as 'metadata_items_media_item_count', metadata_items.title as 'metadata_items_title', metadata_items.title_sort as 'metadata_items_title_sort', metadata_items.original_title as 'metadata_items_original_title', metadata_items.studio as 'metadata_items_studio', metadata_items.rating as 'metadata_items_rating', metadata_items.audience_rating as 'metadata_items_audience_rating', metadata_items.rating_count as 'metadata_items_rating_count', metadata_items.tagline as 'metadata_items_tagline', metadata_items.summary as 'metadata_items_summary', metadata_items.content_rating as 'metadata_items_content_rating', metadata_items.content_rating_age as 'metadata_items_content_rating_age', metadata_items.'index' as 'metadata_items_index', metadata_items.absolute_index as 'metadata_items_absolute_index', metadata_items.duration as 'metadata_items_duration', metadata_items.user_thumb_url as 'metadata_items_user_thumb_url', metadata_items.user_art_url as 'metadata_items_user_art_url', metadata_items.user_banner_url as 'metadata_items_user_banner_url', metadata_items.user_music_url as 'metadata_items_user_music_url', metadata_items.user_fields as 'metadata_items_user_fields', metadata_items.originally_available_at as 'metadata_items_originally_available_at', metadata_items.available_at as 'metadata_items_available_at', metadata_items.expires_at as 'metadata_items_expires_at', metadata_items.refreshed_at as 'metadata_items_refreshed_at', metadata_items.year as 'metadata_items_year', metadata_items.added_at as 'metadata_items_added_at', metadata_items.created_at as 'metadata_items_created_at', metadata_items.updated_at as 'metadata_items_updated_at', metadata_items.changed_at as 'metadata_items_changed_at', metadata_items.resources_changed_at as 'metadata_items_resources_changed_at', metadata_items.tags_genre as 'metadata_items_tags_genre', metadata_items.tags_collection as 'metadata_items_tags_collection', metadata_items.tags_director as 'metadata_items_tags_director', metadata_items.tags_writer as 'metadata_items_tags_writer', metadata_items.tags_star as 'metadata_items_tags_star', metadata_items.deleted_at as 'metadata_items_deleted_at', metadata_items.tags_country as 'metadata_items_tags_country', metadata_items.extra_data as 'metadata_items_extra_data',media_parts.id as 'media_parts_id', media_parts.media_item_id as 'media_parts_media_item_id', media_parts.directory_id as 'media_parts_directory_id', media_parts.hash as 'media_parts_hash', media_parts.open_subtitle_hash as 'media_parts_open_subtitle_hash', media_parts.file as 'media_parts_file', media_parts.'index' as 'media_parts_index', media_parts.size as 'media_parts_size', media_parts.duration as 'media_parts_duration', media_parts.created_at as 'media_parts_created_at', media_parts.updated_at as 'media_parts_updated_at', media_parts.deleted_at as 'media_parts_deleted_at', media_parts.extra_data as 'media_parts_extra_data',metadata_item_settings.id as 'metadata_item_settings_id', metadata_item_settings.account_id as 'metadata_item_settings_account_id', metadata_item_settings.guid as 'metadata_item_settings_guid', metadata_item_settings.rating as 'metadata_item_settings_rating', metadata_item_settings.view_offset as 'metadata_item_settings_view_offset', metadata_item_settings.view_count as 'metadata_item_settings_view_count', metadata_item_settings.last_viewed_at as 'metadata_item_settings_last_viewed_at', metadata_item_settings.created_at as 'metadata_item_settings_created_at', metadata_item_settings.updated_at as 'metadata_item_settings_updated_at', metadata_item_settings.skip_count as 'metadata_item_settings_skip_count', metadata_item_settings.last_skipped_at as 'metadata_item_settings_last_skipped_at', metadata_item_settings.extra_data as 'metadata_item_settings_extra_data', metadata_item_settings.changed_at as 'metadata_item_settings_changed_at' ,media_item_settings.id as 'media_item_settings_id', media_item_settings.account_id as 'media_item_settings_account_id', media_item_settings.media_item_id as 'media_item_settings_media_item_id', media_item_settings.settings as 'media_item_settings_settings', media_item_settings.created_at as 'media_item_settings_created_at', media_item_settings.updated_at as 'media_item_settings_updated_at',media_part_settings.id as 'media_part_settings_id', media_part_settings.account_id as 'media_part_settings_account_id', media_part_settings.media_part_id as 'media_part_settings_media_part_id', media_part_settings.selected_audio_stream_id as 'media_part_settings_selected_audio_stream_id', media_part_settings.selected_subtitle_stream_id as 'media_part_settings_selected_subtitle_stream_id', media_part_settings.settings as 'media_part_settings_settings', media_part_settings.created_at as 'media_part_settings_created_at', media_part_settings.updated_at as 'media_part_settings_updated_at', media_part_settings.changed_at as 'media_part_settings_changed_at',media_streams.id as 'media_streams_id', media_streams.stream_type_id as 'media_streams_stream_type_id', media_streams.media_item_id as 'media_streams_media_item_id', media_streams.media_part_id as 'media_streams_media_part_id', media_streams.url as 'media_streams_url', media_streams.'index' as 'media_streams_index', media_streams.codec as 'media_streams_codec', media_streams.language as 'media_streams_language', media_streams.created_at as 'media_streams_created_at', media_streams.updated_at as 'media_streams_updated_at', media_streams.channels as 'media_streams_channels', media_streams.bitrate as 'media_streams_bitrate', media_streams.url_index as 'media_streams_url_index', media_streams.'default' as 'media_streams_default', media_streams.forced as 'media_streams_forced', media_streams.extra_data as 'media_streams_extra_data',media_stream_settings.id as 'media_stream_settings_id', media_stream_settings.account_id as 'media_stream_settings_account_id', media_stream_settings.media_stream_id as 'media_stream_settings_media_stream_id', media_stream_settings.extra_data as 'media_stream_settings_extra_data', media_stream_settings.created_at as 'media_stream_settings_created_at', media_stream_settings.updated_at as 'media_stream_settings_updated_at',grandparents.id as metadata_items_grandparents_id, grandparents.title as metadata_items_grandparents_title, grandparents.user_thumb_url as metadata_items_grandparents_user_thumb_url, grandparents.user_art_url as metadata_items_grandparents_user_art_url, grandparents.user_music_url as metadata_items_grandparents_user_music_url, grandparents.content_rating as metadata_items_grandparents_content_rating,grandparents.updated_at as metadata_items_grandparents_updated_at, grandparents.guid as metadata_items_grandparents_guid, grandparents.extra_data as metadata_items_grandparents_extra_data, parents.user_thumb_url as metadata_items_parents_user_thumb_url,parents.user_art_url as metadata_items_parents_user_art_url,parents.user_music_url as metadata_items_parents_user_music_url,parents.added_at as metadata_items_parents_added_at,parents.updated_at as metadata_items_parents_updated_at,parents.`index` as metadata_items_parents_index, parents.title as metadata_items_parents_title from metadata_items left join media_items on media_items.metadata_item_id=metadata_items.id left join media_parts on media_parts.media_item_id=media_items.id left join metadata_item_settings on metadata_item_settings.guid=metadata_items.guid and metadata_item_settings.account_id=? left join metadata_items as parents on parents.id=metadata_items.parent_id left join metadata_items as grandparents on grandparents.id=parents.parent_id left join media_item_settings on media_item_settings.media_item_id=media_items.id and media_item_settings.account_id=? left join media_part_settings on media_part_settings.media_part_id=media_parts.id and media_part_settings.account_id=? left join media_streams on media_streams.media_part_id=media_parts.id left join media_stream_settings on media_stream_settings.media_stream_id=media_streams.id and media_stream_settings.account_id=? where metadata_items.id=? and (media_streams.extra_data is null or media_streams.extra_data not like '%userID%' or media_streams.extra_data like '%userID=1%') order by media_items.width desc,metadata_items.originally_available_at|

Any ideas?

Update: I tried restoring even older database backups, with no success. Then I downgraded PMS to Version 1.14.0.5470, and even the latest copy of the database works fine. So it looks like there’s definitely something wrong with Version 1.14.1.5487.

1 Like

i’m going offline for the night (0200h here).
I will check in the morning and reply then.

1 Like

Could you PM your Log files and Database?

Grab these from the web app in Settings -> Your Server -> Troubleshooting -> Download Logs/Database.

I had exactly the same experience with the upgrade to 1.41.1, and also found no way to fix it other than reverting to 1.14.0.

It seems like it was having trouble accessing the database? Everything, including description pages gave
error messages of not being able to load.

I have application data path set to a separate HD, and have specified that in the settings. Could this new version be ignoring or misinterpreting this variable?

1 Like

Oh, I forgot. Server is on Windows 10

I cannot help with Windows. I only know Linux. Sorry

If the problem occurs in both linux and windows, it’s apparently not OS related. Something in the general code has changed, and it’s possible that it has to do with the setting for the location of the application data path, and how that variable is used, or interpreted.

The application data path is different for Linux.
How it’s specified is different.

If you read the above, drzoidberg is examining the database. That said, the application data path is valid. PMS would fail to start and find the DB without a valid path.

For what it’s worth - perhaps nothing, but why not mention it - my Plex install on Ubuntu believes its files are in the default location, but actually it’s a symlink to somewhere else.

Thanks for all the hard work you guys to do support Plex, and let me know if I can provide anything else to help.

I just noticed this message, sorry. PM incoming.

Having very similar issues running 1.14.1.5487 pms docker. I tried reverting back to 1.14.0 but still experienced the issue.

I did not get the (“There was an unexpected error loading the dashboard”) error just nothing would populate at times. Very randomly it would display items.

I saw this issue while using the android tv, apple tv 4k, and web clients.

I can PM logs if needed.

1 Like

Thanks, your issue is that the database is corrupted. This causes certain things to fail and will result in the PMS update failing too.

To repair the database take a look at the instructions here: https://support.plex.tv/articles/201100678-repair-a-corrupt-database/

When you’re done with that and verified the database is working you can try the update again.

This is not helpful. If this is true, the update broke the DB and that needs to be admitted and addressed. Why did this update break my DB? It was working PERFECTLY fine before this.

ALSO, the steps you pointed to do not fix the DB at all and in fact, make it LESS functional. After completing the steps that you linked to above, I could no longer even open plex and kept getting an error that plex couldn’t open it’s DB file.

Thank you for your assistance with troubleshooting this. I appreciate your help.

I ran the database check per the instructions at the link you provided, and received the following result:

*** in database main ***
On tree page 76287 cell 10: 2nd reference to page 76916
On tree page 76536 cell 19: 2nd reference to page 76915
Error: database disk image is malformed

I ran the repair based on the instructions, and restarted the plexmediaserver service. After restarting the Plex service, the the media server did not come back online. The status of the service was:

● plexmediaserver.service - Plex Media Server for Linux
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/plexmediaserver.service.d
           └─override.conf
   Active: failed (Result: exit-code) since Tue 2018-12-18 16:22:22 MST; 22s ago
  Process: 1569 ExecStart=/bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Server" (code=exited, status=255)
  Process: 1560 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUP
 Main PID: 1569 (code=exited, status=255)

Dec 18 16:22:17 Rift systemd[1]: plexmediaserver.service: Main process exited, code=exited, status=255/n/a
Dec 18 16:22:17 Rift systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Dec 18 16:22:22 Rift systemd[1]: plexmediaserver.service: Service RestartSec=5s expired, scheduling restart.
Dec 18 16:22:22 Rift systemd[1]: plexmediaserver.service: Scheduled restart job, restart counter is at 3.
Dec 18 16:22:22 Rift systemd[1]: Stopped Plex Media Server for Linux.
Dec 18 16:22:22 Rift systemd[1]: plexmediaserver.service: Start request repeated too quickly.
Dec 18 16:22:22 Rift systemd[1]: plexmediaserver.service: Failed with result 'exit-code'.
Dec 18 16:22:22 Rift systemd[1]: Failed to start Plex Media Server for Linux.

The PMS logs showed the following:

|Dec 18, 2018 16:22:12.453|ERROR|Database corruption: sqlite3_statement_backend::prepare: no such table: schema_migrations for SQL: select version from schema_migrations order by version|
|---|---|---|
|Dec 18, 2018 16:22:12.453|ERROR|Error: Unable to set up server: sqlite3_statement_backend::prepare: no such table: schema_migrations for SQL: select version from schema_migrations order by version (N4soci10soci_errorE)|
|Dec 18, 2018 16:22:12.452|ERROR|SQLITE3:0x10, 1, no such table: schema_migrations|
|Dec 18, 2018 16:22:12.440|INFO|Plex Media Server v1.14.0.5470-9d51fdfaa - ubuntu PC x86_64 - build: linux-ubuntu-x86_64 ubuntu - GMT -07:00|
|Dec 18, 2018 16:22:12.440|INFO|Linux version: 4.18.11-041811-generic (#201809290731 SMP Sat Sep 29 11:33:39 UTC 2018), language: en-US|
|Dec 18, 2018 16:22:12.440|INFO|Processor Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz|
|Dec 18, 2018 16:22:12.440|INFO|/usr/lib/plexmediaserver/Plex Media Server|

For now I have reverted to my pre-repair database backup, and the server starts up fine. Please let me know how I can assist further.

PMS - Version 1.14.1.5488
Ubuntu 18.04.1 LTS
Clicking on “Playlists” Crashes server
Web app on loopback (http://127.0.0.1:32400/web/index.html#)

There are database issues (we’re discovering).

May I have the PMS logs please?

For what its worth I had the same problem, and a repair of the database also made things worse. Digging into my logs I found that it was failing on a query joining to the taggings table due to the disk image being malformed. I ended up fixing my database by performing the steps below to my original database file: (sharing in the hopes that this may help the devs out)

  • Dumping the taggings table to a file
  • Removing any lines involving corruption from the file (used a copy)
  • Dropping the taggings table in the database
  • importing the taggings data back into the database

For whatever reason the data wouldn’t live passed the sqlite3 session, so i dumped the entire database contents and then created a completely new database from that output. My database now passes an integrity check and everything appears to be working as expected.

Note: My server was also not performing automatic backups of the database - presumably due to the corruption, so it may have been corrupt for a very long time

I’ve been running since my last post on my un-repaired database backup, and Plex seems to be operating fine. Do you want these logs, or do you want me to try the database repair again and give you the logs PMS generates when trying to boot up with the “repaired” database?

Your situation seems to mirror mine; Plex has also not been backing up my database for as long as I can remember. I’m afraid I’m not very familiar with database work - would you be able to provide the commands to run to replicate the repairs you performed?