[CERT-TEST-FAILURE] SU-2.5 IndexError: list index out of range

Author: khodyaCreated Sep 28, 2026Updated Sep 28, 2026
Labelsbugcert blockerneeds triage

Feature Area

Other

Test Case

TC-SU-2.5

Reproduction steps

Run inside the TH docker chip-cert-bins container:

Steps:

bash
python3 python_testing/scripts/sdk/TC_SU_2_5.py \
  --commissioning-method ble-wifi \
  --qr-code MT:Y.K9042C00KA0648G00 \
  --string-arg provider_app_path:/launch_dir/connectedhomeip/out/debug/chip-ota-provider-app \
  --string-arg ota_image:/launch_dir/firmware_requestor_v2_esp32.ota \
  --wifi-ssid ssid1 \
  --wifi-passphrase ssid1_passcode \
  --timeout 1800

There is a workaround how to avoid this bug: do not pass --qr-code parameter but pass --discriminator and --passcode instead.

Error:

[MatterTest] 09-28 15:53:54.704 INFO ==========> TC_SU_2_5 <==========
[MatterTest] 09-28 15:53:54.714 INFO Reading XML clusters from Path('/usr/local/lib/python3.12/dist-packages/matter/testing/data_model/1.6/allfiles.zip', 'clusters/')
[MatterTest] 09-28 15:53:56.113 INFO [Test] test_TC_SU_2_5
[MatterTest] 09-28 15:53:56.114 INFO Image download timeout is set to 300 seconds
[MatterTest] 09-28 15:53:56.115 ERROR Exception occurred in test_TC_SU_2_5.
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/dist-packages/mobly/base_test.py", line 797, in exec_one_test
    self._setup_test(test_name)
  File "/usr/local/lib/python3.12/dist-packages/mobly/base_test.py", line 530, in _setup_test
    self.setup_test()
  File "/usr/local/lib/python3.12/dist-packages/matter/testing/decorators.py", line 270, in async_runner
    return _async_runner(body, self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/matter/testing/decorators.py", line 254, in _async_runner
    return test_instance.event_loop.run_until_complete(asyncio.wait_for(body(test_instance, *args, **kwargs), timeout=timeout))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/root/python_testing/scripts/sdk/TC_SU_2_5.py", line 122, in setup_test
    self.requestor_passcode = self.matter_test_config.setup_passcodes[0]
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
[MatterTest] 09-28 15:53:56.122 ERROR Exception occurred in teardown_test of test_TC_SU_2_5.
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/dist-packages/mobly/base_test.py", line 797, in exec_one_test
    self._setup_test(test_name)
  File "/usr/local/lib/python3.12/dist-packages/mobly/base_test.py", line 530, in _setup_test
    self.setup_test()
  File "/usr/local/lib/python3.12/dist-packages/matter/testing/decorators.py", line 270, in async_runner
    return _async_runner(body, self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/matter/testing/decorators.py", line 254, in _async_runner
    return test_instance.event_loop.run_until_complete(asyncio.wait_for(body(test_instance, *args, **kwargs), timeout=timeout))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/root/python_testing/scripts/sdk/TC_SU_2_5.py", line 122, in setup_test
    self.requestor_passcode = self.matter_test_config.setup_passcodes[0]
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/dist-packages/mobly/base_test.py", line 812, in exec_one_test
    self._teardown_test(test_name)
  File "/usr/local/lib/python3.12/dist-packages/mobly/base_test.py", line 546, in _teardown_test
    self.teardown_test()
  File "/usr/local/lib/python3.12/dist-packages/matter/testing/matter_testing.py", line 561, in _wrapped_teardown
    _original(self)
  File "/usr/local/lib/python3.12/dist-packages/matter/testing/decorators.py", line 270, in async_runner
    return _async_runner(body, self, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/dist-packages/matter/testing/decorators.py", line 254, in _async_runner
    return test_instance.event_loop.run_until_complete(asyncio.wait_for(body(test_instance, *args, **kwargs), timeout=timeout))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/root/python_testing/scripts/sdk/TC_SU_2_5.py", line 85, in teardown_test
    await self.clear_ota_providers(self.controller, self.requestor_node_id)
  File "/root/python_testing/scripts/sdk/TC_SUTestBase.py", line 397, in clear_ota_providers
    resp = await controller.WriteAttribute(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'WriteAttribute'
[MatterTest] 09-28 15:53:56.137 INFO            ***** Test Failure :
[MatterTest] 09-28 15:53:56.137 INFO Finished test in 0ms
[MatterTest] 09-28 15:53:56.138 ERROR

******************************************************************
*
* Test test_TC_SU_2_5 failed for the following reason:
* list index out of range
*
* File "/root/python_testing/scripts/sdk/TC_SU_2_5.py", line 122, in setup_test
* IndexError: list index out of range
*
* Test step:
*     5: OTA-P/TH sends the ApplyUpdateResponse Command to the DUT. Action field is set to "Discontinue".       Expected outcome: Verify that the DUT clears its previously downloaded software image, and resets the UpdateState Attribute to Idle.Verify that the DUT does not send the NotifyUpdateApplied within a reasonable time.Verify the SoftwareVersion attribute from the Basic Information cluster of the DUT to be the same as it was previously.
*
* Endpoint: None
*
*******************************************************************

[MatterTest] 09-28 15:53:56.139 INFO [Test] test_TC_SU_2_5 ERROR

Bug prevalence

Whenever I do this

GitHub hash of the SDK that was being used

99a81bd32986c5292b0b1c9245c8e247c2ad717d

Platform

linux

Anything else?

No response

Source: project-chip/connectedhomeip