Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash: 'Not enough data for satisfy transfer length header.' #235

Open
habys opened this issue Jan 29, 2025 · 3 comments
Open

Crash: 'Not enough data for satisfy transfer length header.' #235

habys opened this issue Jan 29, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@habys
Copy link

habys commented Jan 29, 2025

Before opening an issue make sure that there are no duplicates and that you are on the latest version.
Describe the bug
ERROR - Handle subscribe payload error, status 200 reason OK

To Reproduce
Leave this service running. Using a Sony TV with Google's OS and Youtube App

Expected behavior
No crashes

iSponsorBlockTV server (please complete the following information):

  • OS: isponsorblocktv running on Linux as a systemd service in a venv
  • Python version: Python 3.13.1

I saw this error three times yesterday when checking server logs but haven't noticed any ill effects. I have included this here for your information.

Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]: 2025-01-28 23:01:51,525 - iSponsorBlockTV-om5qk7crhbd15930adg378652a - ERROR - Handle subscribe payload error, status 200 reason OK
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]: Traceback (most recent call last):
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:   File "/data/venv/isponsorblocktv/lib/python3.13/site-packages/aiohttp/client_proto.py", line 94, in connection_lost
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:     uncompleted = self._parser.feed_eof()
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:   File "aiohttp/_http_parser.pyx", line 507, in aiohttp._http_parser.HttpParser.feed_eof
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]: aiohttp.http_exceptions.TransferEncodingError: 400, message:
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:   Not enough data for satisfy transfer length header.
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]: The above exception was the direct cause of the following exception:
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]: Traceback (most recent call last):
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:   File "/data/venv/isponsorblocktv/lib/python3.13/site-packages/pyytlounge/wrapper.py", line 468, in subscribe
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:     async for events in self._parse_event_chunks(
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:     ...<7 lines>...
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:             break
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:   File "/data/venv/isponsorblocktv/lib/python3.13/site-packages/pyytlounge/wrapper.py", line 344, in _parse_event_chunks
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:     async for line in lines:
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:     ...<10 lines>...
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:                 yield events
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:   File "/data/venv/isponsorblocktv/lib/python3.13/site-packages/pyytlounge/wrapper.py", line 142, in iter_response_lines
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:     line = await resp.readline()
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:            ^^^^^^^^^^^^^^^^^^^^^
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:   File "/data/venv/isponsorblocktv/lib/python3.13/site-packages/aiohttp/streams.py", line 317, in readline
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:     return await self.readuntil()
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:            ^^^^^^^^^^^^^^^^^^^^^^
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:   File "/data/venv/isponsorblocktv/lib/python3.13/site-packages/aiohttp/streams.py", line 351, in readuntil
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:     await self._wait("readuntil")
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:   File "/data/venv/isponsorblocktv/lib/python3.13/site-packages/aiohttp/streams.py", line 312, in _wait
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]:     await waiter
Jan 28 23:01:51 ultra-arikui youtube-sponsorblock[7490]: aiohttp.client_exceptions.ClientPayloadError: Response payload is not completed: <TransferEncodingError: 400, message='Not enough data for satisfy transfer length header.'>

If there is some way I can capture the payload that is not being parsed correctly, or anything else I can do to be useful, please let me know.

@habys habys added the bug Something isn't working label Jan 29, 2025
@habys habys changed the title Crash Crash: 'Not enough data for satisfy transfer length header.' Jan 29, 2025
@dmunozv04
Copy link
Owner

Thanks for opening an issue, sometimes the connection with YouTube is closed forcedly, but I haven't been able to locate the cause(s) of it. If the tool managed to reconnect, then it should be fine

@dmunozv04
Copy link
Owner

@habys did it crash completely or was it able to reconnect after the error?

@habys
Copy link
Author

habys commented Feb 7, 2025

This is still happening; some days not at all. A few days ago it happened 5 times. I am not noticing any ill effects from the crashes. I could not tell that it is crashing from watching Youtube.

To answer your question, ever since I last updated and started the service (Jan 26th) it has kept the same PID through the stack traces.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants