postlund / pyatv

A client library for Apple TV and AirPlay devices
https://pyatv.dev
MIT License
827 stars 87 forks source link

atvremote cli crashes repeatedly #2376

Open maxileith opened 1 month ago

maxileith commented 1 month ago

Describe the bug

When entering the atvremote cli, the process crashes regularly as described in maxileith/homebridge-appletv-enhanced#325.

Error log


File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.8/site-packages/pyatv/core/protocol.py", line 56, in heartbeater
    await sender_func(message)
  File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.8/site-packages/pyatv/protocols/airplay/ap2_session.py", line 94, in _send_feedback
    await self.rtsp.feedback()
  File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.8/site-packages/pyatv/support/rtsp.py", line 248, in feedback
    return await self.exchange("POST", uri="/feedback", allow_error=allow_error)
  File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.8/site-packages/pyatv/support/rtsp.py", line 320, in exchange
    raise TimeoutError(

[3/19/2024, 12:53:34 AM] [Apple TV Enhanced] [E] Apple TV Lounge TV (REDACTED): Rocket Remote: Traceback (most recent call last):
  File "/var/lib/homebridge/appletv-enhanced/.venv/bin/atvremote", line 8, in <module>
    sys.exit(main())
  File "/var/lib/homebridge/appletv-enhanced/.venv/lib/python3.8/site-packages/pyatv/scripts/atvremote.py", line 1003, in main
    return loop.run_until_complete(appstart(loop))
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
asyncio.exceptions.CancelledError

How to reproduce the bug?

  1. Start the atvremote cli
  2. Wait
  3. The process crashes with the provided error

What is expected behavior?

The process does not crash

Operating System

Linux

Python

3.8

pyatv

0.14.5

Device

unknown by me

Additional context

-