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

[pyatv.support.mdns] exception during data handling #2352

Open
Graefer opened this issue Feb 11, 2024 · 0 comments
Open

[pyatv.support.mdns] exception during data handling #2352

Graefer opened this issue Feb 11, 2024 · 0 comments
Labels

Comments

@Graefer
Copy link

Graefer commented Feb 11, 2024

Describe the bug

Every atvremote command starts with a bunch of assertion errors.

Error log

root@nodered:~# atvremote --version
atvremote 0.14.5
root@nodered:~# atvremote wizard
Looking for devices...
2024-02-11 20:12:05 ERROR [pyatv.core.mdns]: exception during data handling
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/pyatv/core/mdns.py", line 305, in datagram_received
    delegate.datagram_received(data, addr)
  File "/usr/local/lib/python3.9/dist-packages/pyatv/core/mdns.py", line 431, in datagram_received
    decoded_msg = DnsMessage().unpack(data)
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 391, in unpack
    self.authorities.extend(
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 392, in <genexpr>
    DnsResource.unpack_read(buffer) for _ in range((header.nscount))
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 356, in unpack_read
    assert buffer.tell() == before_rd + rd_length
AssertionError
2024-02-11 20:12:06 ERROR [pyatv.core.mdns]: exception during data handling
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/pyatv/core/mdns.py", line 305, in datagram_received
    delegate.datagram_received(data, addr)
  File "/usr/local/lib/python3.9/dist-packages/pyatv/core/mdns.py", line 431, in datagram_received
    decoded_msg = DnsMessage().unpack(data)
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 391, in unpack
    self.authorities.extend(
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 392, in <genexpr>
    DnsResource.unpack_read(buffer) for _ in range((header.nscount))
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 356, in unpack_read
    assert buffer.tell() == before_rd + rd_length
AssertionError
2024-02-11 20:12:06 ERROR [pyatv.core.mdns]: exception during data handling
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/pyatv/core/mdns.py", line 305, in datagram_received
    delegate.datagram_received(data, addr)
  File "/usr/local/lib/python3.9/dist-packages/pyatv/core/mdns.py", line 431, in datagram_received
    decoded_msg = DnsMessage().unpack(data)
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 391, in unpack
    self.authorities.extend(
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 392, in <genexpr>
    DnsResource.unpack_read(buffer) for _ in range((header.nscount))
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 356, in unpack_read
    assert buffer.tell() == before_rd + rd_length
AssertionError
2024-02-11 20:12:07 ERROR [pyatv.core.mdns]: exception during data handling
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/pyatv/core/mdns.py", line 305, in datagram_received
    delegate.datagram_received(data, addr)
  File "/usr/local/lib/python3.9/dist-packages/pyatv/core/mdns.py", line 431, in datagram_received
    decoded_msg = DnsMessage().unpack(data)
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 386, in unpack
    self.answers.extend(
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 387, in <genexpr>
    DnsResource.unpack_read(buffer) for _ in range((header.ancount))
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 356, in unpack_read
    assert buffer.tell() == before_rd + rd_length
AssertionError
2024-02-11 20:12:08 ERROR [pyatv.core.mdns]: exception during data handling
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/pyatv/core/mdns.py", line 305, in datagram_received
    delegate.datagram_received(data, addr)
  File "/usr/local/lib/python3.9/dist-packages/pyatv/core/mdns.py", line 431, in datagram_received
    decoded_msg = DnsMessage().unpack(data)
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 386, in unpack
    self.answers.extend(
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 387, in <genexpr>
    DnsResource.unpack_read(buffer) for _ in range((header.ancount))
  File "/usr/local/lib/python3.9/dist-packages/pyatv/support/dns.py", line 356, in unpack_read
    assert buffer.tell() == before_rd + rd_length
AssertionError
Found the following devices:
    Name          Model           Address

How to reproduce the bug?

Every atvremote wizard or atvremote scan.

What is expected behavior?

Every atvremote wizard or atvremote scan

Operating System

Debian 11

Python

3.9

pyatv

0.14.5

Device

AppleTV HD tvOS 17.3

Additional context

Installed in virtual environment

@Graefer Graefer added the bug label Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant