question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't cast from certain servers

See original GitHub issue

When I cast media stored on a specific plex server and try to play something, Plex says “Playback Error. An error occurred trying to play this item.” for all media on that server. I don’t have this issue on other servers. The log looks like this:

2021-03-13 20:14:12,182 [    INFO] conf: Loaded settings from json: /home/aziz/.config/plex-mpv-shim/conf.json
2021-03-13 20:14:12,374 [    INFO] player: Using libmpv1 playback backend.
2021-03-13 20:14:12,381 [   ERROR] menu: Could not load profile manager.
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/plex_mpv_shim/menu.py", line 63, in __init__
    profile_manager = VideoProfileManager(self, playerManager)
  File "/usr/lib/python3.9/site-packages/plex_mpv_shim/video_profile.py", line 24, in __init__
    self.load_shader_pack()
  File "/usr/lib/python3.9/site-packages/plex_mpv_shim/video_profile.py", line 36, in load_shader_pack
    raise FileNotFoundError("Could not find default shader pack.")
FileNotFoundError: Could not find default shader pack.
2021-03-13 20:14:12,404 [    INFO] root: Started GDM service
2021-03-13 20:14:12,404 [    INFO] client: Started HTTP server
2021-03-13 20:14:12,420 [   DEBUG] PIL.PngImagePlugin: STREAM b'IHDR' 16 13
2021-03-13 20:14:12,421 [   DEBUG] PIL.PngImagePlugin: STREAM b'zTXt' 41 1315
2021-03-13 20:14:12,421 [   DEBUG] PIL.PngImagePlugin: STREAM b'bKGD' 1368 6
2021-03-13 20:14:12,421 [   DEBUG] PIL.PngImagePlugin: b'bKGD' 1368 6 (unknown)
2021-03-13 20:14:12,421 [   DEBUG] PIL.PngImagePlugin: STREAM b'pHYs' 1386 9
2021-03-13 20:14:12,421 [   DEBUG] PIL.PngImagePlugin: STREAM b'tIME' 1407 7
2021-03-13 20:14:12,421 [   DEBUG] PIL.PngImagePlugin: b'tIME' 1407 7 (unknown)
2021-03-13 20:14:12,421 [   DEBUG] PIL.PngImagePlugin: STREAM b'IDAT' 1426 612
2021-03-13 20:14:17,607 [   DEBUG] client: HttpHandler::handle_request request from 'fractal' to '/player/timeline/poll?commandID=0'
2021-03-13 20:14:17,607 [   DEBUG] subscribers: RemoteSubscriberManager::addSubscriber added  [asdfasdfasdfasdfasdfasdf]
2021-03-13 20:14:17,619 [   DEBUG] client: HttpHandler::handle_request request from 'fractal' to '/player/timeline/poll?commandID=0&wait=1'
2021-03-13 20:14:17,619 [   DEBUG] subscribers: RemoteSubscriberManager::addSubscriber refreshed asdfasdfasdfasdfasdfasdf
2021-03-13 20:14:17,619 [   DEBUG] subscribers: RemoteSubscriber::refresh asdfasdfasdfasdfasdfasdf (cid=0)
2021-03-13 20:14:30,479 [   DEBUG] client: HttpHandler::handle_request request from 'fractal' to '/player/playback/playMedia?providerIdentifier=com.plexapp.plugins.library&protocol=http&containerKey=%2FplayQueues%2F80%3Fown%3D1&address=1.1.1.1&port=42452&token=REDACTED&key=%2Flibrary%2Fmetadata%2F528537&offset=0&machineIdentifier=asdfasdfasdfasdfasdfasdf&type=video&commandID=1'
----------------------------------------
Exception occurred during processing of request from ('10.0.0.100', 57978)
Traceback (most recent call last):
  File "/usr/lib/python3.9/socketserver.py", line 650, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python3.9/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python3.9/http/server.py", line 653, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/lib/python3.9/socketserver.py", line 720, in __init__
    self.handle()
  File "/usr/lib/python3.9/http/server.py", line 427, in handle
    self.handle_one_request()
  File "/usr/lib/python3.9/http/server.py", line 415, in handle_one_request
    method()
  File "/usr/lib/python3.9/site-packages/plex_mpv_shim/client.py", line 197, in do_GET
    self.handle_request("GET")
  File "/usr/lib/python3.9/site-packages/plex_mpv_shim/client.py", line 175, in handle_request
    getattr(self, handler)(path, query)
  File "/usr/lib/python3.9/site-packages/plex_mpv_shim/client.py", line 309, in playMedia
    media = Media(url, play_queue=playQueue)
  File "/usr/lib/python3.9/site-packages/plex_mpv_shim/media.py", line 466, in __init__
    XMLCollection.__init__(self, url)
  File "/usr/lib/python3.9/site-packages/plex_mpv_shim/media.py", line 448, in __init__
    self.tree       = et.parse(urllib.request.urlopen(get_plex_url(url)))
  File "/usr/lib/python3.9/site-packages/plex_mpv_shim/utils.py", line 81, in get_plex_url
    raise ValueError("HTTP is not enabled in the configuration.")
ValueError: HTTP is not enabled in the configuration.
----------------------------------------
2021-03-13 20:14:32,867 [   DEBUG] client: HttpHandler::handle_request request from 'fractal' to '/player/playback/stop?commandID=2'
2021-03-13 20:14:32,867 [   DEBUG] timeline: TimelineManager::SendTimelineToSubscribers updating all subscribers
2021-03-13 20:14:32,880 [   DEBUG] client: HttpHandler::handle_request request from 'fractal' to '/player/timeline/poll?commandID=2&wait=1'
2021-03-13 20:14:32,880 [   DEBUG] subscribers: RemoteSubscriberManager::addSubscriber refreshed asdfasdfasdfasdfasdfasdf
2021-03-13 20:14:32,880 [   DEBUG] subscribers: RemoteSubscriber::refresh asdfasdfasdfasdfasdfasdf (cid=2)
^C2021-03-13 20:14:35,832 [    INFO] gui_mgr: Stopping due to CTRL+C.
2021-03-13 20:14:35,832 [    INFO] client: Stopping HTTP server...

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
BradleyShanercommented, May 25, 2021

I had this issue too for a long time, couldn’t get it working with any computers in my house. Turns out, Remote Access needs to be enabled in the server’s config. I had been using a reverse proxy to access Plex, which was working just fine for everything else.

0reactions
iwalton3commented, Mar 18, 2021

The logs posted show that the play request is trying to connect insecurely to a Plex server. Either auth is disabled on local networks or the server is not signed in. The solution is to either enable http connections or ensure the Plex server is used securely.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why Can't I Cast Certain Videos and Websites To My ...
If you find it difficult to cast certain videos with your Chromecast, it's because they are in unsupported formats. Below is a list...
Read more >
No Cast destination found - Android - Chromecast Help
Several issues can prevent your Chromecast device from showing up when casting from Chrome. If you can't find your Chromecast, Chromecast Ultra, Chromecast...
Read more >
FIX: Can't cast a video from site : r/Chromecast - Reddit
I can try and cast from Desktop, but because I'm on Mac it won't stream ... It just says "Available for specific video...
Read more >
Common Google Chromecast issues and how to fix them
1. First, check that other devices in the house are able to access the internet and use the Wi-Fi without problems. You may...
Read more >
Chromecast Not Supported? 14 Ways to Fix It - Lifewire
VPN; Ad-blocking extensions or software; Firewall; Antivirus software. Some people with this error only had luck when they completely ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found