iOS and Apple TV - "Couldn't retrieve play queue for this item" under specific circumstances

Server Version#: Version 1.21.1.3830
Player Version#: 7.11 (iOS) and TVos downloaded on 1/1/2021
My Plex server is on a Ubuntu Server version 20.04.1 LTS.

I getting the “Couldn’t retrieve play queue for this item. Please try again.” error on most of my recently uploaded home videos in a very specific situation on Apple TV Plex app and iOS Plex app.

  • I created a Photos Library to store my home videos.
  • I created sub-folders for each calendar year to do some library management as all videos are not accurately meta-date tagged. I wanted to be able to view in Library mode, select a folder year, and view videos from that year.
  • My first few uploads worked fine.
  • I recently added another 50 or so videos and most of them are having this issue (maybe 70%?).
  • They all play no problem via the Windows 10 app.
  • They all play no problem in the Apple TV and iOS app IF I launch them from the “Recommended”, “Timeline” or in the Library view with “Albums” selected from the drop down.
  • 70% or more of them DO NOT play when in Library view and Photos is selected from the filter/drop down. I can see the list of directories/folders I created for each year. I open the folder for 2019, and I can see all the files. I click on one and the error in the Apple TV app, or the iOS app is:

“Couldn’t retrieve play queue for this item. Please try again.”

When I watch the Plex console to view the log as I click each time this error shows:
TimeJan 03, 2021 04:55:02.727
LevelError
Thread0x7f5de9feb700
MessageLPE: invalid url: library://x/directory/

Also, the error is consistent per file. The few files that work, work every time. The ones that don’t fail in the exact same way every time.

What I have done so far:

  • Read a bunch of forum topics of people having similar/related issues that are unresolved.
  • Ran optimize database.
  • Ran clean bundles.
  • Restarted plex server, iOS app (killed and restarted), and Apple TV reboot.
  • In Plex server settings went to Network section, under “Secure connections” and selected “Required, Preferred, Disabled” and saved each time and tested with same results. (this was listed in a few forum posts as a possible solution).
  • Normalized my Linux file ownership and group settings to be owned by plex user, plex group, and chmod to 775 on the files. It’s important to note that the working and non-working video files already had the same file properties.
  • Also important to note that the working and non-working files came from the same repording device, same day, same encoding, etc. (for example, two different dance routines from the same competition on the same day). They were uploaded to plex in via the same file copy.
  • Files are being copied from a Windows 10 desktop to the Plex folder via a Samba share. Again, both working and non-working files done via the same drag-n-drop copy.

AM Update: This console/log item shows up consistently. At first glance it looks like the “PlayQueue” routine is converting the long form URL for the specific video to a tiny URL but making it generic, resulting in the invalid URL error above ( MessageLPE: invalid XXX: library://x/directory/)

Message
PlayQueue: Converted ‘server://1833ab33bd68622768f5b81e46d345f46cf6a8c8/com.plexapp.plugins.library57251’ to ‘library://x/directory/’

Also, this is showing up when I am clicking into the home movies library.
Message
Unknown metadata type: folder

Here’s the log sequence when I use my iPhone (IP 192.168.0.224) to try and play one of the suspect videos:

Jan 03, 2021 15:56:28.841 [0x7fe429e74700] Debug — Auth: authenticated user 1 as jesseandjodi@gmail.com
Jan 03, 2021 15:56:28.841 [0x7fe4227fc700] Debug — Request: [192.168.0.224:61163 (Subnet)] POST /playQueues?continuous=0&includeExternalMedia=1&includeLoudnessRamps=1&key=%2Flibrary%2Fmetadata%2F57257&recursive=0&shuffle=0&type=photo&uri=server%3A%2F%2F1833ab33bd68622768f5b81e46d345f46cf6a8c8%2Fcom.plexapp.plugins.library57251 (10 live) TLS GZIP Signed-in Token (jesseandjodi@gmail.com)
Jan 03, 2021 15:56:28.841 [0x7fe4227fc700] Debug — PlayQueue: Converted 'server://1833ab33bd68622768f5b81e46d345f46cf6a8c8/com.plexapp.plugins.library57251' to 'library://x/directory/'
Jan 03, 2021 15:56:28.841 [0x7fe4227fc700] Debug — Request: [192.168.0.224:61163 (Subnet)] POST /playQueues?continuous=0&includeExternalMedia=1&includeLoudnessRamps=1&key=%2Flibrary%2Fmetadata%2F57257&recursive=0&shuffle=0&type=photo&uri=server%3A%2F%2F1833ab33bd68622768f5b81e46d345f46cf6a8c8%2Fcom.plexapp.plugins.library57251 (10 live) TLS GZIP Signed-in Token (jesseandjodi@gmail.com)
Jan 03, 2021 15:56:28.841 [0x7fe4227fc700] Debug — PlayQueue: Converted 'server://1833ab33bd68622768f5b81e46d345f46cf6a8c8/com.plexapp.plugins.library57251' to 'library://x/directory/'
Jan 03, 2021 15:56:28.842 [0x7fe4227fc700] Debug — PlayQueue: 0 generated IDs compressed down to a 20 byte blob.
Jan 03, 2021 15:56:28.842 [0x7fe4227fc700] Debug — PlayQueue: 0 generated IDs compressed down to a 20 byte blob.
Jan 03, 2021 15:56:28.843 [0x7fe4227fc700] Error — LPE: invalid XXX: library://x/directory/
Jan 03, 2021 15:56:28.845 [0x7fe4227fc700] Debug — PlayQueue: Start index: 0 End index: -1 Count: 0
Jan 03, 2021 15:56:28.846 [0x7fe4227fc700] Debug — PlayQueue: 0 generated IDs compressed down to a 20 byte blob.
Jan 03, 2021 15:56:28.850 [0x7fe429e74700] Debug — Completed: [192.168.0.224:61163] 200 POST /playQueues?continuous=0&includeExternalMedia=1&includeLoudnessRamps=1&key=%2Flibrary%2Fmetadata%2F57257&recursive=0&shuffle=0&type=photo&uri=server%3A%2F%2F1833ab33bd68622768f5b81e46d345f46cf6a8c8%2Fcom.plexapp.plugins.library57251 (10 live) TLS GZIP 8ms 536 bytes (pipelined: 6)
Jan 03, 2021 15:56:28.843 [0x7fe4227fc700] Error — LPE: invalid XXX: library://x/directory/

Note, in the above log sequence I replaced URL: with XXX: due to the “new user can only post 2 links” error. That was before I figured out the preformatted code/text button so I could post the log. Forgot to change back. Otherwise the log entries are untouched.

The (far) below is the console/log snippet from a successful play of my test video. It is the same video I am testing with in the above attempts. It has metadata tag (whatever this means) 57257. Again, this plays successfully when I am viewing the library in the “Library” view (vs. Recommended or Timeline) and I have “Albums” selected in the upper left drop down (vs. Photos).

You can see in logging below that the “PlayQueue: Converted” line shows a successful non-generic URL converstion including the specific metatag (57257). You’ll note in the errors above the conversion is to ‘library://x/directory/’ whereas below the conversion is to ‘library://x/item/%2Flibrary%2Fmetadata%2F57257’.

I’m guessing here, but this appears to be the sequence that happens after you select/touch the video you want and it jumps to the full screen where you then push the play icon in the middle to start playing. In essence, it’s taking the display of the videos in a list, converting the selection to a playable URL.

My bet is the problem is occuring because the folder heirarchy I have created in the library for my home videos (a “photos” library) isn’t getting recognized properly (the error ‘Unknown metadata type: folder’ above must be related) and when the PlayQueue URL conversion happens it can’t pass the proper variables for the media due to not recognizing the photo structure?

Again, this snippet is the successful play…

Jan 03, 2021 16:16:11.005 [0x7fe429e74700] Debug — Auth: authenticated user 1 as jesseandjodi@gmail.com
Jan 03, 2021 16:16:11.005 [0x7fe429e74700] Debug — Auth: authenticated user 1 as jesseandjodi@gmail.com
Jan 03, 2021 16:16:11.006 [0x7fe3dafed700] Debug — Request: [192.168.0.224:61335 (Subnet)] POST /playQueues?continuous=0&includeExternalMedia=1&includeLoudnessRamps=1&recursive=0&shuffle=0&type=photo&uri=server%3A%2F%2F1833ab33bd68622768f5b81e46d345f46cf6a8c8%2Fcom.plexapp.plugins.library%2Flibrary%2Fmetadata%2F57257 (22 live) TLS GZIP Signed-in Token (jesseandjodi@gmail.com)
Jan 03, 2021 16:16:11.006 [0x7fe3dafed700] Debug — PlayQueue: Converted 'server://1833ab33bd68622768f5b81e46d345f46cf6a8c8/com.plexapp.plugins.library/library/metadata/57257' to 'library://x/item/%2Flibrary%2Fmetadata%2F57257'
Jan 03, 2021 16:16:11.006 [0x7fe3dafed700] Debug — Request: [192.168.0.224:61335 (Subnet)] POST /playQueues?continuous=0&includeExternalMedia=1&includeLoudnessRamps=1&recursive=0&shuffle=0&type=photo&uri=server%3A%2F%2F1833ab33bd68622768f5b81e46d345f46cf6a8c8%2Fcom.plexapp.plugins.library%2Flibrary%2Fmetadata%2F57257 (22 live) TLS GZIP Signed-in Token (jesseandjodi@gmail.com)
Jan 03, 2021 16:16:11.006 [0x7fe3dafed700] Debug — PlayQueue: Converted 'server://1833ab33bd68622768f5b81e46d345f46cf6a8c8/com.plexapp.plugins.library/library/metadata/57257' to 'library://x/item/%2Flibrary%2Fmetadata%2F57257'
Jan 03, 2021 16:16:11.007 [0x7fe3dafed700] Debug — PlayQueue: 0 generated IDs compressed down to a 20 byte blob.
Jan 03, 2021 16:16:11.007 [0x7fe3dafed700] Debug — PlayQueue: 0 generated IDs compressed down to a 20 byte blob.
Jan 03, 2021 16:16:11.012 [0x7fe3dafed700] Debug — PlayQueue: Start index: 0 End index: 0 Count: 1
Jan 03, 2021 16:16:11.012 [0x7fe3dafed700] Debug — PlayQueue: 1 generated IDs compressed down to a 24 byte blob.
Jan 03, 2021 16:16:11.013 [0x7fe3dafed700] Debug — PlayQueue: Added 1 items in 0.0 sec.
Jan 03, 2021 16:16:11.017 [0x7fe3dafed700] Debug — We're going to try to auto-select an audio stream for account 1.
Jan 03, 2021 16:16:11.017 [0x7fe3dafed700] Debug — Selecting best audio stream for part ID 53727 (autoselect: 0 language: en)
Jan 03, 2021 16:16:11.017 [0x7fe3dafed700] Debug — Audio Stream: 77150, Subtitle Stream: -1
Jan 03, 2021 16:16:11.012 [0x7fe3dafed700] Debug — PlayQueue: Start index: 0 End index: 0 Count: 1
Jan 03, 2021 16:16:11.012 [0x7fe3dafed700] Debug — PlayQueue: 1 generated IDs compressed down to a 24 byte blob.
Jan 03, 2021 16:16:11.013 [0x7fe3dafed700] Debug — PlayQueue: Added 1 items in 0.0 sec.
Jan 03, 2021 16:16:11.017 [0x7fe3dafed700] Debug — We're going to try to auto-select an audio stream for account 1.
Jan 03, 2021 16:16:11.017 [0x7fe3dafed700] Debug — Selecting best audio stream for part ID 53727 (autoselect: 0 language: en)
Jan 03, 2021 16:16:11.017 [0x7fe3dafed700] Debug — Audio Stream: 77150, Subtitle Stream: -1
Jan 03, 2021 16:16:11.017 [0x7fe429e74700] Debug — Completed: [192.168.0.224:61335] 200 POST /playQueues?continuous=0&includeExternalMedia=1&includeLoudnessRamps=1&recursive=0&shuffle=0&type=photo&uri=server%3A%2F%2F1833ab33bd68622768f5b81e46d345f46cf6a8c8%2Fcom.plexapp.plugins.library%2Flibrary%2Fmetadata%2F57257 (22 live) TLS GZIP 11ms 1460 bytes (pipelined: 9)
Jan 03, 2021 16:16:11.017 [0x7fe429e74700] Debug — Completed: [192.168.0.224:61335] 200 POST /playQueues?continuous=0&includeExternalMedia=1&includeLoudnessRamps=1&recursive=0&shuffle=0&type=photo&uri=server%3A%2F%2F1833ab33bd68622768f5b81e46d345f46cf6a8c8%2Fcom.plexapp.plugins.library%2Flibrary%2Fmetadata%2F57257 (22 live) TLS GZIP 11ms 1460 bytes (pipelined: 9)
Jan 03, 2021 16:16:11.051 [0x7fe429673700] Debug — Auth: authenticated user 1 as jesseandjodi@gmail.com
Jan 03, 2021 16:16:11.051 [0x7fe3d7fe7700] Debug — Request: [192.168.0.224:61335 (Subnet)] GET /:/timeline?bufferedTime=0&duration=0&key=%2Flibrary%2Fmetadata%2F57257&location=lan&playQueueItemID=2445&playbackTime=20867&ratingKey=57257&state=playing&time=0 (22 live) TLS GZIP Signed-in Token (jesseandjodi@gmail.com)
Jan 03, 2021 16:16:11.051 [0x7fe429673700] Debug — Auth: authenticated user 1 as jesseandjodi@gmail.com
Jan 03, 2021 16:16:11.051 [0x7fe3d7fe7700] Debug — Request: [192.168.0.224:61335 (Subnet)] GET /:/timeline?bufferedTime=0&duration=0&key=%2Flibrary%2Fmetadata%2F57257&location=lan&playQueueItemID=2445&playbackTime=20867&ratingKey=57257&state=playing&time=0 (22 live) TLS GZIP Signed-in Token (jesseandjodi@gmail.com)
Jan 03, 2021 16:16:11.052 [0x7fe3d7fe7700] Debug — Client [093BF2B7-352F-4913-BFF6-9629276B8E77] reporting timeline state playing, progress of 0/0ms for guid=, playbackTime=20867ms ratingKey=57257 url=, key=/library/metadata/57257, containerKey=, metadataId=57257, source=
Jan 03, 2021 16:16:11.052 [0x7fe3d7fe7700] Debug — [Now] User is jesseandjodi@gmail.com (ID: 1)
Jan 03, 2021 16:16:11.052 [0x7fe3d7fe7700] Debug — [Now] Device is iOS (Jesse’s iPhone).
Jan 03, 2021 16:16:11.052 [0x7fe3d7fe7700] Debug — [Now] Profile is iOS
Jan 03, 2021 16:16:11.052 [0x7fe3d7fe7700] Debug — [Now] Updated play state for /library/metadata/57257.
Jan 03, 2021 16:16:11.052 [0x7fe3d7fe7700] Debug — Statistics: (093BF2B7-352F-4913-BFF6-9629276B8E77) Reporting active playback in state 0 of type 13 (scrobble: 0) for account 1
Jan 03, 2021 16:16:11.053 [0x7fe429e74700] Debug — Auth: authenticated user 1 as jesseandjodi@gmail.com
Jan 03, 2021 16:16:11.053 [0x7fe3eaffd700] Debug — Request: [192.168.0.224:61336 (Subnet)] GET /library/metadata/57257?asyncAugmentMetadata=0&checkFiles=1&includeChapters=1&includeConcerts=1&includeExternalMedia=1&includeExternalMetadata=1&includeExtras=1&includeGeolocation=1&includeMarkers=1&includeMeta=1&includeOnDeck=1&includePlexLinks=1&includePopularLeaves=1&includePreferences=0&includeRelated=0&includeRelatedCount=15&includeReviews=1 (22 live) TLS GZIP Signed-in Token (jesseandjodi@gmail.com)
Jan 03, 2021 16:16:11.054 [0x7fe429e74700] Debug — Auth: authenticated user 1 as jesseandjodi@gmail.com
Jan 03, 2021 16:16:11.055 [0x7fe429e74700] Debug — Auth: authenticated user 1 as jesseandjodi@gmail.com
Jan 03, 2021 16:16:11.055 [0x7fe3e17fa700] Debug — Request: [192.168.0.224:61337 (Subnet)] GET /library/metadata/57257?

This is a successful play of the same video I have used above from the same iPhone. The only difference is I am viewing the library in “Library” mode (vs. Recommended or Timeline) and the upper left sorting/filtering drop down is selected to Albums. Always plays correctly when Albums is selected, never when “Photos” is selected.

Jan 03, 2021 16:16:11.005 [0x7fe429e74700] Debug — Auth: authenticated user 1 as jesseandjodi@gmail.com
Jan 03, 2021 16:16:11.005 [0x7fe429e74700] Debug — Auth: authenticated user 1 as jesseandjodi@gmail.com
Jan 03, 2021 16:16:11.006 [0x7fe3dafed700] Debug — Request: [192.168.0.224:61335 (Subnet)] POST /playQueues?continuous=0&includeExternalMedia=1&includeLoudnessRamps=1&recursive=0&shuffle=0&type=photo&uri=server%3A%2F%2F1833ab33bd68622768f5b81e46d345f46cf6a8c8%2Fcom.plexapp.plugins.library%2Flibrary%2Fmetadata%2F57257 (22 live) TLS GZIP Signed-in Token (jesseandjodi@gmail.com)
Jan 03, 2021 16:16:11.006 [0x7fe3dafed700] Debug — PlayQueue: Converted 'server://1833ab33bd68622768f5b81e46d345f46cf6a8c8/com.plexapp.plugins.library/library/metadata/57257' to 'library://x/item/%2Flibrary%2Fmetadata%2F57257'
Jan 03, 2021 16:16:11.006 [0x7fe3dafed700] Debug — Request: [192.168.0.224:61335 (Subnet)] POST /playQueues?continuous=0&includeExternalMedia=1&includeLoudnessRamps=1&recursive=0&shuffle=0&type=photo&uri=server%3A%2F%2F1833ab33bd68622768f5b81e46d345f46cf6a8c8%2Fcom.plexapp.plugins.library%2Flibrary%2Fmetadata%2F57257 (22 live) TLS GZIP Signed-in Token (jesseandjodi@gmail.com)
Jan 03, 2021 16:16:11.006 [0x7fe3dafed700] Debug — PlayQueue: Converted 'server://1833ab33bd68622768f5b81e46d345f46cf6a8c8/com.plexapp.plugins.library/library/metadata/57257' to 'library://x/item/%2Flibrary%2Fmetadata%2F57257'
Jan 03, 2021 16:16:11.007 [0x7fe3dafed700] Debug — PlayQueue: 0 generated IDs compressed down to a 20 byte blob.
Jan 03, 2021 16:16:11.007 [0x7fe3dafed700] Debug — PlayQueue: 0 generated IDs compressed down to a 20 byte blob.
Jan 03, 2021 16:16:11.012 [0x7fe3dafed700] Debug — PlayQueue: Start index: 0 End index: 0 Count: 1
Jan 03, 2021 16:16:11.012 [0x7fe3dafed700] Debug — PlayQueue: 1 generated IDs compressed down to a 24 byte blob.
Jan 03, 2021 16:16:11.013 [0x7fe3dafed700] Debug — PlayQueue: Added 1 items in 0.0 sec.
Jan 03, 2021 16:16:11.017 [0x7fe3dafed700] Debug — We're going to try to auto-select an audio stream for account 1.
Jan 03, 2021 16:16:11.017 [0x7fe3dafed700] Debug — Selecting best audio stream for part ID 53727 (autoselect: 0 language: en)
Jan 03, 2021 16:16:11.017 [0x7fe3dafed700] Debug — Audio Stream: 77150, Subtitle Stream: -1
Jan 03, 2021 16:16:11.012 [0x7fe3dafed700] Debug — PlayQueue: Start index: 0 End index: 0 Count: 1
Jan 03, 2021 16:16:11.012 [0x7fe3dafed700] Debug — PlayQueue: 1 generated IDs compressed down to a 24 byte blob.
Jan 03, 2021 16:16:11.013 [0x7fe3dafed700] Debug — PlayQueue: Added 1 items in 0.0 sec.
Jan 03, 2021 16:16:11.017 [0x7fe3dafed700] Debug — We're going to try to auto-select an audio stream for account 1.
Jan 03, 2021 16:16:11.017 [0x7fe3dafed700] Debug — Selecting best audio stream for part ID 53727 (autoselect: 0 language: en)
Jan 03, 2021 16:16:11.017 [0x7fe3dafed700] Debug — Audio Stream: 77150, Subtitle Stream: -1
Jan 03, 2021 16:16:11.017 [0x7fe429e74700] Debug — Completed: [192.168.0.224:61335] 200 POST /playQueues?continuous=0&includeExternalMedia=1&includeLoudnessRamps=1&recursive=0&shuffle=0&type=photo&uri=server%3A%2F%2F1833ab33bd68622768f5b81e46d345f46cf6a8c8%2Fcom.plexapp.plugins.library%2Flibrary%2Fmetadata%2F57257 (22 live) TLS GZIP 11ms 1460 bytes (pipelined: 9)
1 Like

Based on watching these logs and testing here is my guess as to what is happening. A developer should look at this.

  • I am using a Photos library (when I created the library) to store home videos. I did this because I wanted to be able to create a folder based heirarchy for years of my home videos that don’t have proper date/created meta-tags. I didn’t like the “other videos” library format and it didn’t let me create folders.
  • The error “Unknown metadata type: folder” is showing up in my logs, likely as a result of these folders.
  • When attempting to play from iOS/tvOS devices, the PlayQueue URL conversion process is creating generic URLs to initiate the play sequence ONLY when viewing the Library in Library mode with “Photos” selected in the drop down menu in the upper left. (see below)
    ‘server://1833ab33bd68622768f5b81e46d345f46cf6a8c8/com.plexapp.plugins.library57251’ to ‘library://x/directory/’ <---- generic URL
  • The PlayQueue URL conversion process works fine with the same video file from iOS and tvOS devices when the upper left menu is selected to “Albums”. (see below)
    Jan 03, 2021 16:16:11.006 [0x7fe3dafed700] Debug — PlayQueue: Converted ‘server://1833ab33bd68622768f5b81e46d345f46cf6a8c8/com.plexapp.plugins.library/library/metadata/57257’ to ‘library://x/item/%2Flibrary%2Fmetadata%2F57257’

Developer Solution Summary/Guess
It seems like the PlayQueue runtime/process/request on iOS and tvOS clients is not parsing and converting the data due to the folders being in there. Code tweak to parsing on that request maybe?

1 Like

Great investigative work! Hopefully this will help the Plex devs figure out the issue.

When are you planning to fix this bug on iOS??? I cannot play videos from photo library on iPhone and that was the only reason I bought lifetime pass.

1 Like

I have just verified that by doing ZERO of the cleaning / optimizing / rebuilding and just changing from Library view to Album view, we were all able to then see the videos - then changing back to library view those same videos errored out again: LPE: invalid url: library://x/directory/ - definitely is related to Library view on iOS (ipads, iphones both tested on a variety of iOS 14.X versions.)

I have this same issue but it is with all Movies, TV shows, and any video in my Plex App on iOS. Everything plays fine from Android, and Web player.

Strangely, if I download the movie to the device, I am able to download and play all movies offline…

I’ve been looking at a number of threads reporting this same issue. It does not appear that Plex has acknowledged this as an issue yet. I just created a new Library for Photos and this bug is affecting all videos stored in this new library.

Edit: I finally found a thread where it is acknowledged by Plex. From what I can tell this has been an known and reported issue off and on for more than 3 years, but more recently has started affecting more users. I’m surprised it has been so long without a fix…hopefully they can actually fix this.

Sucks so much that I paid for a product and I’m unable to use it. I really wish this issue gets fixed. It has been like this for 6+ months for me personally.

Same, annoying they don’t seem to be doing anything about it.

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