mdhiggins / PlexAutoSkip

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

AppleTV 4K errors out #28

Closed RaaZeR2169 closed 1 year ago

RaaZeR2169 commented 1 year ago

I've gone through all of the troubleshooting and applied the listed fixes to no avail. It does work on my iPad. This is the error i get

INFO - Found new session 128 [90694] (That '70s Show s03e16 - Romantic Weekend) Apple TV|1FD5D7B4-5372-41DD-AA52-D052E776D891 viewOffset 0 Raazer, sessions: 0
INFO - Found skippable marker intro for media 128 [90694] (That '70s Show s03e16 - Romantic Weekend) Apple TV|1FD5D7B4-5372-41DD-AA52-D052E776D891 with range 143874-173172 and viewOffset 144357
INFO - Seeking Plex for Apple TV player playing 128 [90694] (That '70s Show s03e16 - Romantic Weekend) Apple TV|1FD5D7B4-5372-41DD-AA52-D052E776D891 from 144357 to 173172
ERROR - Forbidden Error, see https://github.com/mdhiggins/PlexAutoSkip/wiki/Troubleshooting#forbidden-error
INFO - Seeking Plex for Apple TV player playing 128 [90694] (That '70s Show s03e16 - Romantic Weekend) Apple TV|1FD5D7B4-5372-41DD-AA52-D052E776D891 from 144357 to 173172
ERROR - BadRequest exception seekPlayerTo, see https://github.com/mdhiggins/PlexAutoSkip/wiki/Troubleshooting
Traceback (most recent call last):
  File "E:\copy\plexautoskip-master\resources\skipper.py", line 239, in seekPlayerTo
    mediaWrapper.seekTo(targetOffset, player)
  File "E:\copy\plexautoskip-master\resources\mediaWrapper.py", line 319, in seekTo
    player.seekTo(offset)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\client.py", line 377, in seekTo
    self.sendCommand('playback/seekTo', offset=offset, type=mtype)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\client.py", line 232, in sendCommand
    return query(key, headers=headers)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\server.py", line 755, in query
    raise BadRequest(message)
plexapi.exceptions.BadRequest: (500) internal_server_error; https://192.168.1.169:32400/player/playback/seekTo?commandID=1&offset=173172&type=video <?xml version='1.0' encoding='utf-8'?> <Response code="2000" status="HTTPError: ">   <Traceback>Traceback (most recent call last):   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\runtime.py", line 843, in handle_request     result = f(**d)   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\System.bundle\Contents\Code\playerservice.py", line 38, in process_remote_command     headers=Request.Headers)   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\networkkit.py", line 194, in Request     method=method,   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\networkkit.py", line 67, in _http_request     req = self._core.networking.http_request(url, *args, **kwargs)   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\networking.py", line 346, in http_request     return HTTPRequest(self._core, url, data, h, url_cache, encoding, errors, timeout, immediate, sleep, opener, follow_redirects, method)   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\networking.py", line 118, in __init__     self.load()   File "E:\PlexData\Plex Media Server\Resources\Plug-ins-3d4dc0cce\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\networking.py", line 158, in load     f = self._opener.open(req, timeout=self._timeout)   File "E:\PlexData\Plex Media Server\python27.zip\urllib2.py", line 435, in open     response = meth(req, response)   File "E:\PlexData\Plex Media Server\python27.zip\urllib2.py", line 548, in http_response     'http', request, response, code, msg, hdrs)   File "E:\PlexData\Plex Media Server\python27.zip\urllib2.py", line 473, in error     return self._call_chain(*args)   File "E:\PlexData\Plex Media Server\python27.zip\urllib2.py", line 407, in _call_chain     result = func(*args)   File "E:\PlexData\Plex Media Server\python27.zip\urllib2.py", line 556, in http_error_default     raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) HTTPError: HTTP Error 403: Forbidden </Traceback> </Response>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\copy\plexautoskip-master\resources\skipper.py", line 239, in seekPlayerTo
    mediaWrapper.seekTo(targetOffset, player)
  File "E:\copy\plexautoskip-master\resources\mediaWrapper.py", line 319, in seekTo
    player.seekTo(offset)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\client.py", line 377, in seekTo
    self.sendCommand('playback/seekTo', offset=offset, type=mtype)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\client.py", line 232, in sendCommand
    return query(key, headers=headers)
  File "C:\Program Files (x86)\Python39-32\lib\site-packages\plexapi\client.py", line 194, in query
    raise BadRequest(message)
plexapi.exceptions.BadRequest: (403) forbidden; http://192.168.1.56:32500/player/playback/seekTo?commandID=2&offset=173172&type=video
mdhiggins commented 1 year ago

What's the local IP address of your server and/or computer running plexautoskip? Just want to confirm they are on the same subnet as the player

Did you try getting a new token? Forbidden usually means its a permissions thing on the client that's blocking the request

Does navigating to the following URLs show you an XML page? (replace <<token>> with your token)

http://192.168.1.169:32500/resources?X-Plex-Token=<<token>>

or

http://192.168.1.169:32400/resources?X-Plex-Token=<<token>>

If not then your token doesn't have permission to access your client and you might need to relog and get a fresh one

RaaZeR2169 commented 1 year ago

I think I figured out what was going on. I had to power cycle the entire AppleTV and now it all seems to work. Logs look good for the show I just tested. Thanks for the response.