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

[ACL-2.3] Error while encoding attribute-values[0].data as a hex string for D_BAD_NONE: "" which is an octstr of length 0 #24409

Open
Survensa opened this issue Jan 13, 2023 · 6 comments

Comments

@Survensa
Copy link

Survensa commented Jan 13, 2023

Reproduction steps

In test case "TC-ACL-2.3 Extension attribute" as per test plan step 16 when TH writes DUT Endpoint 0 AccessControl cluster Extension attribute with AccessControlExtensionStruct containing none element response status should be 0x87 (CONSTRAINT_ERROR) but on V1.0.01 & V1.0.0.2 commit TH is not able to encode NONE attribute-value

Struct used : D_BAD_NONE: "" which is an octstr of length 0

Command used : ./chip-tool accesscontrol write extension '[{"data":""}]' 1 0

Expected Outcome :

[1657609694.046042][8236:8241] CHIP:DMG:
[1657609694.046078][8236:8241] CHIP:DMG: StatusIB =
[1657609694.046115][8236:8241] CHIP:DMG: {
[1657609694.046154][8236:8241] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR),
[1657609694.046192][8236:8241] CHIP:DMG: },

Actual Outcome :

[1673601099.394649][21869:21869] CHIP:TOO: Error while encoding attribute-values[0].data as a hex string.
Usage:
./chip-tool accesscontrol write attribute-name attribute-values destination-id endpoint-id-ignored-for-group-commands [--paa-trust-store-path] [--cd-trust-store-path] [--commissioner-name] [--commissioner-nodeid] [--use-max-sized-certs] [--only-allow-trusted-cd-keys] [--trace_file] [--trace_log] [--trace_decode] [--ble-adapter] [--timedInteractionTimeoutMs] [--data-version] [--suppressResponse] [--repeat-count] [--repeat-delay-ms] [--timeout]

Bug prevalence

Issue occurs only in V1.0.0.1 and V1.0.0.2 but not in latest master.

GitHub hash of the SDK that was being used

  • V1.0.0.1 - ca086f2f397fc4128f4964afb17433377e01faf4
  • V1.0.0.2 - 4088a77f557e8571a39338fad51a1d8eb0131d79
  • Master - 2a55f232cf705779d19f05497fa529cd661eef45 [Author: Shubham Patil [email protected] Date: Fri Jan 13 11:12:18 2023 +0530]

Platform : Raspi

Platform Version(s) : RPI 4, 8GB

Execution log :

@cjandhyala cjandhyala changed the title [ACL] Error while encoding attribute-values[0].data as a hex string for D_BAD_NONE: "" which is an octstr of length 0 [ACL-2.3] Error while encoding attribute-values[0].data as a hex string for D_BAD_NONE: "" which is an octstr of length 0 Jan 13, 2023
@bzbarsky-apple
Copy link
Contributor

Issue occurs only in V1.0.0.1 and V1.0.0.2 but not in latest master.

Presumably fixed by #24097

@lisaaaas
Copy link

lisaaaas commented Mar 9, 2023

I have met the same problem. May I ask what type it will be changed to?

@bzbarsky-apple
Copy link
Contributor

@lisaaaas I'm not sure what you are asking. What makes you think the type of anything will be changing?

@lisaaaas
Copy link

@lisaaaas I'm not sure what you are asking. What makes you think the type of anything will be changing?

What I mean is that the execution of instruction ./chip-tool accesscontrol write extension '[{"data":""}]' 1 0 is wrong. Is there any relevant modification of this command?

@bzbarsky-apple
Copy link
Contributor

What I mean is that the execution of instruction ./chip-tool accesscontrol write extension '[{"data":""}]' 1 0 is wrong.

Wrong in what sense? The expected behavior of that instruction is:

  1. A write is sent to the server with an empty octet string for the data.
  2. The server responds with CONSTRAINT_ERROR (because empty string is not a valid extension value).

This issue was about step 1 not happening correctly.

What behavior are you seeing @lisaaaas and what behavior are you expecting to see instead and why?

@stale
Copy link

stale bot commented Sep 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

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