Error since update to Z-stack firmware 20240710: Received an exception while passing frame to API

オープン
#261 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

The report identifies a malformed ZDO Routes response after the Z-stack firmware update and includes the failing frame and traceback. Start by tracing how ZDO response frames are decoded in zigpy_znp/types/commands.py and how the Routes parameter is defined; then check the relevant decoding tests. Done means the frame is handled correctly or reported without flooding the log, with coverage for the truncated response.

索引モデルが issue の本文から書いたものです。

説明

My coordinator is a CC2652P, since update to Koenkk Z-stack firmware 20240710, my log is flooded with these errors, but apart from that, everything seems to work fine, just wanted to report this.

2025-06-08 20:39:29.490 ERROR (MainThread) [zigpy_znp.uart] Received an exception while passing frame to API: TransportFrame(payload=GeneralFrame(header=CommandHeader(id=0xB2, subsystem=Subsystem.ZDO, type=CommandType.AREQ), data=b'\x83\xDE\x84'))
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.13/site-packages/zigpy_znp/types/commands.py", line 417, in from_frame
    params[param.name], data = param.type.deserialize(data)
                               ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/srv/homeassistant/lib/python3.13/site-packages/zigpy/types/struct.py", line 319, in deserialize
    value, data = field_type.deserialize(data)
                  ~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/srv/homeassistant/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 "/srv/homeassistant/lib/python3.13/site-packages/zigpy_znp/uart.py", line 56, in data_received
    self._api.frame_received(frame.payload)
    ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/srv/homeassistant/lib/python3.13/site-packages/zigpy_znp/api.py", line 860, in frame_received
    command = command_cls.from_frame(frame, align=self.nvram.align_structs)
  File "/srv/homeassistant/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': 0xDE83, 'Status': <Status.NOT_SUPPORTED: 132>}), required parameter remains: Param(name='Routes', type=<class 'zigpy.zdo.types.Routes'>, description='Routes', optional=False)
2025-06-08 20:43:30.506 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.13/site-packages/zigpy_znp/api.py", line 1120, in request_callback_rsp
    return await callback_rsp
           ^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError

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

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.13/site-packages/zigpy_znp/api.py", line 1117, in request_callback_rsp
    async with asyncio_timeout(timeout):
               ~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/timeouts.py", line 116, in __aexit__
    raise TimeoutError from exc_val
TimeoutError
2025-06-08 20:43:30.507 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.13/site-packages/zigpy_znp/api.py", line 1120, in request_callback_rsp
    return await callback_rsp
           ^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError

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

Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.13/site-packages/zigpy_znp/api.py", line 1117, in request_callback_rsp
    async with asyncio_timeout(timeout):
               ~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/local/lib/python3.13/asyncio/timeouts.py", line 116, in __aexit__
    raise TimeoutError from exc_val
TimeoutError

主要言語
Python
スター
172
フォーク
49
平均マージ
3分
マージ済み PR(30日)
1

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

zigpy/zigpy-znp のほかの issue

zigpy/zigpy-znp の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。