jellyfin / jellycon

Kodi Addon for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
310 stars 29 forks source link

Jellycon - "Exception in Playback Monitor" #333

Open AbyssalSoda opened 4 months ago

AbyssalSoda commented 4 months ago

Describe the bug Jellycon refuses to connect with Jellyfin server "Exception in Playback Monitor"

To Reproduce Have Kodi Crash mid playthrough of a movie then Jellycon never works again - restarting, reinstalling, changing HTTPS and ports does not resolve to my knowledge or attemtps.

Expected behavior Upon restarting KODI Jellycon should have automatically reconnected like usual.

Logs

2024-05-06 03:01:17.679 T:24780    info <general>: JELLYFIN.resources.lib.functions -> INFO::resources\lib\functions.py:942 Sending jellycon_play_action : {'action': 'play', 'item_id': '444ddbe372b0526a0180e63535d7fbad', 'auto_resume': '-1', 'force_transcode': False, 'media_source_id': '', 'subtitle_stream_index': None, 'audio_stream_index': None}
2024-05-06 03:01:18.604 T:33772    info <general>: JELLYFIN.service -> ERROR::service.py:166 Exception in Playback Monitor: HTTPConnectionPool(host='192.168.1.196', port=8096): Max retries exceeded with url: /Users/1134a553a7c844408e4e5e11f0d8af1f/Items?Recursive=True&limit=20&IsPlayed=False&SortBy=Random&IncludeItemTypes=Movie&ImageTypeLimit=0&format=json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021F478B8340>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))
2024-05-06 03:01:18.609 T:33772    info <general>: JELLYFIN.service -> ERROR::service.py:167 Traceback (most recent call last):
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connection.py", line 203, in _new_conn
                                                       sock = connection.create_connection(
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\util\connection.py", line 85, in create_connection
                                                       raise err
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\util\connection.py", line 73, in create_connection
                                                       sock.connect(sa)
                                                   TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

                                                   The above exception was the direct cause of the following exception:

                                                   Traceback (most recent call last):
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 790, in urlopen
                                                       response = self._make_request(
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 496, in _make_request
                                                       conn.request(
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connection.py", line 395, in request
                                                       self.endheaders()
                                                     File "C:\Program Files\Kodi\system\python\Lib\http\client.py", line 1251, in endheaders
                                                       self._send_output(message_body, encode_chunked=encode_chunked)
                                                     File "C:\Program Files\Kodi\system\python\Lib\http\client.py", line 1011, in _send_output
                                                       self.send(msg)
                                                     File "C:\Program Files\Kodi\system\python\Lib\http\client.py", line 951, in send
                                                       self.connect()
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connection.py", line 243, in connect
                                                       self.sock = self._new_conn()
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connection.py", line 218, in _new_conn
                                                       raise NewConnectionError(
                                                   urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x0000021F478B8340>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

                                                   The above exception was the direct cause of the following exception:

                                                   Traceback (most recent call last):
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\adapters.py", line 486, in send
                                                       resp = conn.urlopen(
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py", line 844, in urlopen
                                                       retries = retries.increment(
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\util\retry.py", line 515, in increment
                                                       raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
                                                   urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.1.196', port=8096): Max retries exceeded with url: /Users/1134a553a7c844408e4e5e11f0d8af1f/Items?Recursive=True&limit=20&IsPlayed=False&SortBy=Random&IncludeItemTypes=Movie&ImageTypeLimit=0&format=json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021F478B8340>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

                                                   During handling of the above exception, another exception occurred:

                                                   Traceback (most recent call last):
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\plugin.video.jellycon\service.py", line 143, in <module>
                                                       set_random_movies()
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\plugin.video.jellycon\resources\lib\tracking.py", line 25, in wrapper
                                                       value = func(*args, **kwargs)
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\plugin.video.jellycon\resources\lib\widgets.py", line 50, in set_random_movies
                                                       results = api.get(url)
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\plugin.video.jellycon\resources\lib\jellyfin.py", line 40, in get
                                                       r = requests.get(url, headers=self.headers, verify=self.verify_cert)
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\api.py", line 73, in get
                                                       return request("get", url, params=params, **kwargs)
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\api.py", line 59, in request
                                                       return session.request(method=method, url=url, **kwargs)
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\sessions.py", line 589, in request
                                                       resp = self.send(prep, **send_kwargs)
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\sessions.py", line 703, in send
                                                       r = adapter.send(request, **kwargs)
                                                     File "C:\Users\Abyssal\AppData\Roaming\Kodi\addons\script.module.requests\lib\requests\adapters.py", line 519, in send
                                                       raise ConnectionError(e, request=request)
                                                   requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.1.196', port=8096): Max retries exceeded with url: /Users/1134a553a7c844408e4e5e11f0d8af1f/Items?Recursive=True&limit=20&IsPlayed=False&SortBy=Random&IncludeItemTypes=Movie&ImageTypeLimit=0&format=json (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x0000021F478B8340>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

System Info:

anupamkumar commented 3 months ago

Sounds like the server is not listening on 8096 based on the logs...

The default HTTPS port jellyfin server listens to is 8920 not 8096. 8096 is the HTTP server port. Sounds like you configured your jellycon to try to connect to 8096 instead... maybe try to update the jellycon config to try to connect to 8920.