dmunozv04 / iSponsorBlockTV

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

Docker Installation error #19

Closed dogotcat05 closed 2 years ago

dogotcat05 commented 2 years ago

Before opening an issue make sure that there are no duplicates and that you are on the latest version. When I run the Docker command to install I get this error when trying to add my Apple TV to the config.json in the new docker setup procedure.

Found Living Room. Do you want to add it? (y/n) y Traceback (most recent call last): File "/opt/venv/lib/python3.10/site-packages/pyatv/support/init.py", line 33, in error_handler return await func(*args, **kwargs) File "/opt/venv/lib/python3.10/site-packages/pyatv/protocols/airplay/auth/hap.py", line 43, in start_pairing await self.http.post("/pair-pin-start", headers=_AIRPLAY_HEADERS) File "/opt/venv/lib/python3.10/site-packages/pyatv/support/http.py", line 359, in post return await self.send_and_receive( File "/opt/venv/lib/python3.10/site-packages/pyatv/support/http.py", line 412, in send_and_receive raise exceptions.HttpError( pyatv.exceptions.HttpError: HTTP/1.1 method POST failed with code 400: Bad Request

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

Traceback (most recent call last): File "/app/create_config.py", line 105, in main() File "/app/create_config.py", line 64, in main loop.run_until_complete(task) File "/usr/local/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete return future.result() File "/app/create_config.py", line 42, in find_atvs await pairing.begin() File "/opt/venv/lib/python3.10/site-packages/pyatv/protocols/airplay/pairing.py", line 62, in begin return await error_handler( File "/opt/venv/lib/python3.10/site-packages/pyatv/support/init.py", line 41, in error_handler raise fallback(str(ex)) from ex pyatv.exceptions.PairingError: HTTP/1.1 method POST failed with code 400: Bad Request Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7fb37a81f0>

--

To Reproduce Docker command that I ran: docker run --rm -it \ --network=host \ --entrypoint /opt/venv/bin/python3 \ -v /home/pi/config.json:/app/config.json \ ghcr.io/dmunozv04/isponsorblocktv \ /app/create_config.py

Expected behavior Adding the Apple TV correctly to the config.json file.

Screenshots If applicable, add screenshots to help explain your problem.

iSponsorBlockTV server (please complete the following information):

Apple TV (please complete the following information):

Additional context Add any other context about the problem here.

dmunozv04 commented 2 years ago

Hi, could you try to obtain the credentials manually?

Steps:

docker run --rm -it --network=host --entrypoint /bin/bash ghcr.io/dmunozv04/isponsorblocktv
atvremote scan
atvremote pair --protocol airplay --id <identifier you got on the previous step>
exit the container
dmunozv04 commented 2 years ago

Also, make sure that the option to connect to apple TV's in the home app is set to allow anyone from this network.

theprinceofspace commented 2 years ago

yep that is set. connected the ATV and API key. does this mean setup is done and I should run the other command?

Push updater started

dmunozv04 commented 2 years ago

yep that is set. connected the ATV and API key. does this mean setup is done and I should run the other command?

Push updater started

This is a different issue, but yes

theprinceofspace commented 2 years ago

looks like it installed ok but now I see a restart loop in docker. the fun isnt over yet!

Screen Shot 2022-04-20 at 12 44 37 PM
dmunozv04 commented 2 years ago

Can you provide the command you ran and the logs that docker is outputting?

theprinceofspace commented 2 years ago
docker pull ghcr.io/dmunozv04/isponsorblocktv
docker run -d \
--name iSponsorBlockTV \
--restart=unless-stopped \
--network=host \
-v /volume1/docker/isponsorblocktv/:/app/config.json \
ghcr.io/dmunozv04/isponsorblocktv
dmunozv04 commented 2 years ago

Can you provide the logs that docker is outputting?

theprinceofspace commented 2 years ago

sorry, still trying to track those down.

dmunozv04 commented 2 years ago

Ok, no worries. Try running in interactive mode to see what’s happening. First remove the other container. Then run:

docker pull ghcr.io/dmunozv04/isponsorblocktv
docker run -it \
--name iSponsorBlockTV \
--restart=unless-stopped \
--network=host \
-v /volume1/docker/isponsorblocktv/:/app/config.json \
ghcr.io/dmunozv04/isponsorblocktv

And check the output. You will need to keep the terminal open

theprinceofspace commented 2 years ago

So. there appear to be no logs. running this for sponsorblocktv has no results but other docker containers have huge logs. docker logs 55b770970182

dmunozv04 commented 2 years ago

Hi, could you try to obtain the credentials manually?

Steps:

docker run --rm -it --network=host --entrypoint /bin/bash ghcr.io/dmunozv04/isponsorblocktv
atvremote scan
atvremote pair --protocol airplay --id <identifier you got on the previous step>
exit the container

@dogotcat05