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

Received an exception while passing frame to API: #258

Open
vjbalex opened this issue Aug 20, 2024 · 2 comments
Open

Received an exception while passing frame to API: #258

vjbalex opened this issue Aug 20, 2024 · 2 comments

Comments

@vjbalex
Copy link

vjbalex commented Aug 20, 2024

OS Version: Home Assistant OS 13.0
Home Assistant Core: 2024.8.2
Home Assistant Supervisior: 2024.08.0
Zigpy Version: 0.65.4
installed on Raspberry pi5

Error in System -> Logs:

Logger: zigpy_znp.uart
Source: /usr/local/lib/python3.12/site-packages/zigpy_znp/uart.py:75
First occurred: 4:19:41 AM (13 occurrences)
Last logged: 4:21:30 AM

Received an exception while passing frame to API: TransportFrame(payload=GeneralFrame(header=CommandHeader(id=0xB2, subsystem=Subsystem.ZDO, type=CommandType.AREQ), data=b'\xFA\x1B\x84'))
Received an exception while passing frame to API: TransportFrame(payload=GeneralFrame(header=CommandHeader(id=0xB2, subsystem=Subsystem.ZDO, type=CommandType.AREQ), data=b'\xD1\xD7\x84'))
Received an exception while passing frame to API: TransportFrame(payload=GeneralFrame(header=CommandHeader(id=0xB2, subsystem=Subsystem.ZDO, type=CommandType.AREQ), data=b'\x3A\xD5\x84'))
Received an exception while passing frame to API: TransportFrame(payload=GeneralFrame(header=CommandHeader(id=0xB2, subsystem=Subsystem.ZDO, type=CommandType.AREQ), data=b'\xD8\xD2\x84'))
Received an exception while passing frame to API: TransportFrame(payload=GeneralFrame(header=CommandHeader(id=0xB2, subsystem=Subsystem.ZDO, type=CommandType.AREQ), data=b'\x68\x2C\x84'))
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/zigpy_znp/types/commands.py", line 417, in from_frame
params[param.name], data = param.type.deserialize(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/zigpy/types/struct.py", line 319, in deserialize
value, data = field_type.deserialize(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/zigpy/types/basic.py", line 199, in deserialize
raise ValueError(f"Data is too short to contain {byte_size} bytes")
ValueError: Data is too short to contain 1 bytes

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/zigpy_znp/uart.py", line 73, in data_received
self._api.frame_received(frame.payload)
File "/usr/local/lib/python3.12/site-packages/zigpy_znp/api.py", line 846, in frame_received
command = command_cls.from_frame(frame, align=self.nvram.align_structs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/zigpy_znp/types/commands.py", line 424, in from_frame
raise ValueError(
ValueError: Frame data is truncated (parsed {'Src': 0xFC17, 'Status': <Status.NOT_SUPPORTED: 132>}), required parameter remains: Param(name='Routes', type=<class 'zigpy.zdo.types.Routes'>, description='Routes', optional=False)

@puddly puddly transferred this issue from zigpy/zigpy Oct 29, 2024
@serjsk
Copy link

serjsk commented Dec 18, 2024

Core 2024.12.2
Supervisor 2024.12.0
Operating System 13.2
Frontend 20241127.7

Have similar errors constantly...

Logger: zigpy_znp.uart
Source: /usr/local/lib/python3.13/site-packages/zigpy_znp/uart.py:58
First occurred: December 16, 2024 at 22:36:51 (1 occurrences)
Last logged: December 16, 2024 at 22:36:51

Received an exception while passing frame to API: TransportFrame(payload=GeneralFrame(header=CommandHeader(id=0xB2, subsystem=Subsystem.ZDO, type=CommandType.AREQ), data=b'\x78\x59\xC1'))
Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/zigpy_znp/types/commands.py", line 417, in from_frame
params[param.name], data = param.type.deserialize(data)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/site-packages/zigpy/types/struct.py", line 319, in deserialize
value, data = field_type.deserialize(data)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/usr/local/lib/python3.13/site-packages/zigpy/types/basic.py", line 199, in deserialize
raise ValueError(f"Data is too short to contain {byte_size} bytes")
ValueError: Data is too short to contain 1 bytes

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.13/site-packages/zigpy_znp/uart.py", line 56, in data_received
self._api.frame_received(frame.payload)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/site-packages/zigpy_znp/api.py", line 854, in frame_received
command = command_cls.from_frame(frame, align=self.nvram.align_structs)
File "/usr/local/lib/python3.13/site-packages/zigpy_znp/types/commands.py", line 424, in from_frame
raise ValueError(
...<2 lines>...
)
ValueError: Frame data is truncated (parsed {'Src': 0x5978, 'Status': <Status.NWK_INVALID_PARAMETER: 193>}), required parameter remains: Param(name='Routes', type=<class 'zigpy.zdo.types.Routes'>, description='Routes', optional=False)

Not sure if this is related, also lots of errors like this:
Logger: zigpy.zcl
Source: runner.py:154
First occurred: December 16, 2024 at 18:42:52 (422 occurrences)
Last logged: 10:27:29

[0x5978:1:0x000a] Traceback (most recent call last): File "/usr/local/lib/python3.13/site-packages/zigpy/zcl/init.py", line 422, in reply return await self._endpoint.reply( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<9 lines>... ) ^ File "/usr/local/lib/python3.13/site-packages/zigpy/endpoint.py", line 304, in reply return await self.device.reply( ^^^^^^^^^^^^^^^^^^^^^^^^ ...<11 lines>... ) ^ File "/usr/local/lib/python3.13/site-packages/zigpy/device.py", line 558, in reply return await self.request( ^^^^^^^^^^^^^^^^^^^ ...<11 lines>... ) ^ File "/usr/local/lib/python3.13/site-packages/zigpy/device.py", line 371, in request async with self._limit_concurrency(priority=priority): ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/contextlib.py", line 221, in aexit await anext(self.gen) File "/usr/local/lib/python3.13/site-packages/zigpy/device.py", line 120, in _limit_concurrency async with self._concurrent_requests_semaphore(priority=priority): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/zigpy/datastructures.py", line 32, in aexit await self.context_manager.aexit(exc_type, exc, traceback) File "/usr/local/lib/python3.13/site-packages/zigpy/datastructures.py", line 184, in aexit self.release() ~~~~~~~~~~~~^^ File "/usr/local/lib/python3.13/site-packages/zigpy/datastructures.py", line 160, in release raise ValueError("Semaphore released too many times") ValueError: Semaphore released too many times

@puddly
Copy link
Collaborator

puddly commented Dec 18, 2024

@serjsk Can you open a separate issue on the zigpy repository for your second error? That should not happen.

Please leave ZHA debug logging running until you capture the error as well, the context is very important. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants