mdhiggins / PlexAutoSkip

Automatically skip content in Plex
MIT License
198 stars 11 forks source link

AppleTV Bad Request Error #32

Closed joshali1990 closed 1 year ago

joshali1990 commented 1 year ago

Hello,

I get the following error when trying to skip on Apple TV. I have tried all the troubleshooting steps mentioned under bad requests including signing out of the Plex client, turning off SSL and ignoring certs, refreshing my Plex token, and making sure Network Discovery and advertise as player are turned on.

2023-02-16 12:17:04 plexapi.exceptions.BadRequest: (500) internal_server_error; https://192-168-68-152.92110a007d7b460a93c63f8bd7a73073.plex.direct:32400/player/playback/stop?commandID=1&type=video <?xml version='1.0' encoding='utf-8'?> Traceback (most recent call last): File "/Applications/Plex Media Server.app/Contents/Resources/Plug-ins-ca0c45ff8/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/runtime.py", line 843, in handle_request result = f(**d) File "/Applications/Plex Media Server.app/Contents/Resources/Plug-ins-ca0c45ff8/System.bundle/Contents/Code/playerservice.py", line 50, in process_remote_command raise FrameworkException('Unable to find player with identifier %s' % identifier) FrameworkException: Unable to find player with identifier C215610B-F5A1-46F2-8F7F-0CE6C3B76EBE 2023-02-16 12:17:04 2023-02-16 12:17:04 During handling of the above exception, another exception occurred: 2023-02-16 12:17:04 2023-02-16 12:17:04 Traceback (most recent call last): 2023-02-16 12:17:04 File "/usr/local/pas/resources/skipper.py", line 213, in _seekTo 2023-02-16 12:17:04 self.seekPlayerTo(mediaWrapper.player, mediaWrapper, targetOffset) 2023-02-16 12:17:04 File "/usr/local/pas/resources/skipper.py", line 232, in seekPlayerTo 2023-02-16 12:17:04 return self.skipPlayerTo(player, mediaWrapper) 2023-02-16 12:17:04 File "/usr/local/pas/resources/skipper.py", line 275, in skipPlayerTo 2023-02-16 12:17:04 self.log.warning("Seek target is the end but unable to get PlayQueue %d (%d) data from server, aborting to prevent extra skips or playback issues" % (mediaWrapper.playQueueID, mediaWrapper.media.playQueueItemID)) 2023-02-16 12:17:04 TypeError: %d format: a number is required, not NoneType 2023-02-16 12:18:09 INFO - Found new session 71 [48527] (The Simpsons s23e05 - The Food Wife) Apple TV|C215610B-F5A1-46F2-8F7F-0CE6C3B76EBE viewOffset 0 joshali1990, sessions: 1

mdhiggins commented 1 year ago

What's the local IP address of your Plex server and your local router IP address? Also have you tried restarting the Apple TV? Maybe even reinstall the Plex app on the Apple TV

There's a couple weird things going on here, GDM is failing and the player identifier isn't being found. Additionally it looks like the Apple TV is failing to report a playqueueid which is why reinstalling might be beneficial

mdhiggins commented 1 year ago

079ef76bce953216107dbded0f4b5731cc4d9597

I pushed this small update that will hopefully fix the logging TypeError you're seeing though, that might allow the proper error message to be displayed with more detail

joshali1990 commented 1 year ago

Plex and the apple tv are on the same subnet. My plex server is 192.168.68.152. I'll try restarting my apple tv/reinstalling plex and report back. Plex Auto Skip is in a docker container so I'll let watchtower update the image tonight. Thanks!

mdhiggins commented 1 year ago

What's the local IP of the ATV out of curiosity

joshali1990 commented 1 year ago

192.168.68.154. Downloaded the latest version and reinstalled Plex on my appletv and the only error I'm getting now is the play queue failure. WARNING - Seek target is the end but unable to get PlayQueue 3856 (None) data from server, aborting to prevent extra skips or playback issues

mdhiggins commented 1 year ago

Hm no idea why the player isn't returning a play queue but some of them don't and it happens somewhat inconsistently which is why all those checks to make sure it's there are in place. Not a major functional impact so if everything else is working not much more I can do. Play queue is basically only used to prevent the player from trying to skip when there's nothing left to play

joshali1990 commented 1 year ago

Thanks. It seems like the only issue it causes is that I can't use the up next skip feature. Really would love to not have to sit through the 15 second wait but not a huge deal for me. Thanks again for your help!

mdhiggins commented 1 year ago

@joshali1990 New update just pushed out today works around the playqueue issue so if you update that might be working now

joshali1990 commented 1 year ago

Everything’s working great so far, thanks again!