dmunozv04 / iSponsorBlockTV

SponsorBlock client for all YouTube TV clients.
GNU General Public License v3.0
2.21k stars 92 forks source link

Docker Container fails after working briefly #32

Closed ghstzch closed 1 year ago

ghstzch commented 1 year ago

Hey, so everything has been working perfectly for awhile and all of a sudden it gives me this error in the logs. It also will say "cant find video id" at first, then pull the skip content. After a few hours of uptime I get this:

Reconnecting to Apple TV

Discovering devices on network...

Connecting to 192.168.1.7

ERROR:asyncio:Task exception was never retrieved

future: <Task finished name='Task-8916' coro=<process_playstatus() done, defined at /app/iSponsorBlockTV/main.py:58> exception=AttributeError("'NoneType' object has no attribute 'identifier'")>

Traceback (most recent call last):

File "/app/iSponsorBlockTV/main.py", line 61, in process_playstatus

logging.debug("App playing is:" + str(atv.metadata.app.identifier))

AttributeError: 'NoneType' object has no attribute 'identifier'

Push updater started

Reconnecting to Apple TV

Discovering devices on network...

Connecting to 192.168.1.7

ERROR:asyncio:Task exception was never retrieved

future: <Task finished name='Task-8965' coro=<process_playstatus() done, defined at /app/iSponsorBlockTV/main.py:58> exception=AttributeError("'NoneType' object has no attribute 'identifier'")>

Traceback (most recent call last):

File "/app/iSponsorBlockTV/main.py", line 61, in process_playstatus

logging.debug("App playing is:" + str(atv.metadata.app.identifier))

AttributeError: 'NoneType' object has no attribute 'identifier'

Push updater started

Reconnecting to Apple TV

Discovering devices on network...

Connecting to 192.168.1.7

ERROR:asyncio:Task exception was never retrieved

future: <Task finished name='Task-9014' coro=<process_playstatus() done, defined at /app/iSponsorBlockTV/main.py:58> exception=AttributeError("'NoneType' object has no attribute 'identifier'")>

Traceback (most recent call last):

File "/app/iSponsorBlockTV/main.py", line 61, in process_playstatus

logging.debug("App playing is:" + str(atv.metadata.app.identifier))

AttributeError: 'NoneType' object has no attribute 'identifier'

Push updater started

Reconnecting to Apple TV

Discovering devices on network...

Connecting to 192.168.1.7

ERROR:asyncio:Task exception was never retrieved

future: <Task finished name='Task-9069' coro=<process_playstatus() done, defined at /app/iSponsorBlockTV/main.py:58> exception=AttributeError("'NoneType' object has no attribute 'identifier'")>

Push updater started

Traceback (most recent call last):

File "/app/iSponsorBlockTV/main.py", line 61, in process_playstatus

logging.debug("App playing is:" + str(atv.metadata.app.identifier))

AttributeError: 'NoneType' object has no attribute 'identifier'

Reconnecting to Apple TV

Discovering devices on network...

No device found, will retry

Reconnecting to Apple TV

Discovering devices on network...

Connecting to 192.168.1.7

ERROR:asyncio:Task exception was never retrieved

future: <Task finished name='Task-9134' coro=<process_playstatus() done, defined at /app/iSponsorBlockTV/main.py:58> exception=AttributeError("'NoneType' object has no attribute 'identifier'")>

Traceback (most recent call last):

File "/app/iSponsorBlockTV/main.py", line 61, in process_playstatus

logging.debug("App playing is:" + str(atv.metadata.app.identifier))

AttributeError: 'NoneType' object has no attribute 'identifier'

Push updater started

Reconnecting to Apple TV

Discovering devices on network...

Connecting to 192.168.1.56

ERROR:asyncio:Task exception was never retrieved

future: <Task finished name='Task-1' coro=<loop_atv() done, defined at /app/iSponsorBlockTV/main.py:117> exception=TimeoutError()>

Traceback (most recent call last):

File "/usr/local/lib/python3.10/asyncio/locks.py", line 390, in acquire

await fut

asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for

return fut.result()

asyncio.exceptions.CancelledError

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

Traceback (most recent call last):

File "/app/iSponsorBlockTV/main.py", line 134, in loop_atv

atv = await connect_atv(event_loop, identifier, airplay_credentials)

File "/app/iSponsorBlockTV/main.py", line 114, in connect_atv

return await pyatv.connect(config, loop)

File "/opt/venv/lib/python3.10/site-packages/pyatv/init.py", line 135, in connect

await atv.connect()

File "/opt/venv/lib/python3.10/site-packages/pyatv/core/facade.py", line 575, in connect

if await setup_data.connect():

File "/opt/venv/lib/python3.10/site-packages/pyatv/protocols/airplay/init.py", line 269, in _connect_rc

await mrp_connect()

File "/opt/venv/lib/python3.10/site-packages/pyatv/protocols/mrp/init.py", line 934, in _connect

await protocol.start()

File "/opt/venv/lib/python3.10/site-packages/pyatv/protocols/mrp/protocol.py", line 161, in start

await self.send_and_receive(messages.get_keyboard_session())

File "/opt/venv/lib/python3.10/site-packages/pyatv/protocols/mrp/protocol.py", line 259, in send_and_receive

return await self._receive(identifier, timeout)

File "/opt/venv/lib/python3.10/site-packages/pyatv/protocols/mrp/protocol.py", line 271, in _receive

await asyncio.wait_for(semaphore.acquire(), timeout)

File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for

raise exceptions.TimeoutError() from exc

asyncio.exceptions.TimeoutError

ERROR:asyncio:Task exception was never retrieved

future: <Task finished name='Task-9222' coro=<process_playstatus() done, defined at /app/iSponsorBlockTV/main.py:58> exception=AttributeError("'NoneType' object has no attribute 'identifier'")>

Traceback (most recent call last):

File "/app/iSponsorBlockTV/main.py", line 61, in process_playstatus

logging.debug("App playing is:" + str(atv.metadata.app.identifier))

AttributeError: 'NoneType' object has no attribute 'identifier'

dmunozv04 commented 1 year ago

Hi, please run the container with debug logs so I can find the issue.

docker run --rm -it \
--network=host \
-v /PATH_TO_YOUR_CONFIG.json:/app/config.json \
ghcr.io/dmunozv04/isponsorblocktv \
--debug 
ghstzch commented 1 year ago

Thanks for your help on this, I love this application. Unfortunately just ran into some issues. I am running this on an Alpine Linux box running docker.

debug.zip

ghstzch commented 1 year ago

Any updates on this? Would really like to get this working.

dmunozv04 commented 1 year ago

I haven’t been able to debug the issue

ghstzch commented 1 year ago

Bummer, I may just try and reimage my server then. On Nov 5, 2022, at 12:12 PM, David @.***> wrote: I haven’t been able to debug the issue

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

dmunozv04 commented 1 year ago

After inspecting the logs it looks like the program crashes because it isn't able to read the atv.metadata.app.identifier. I'll change that and see if it fixes the issue for you

dmunozv04 commented 1 year ago

Also, could you please update the docker container and your apple tv to the latest versions (I just triggered a new build which has the latest version of pyatv)

ghstzch commented 1 year ago

Just went ahead and reinstalled. Looks to be working as of now and is skipping the proper sections. Will keep an eye on it. Thanks so much for your guidance!

dmunozv04 commented 1 year ago

Thanks for letting me know! I’m glad it got fixed

ghstzch commented 1 year ago

:D