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

Updating the Fabric Label from iOS CHIPTool results in an error but updates the label correctly #15114

Closed
sagar-apple opened this issue Feb 12, 2022 · 0 comments · Fixed by #15122
Assignees

Comments

@sagar-apple
Copy link
Contributor

Problem

Using the Fabric Management screen to update the Fabric Label results in an error.

Command updateFabricLabel failed with Error ErrorDomain=CHIPErrorDomain Code=1 "undefined error:142."
UserInfo={NSLocalizedDescription=Undefinederror:142., errorCode=142}

The label does in fact get updated correctly as visiting the same page again will show the correct label for the fabric.

all-clusters-app logs
[1644627291233] [24568:20987731] CHIP: [EM] Handling via exchange: 49959r, Delegate: 0x10794df00
[1644627291233] [24568:20987731] CHIP: [DMG] InvokeRequestMessage =
[1644627291233] [24568:20987731] CHIP: [DMG] {
[1644627291233] [24568:20987731] CHIP: [DMG] 	suppressResponse = false, 
[1644627291233] [24568:20987731] CHIP: [DMG] 	timedRequest = false, 
[1644627291233] [24568:20987731] CHIP: [DMG] 	InvokeRequests =
[1644627291233] [24568:20987731] CHIP: [DMG] 	[
[1644627291233] [24568:20987731] CHIP: [DMG] 		CommandDataIB =
[1644627291233] [24568:20987731] CHIP: [DMG] 		{
[1644627291233] [24568:20987731] CHIP: [DMG] 			CommandPathIB =
[1644627291233] [24568:20987731] CHIP: [DMG] 			{
[1644627291233] [24568:20987731] CHIP: [DMG] 				EndpointId = 0x0,
[1644627291233] [24568:20987731] CHIP: [DMG] 				ClusterId = 0x3e,
[1644627291233] [24568:20987731] CHIP: [DMG] 				CommandId = 0x9,
[1644627291233] [24568:20987731] CHIP: [DMG] 			},
[1644627291233] [24568:20987731] CHIP: [DMG] 			
[1644627291233] [24568:20987731] CHIP: [DMG] 			CommandData = 
[1644627291233] [24568:20987731] CHIP: [DMG] 			{
[1644627291233] [24568:20987731] CHIP: [DMG] 				0x0 = "Hola", 
[1644627291233] [24568:20987731] CHIP: [DMG] 			},
[1644627291233] [24568:20987731] CHIP: [DMG] 		},
[1644627291233] [24568:20987731] CHIP: [DMG] 		
[1644627291233] [24568:20987731] CHIP: [DMG] 	],
[1644627291233] [24568:20987731] CHIP: [DMG] 	
[1644627291233] [24568:20987731] CHIP: [DMG] 	InteractionModelRevision = 1
[1644627291233] [24568:20987731] CHIP: [DMG] },
[1644627291233] [24568:20987731] CHIP: [DMG] AccessControl: checking f=1 a=c s=0xC9920843139F706A t= c=0x0000_003E e=0 p=o
[1644627291233] [24568:20987731] CHIP: [DMG] Received command for Endpoint=0 Cluster=0x0000_003E Command=0x0000_0009
[1644627291233] [24568:20987731] CHIP: [ZCL] OpCreds: UpdateFabricLabel
[1644627291233] [24568:20987731] CHIP: [ZCL] OpCreds: Finding fabric with fabricIndex 1
[1644627291234] [24568:20987731] CHIP: [DIS] Fabric (1) loaded from storage. Calling OnFabricRetrievedFromStorage
[1644627291234] [24568:20987731] CHIP: [ZCL] OpCreds: Fabric 0x1 was retrieved from storage. FabricId 0x0000000000000000, NodeId 0x0000000000000020, VendorId 0x0000
[1644627291234] [24568:20987731] CHIP: [ZCL] OpCreds: Call to fabricListChanged
[1644627291234] [24568:20987731] CHIP: [DMG] Endpoint 0, Cluster 0x0000_003E update version to c510bc5b
[1644627291234] [24568:20987731] CHIP: [DMG] Endpoint 0, Cluster 0x0000_003E update version to c510bc5c
[1644627291234] [24568:20987731] CHIP: [DIS] Fabric (1) loaded from storage. Calling OnFabricRetrievedFromStorage
[1644627291234] [24568:20987731] CHIP: [DIS] Fabric (1) loaded from storage. Calling OnFabricRetrievedFromStorage
[1644627291234] [24568:20987731] CHIP: [ZCL] OpCreds: Fabric 0x1 was retrieved from storage. FabricId 0x0000000000000000, NodeId 0x0000000000000020, VendorId 0x0000
[1644627291234] [24568:20987731] CHIP: [ZCL] OpCreds: Call to fabricListChanged
[1644627291234] [24568:20987731] CHIP: [DMG] Endpoint 0, Cluster 0x0000_003E update version to c510bc5d
[1644627291234] [24568:20987731] CHIP: [DMG] Endpoint 0, Cluster 0x0000_003E update version to c510bc5e
[1644627291234] [24568:20987731] CHIP: [DIS] Fabric (1) loaded from storage. Calling OnFabricRetrievedFromStorage
[1644627291235] [24568:20987731] CHIP: [DIS] Fabric (1) persisted to storage. Calling OnFabricPersistedToStorage
[1644627291235] [24568:20987731] CHIP: [ZCL] OpCreds: Fabric 1 was persisted to storage. FabricId 0000000000000000, NodeId 0000000000000020, VendorId 0x0000
[1644627291235] [24568:20987731] CHIP: [ZCL] OpCreds: Call to fabricListChanged
[1644627291235] [24568:20987731] CHIP: [DMG] Endpoint 0, Cluster 0x0000_003E update version to c510bc5f
[1644627291235] [24568:20987731] CHIP: [DMG] Endpoint 0, Cluster 0x0000_003E update version to c510bc60
[1644627291235] [24568:20987731] CHIP: [ZCL] OpCreds: Call to fabricListChanged
[1644627291235] [24568:20987731] CHIP: [DMG] Endpoint 0, Cluster 0x0000_003E update version to c510bc61
[1644627291235] [24568:20987731] CHIP: [DMG] Endpoint 0, Cluster 0x0000_003E update version to c510bc62
[1644627291235] [24568:20987731] CHIP: [DMG] ICR moving to [AddingComm]
[1644627291235] [24568:20987731] CHIP: [DMG] ICR moving to [AddedComma]
[1644627291235] [24568:20987731] CHIP: [DMG] Decreasing reference count for CommandHandler, remaining 0
[1644627291235] [24568:20987731] CHIP: [EM] Piggybacking Ack for MessageCounter:10227426 on exchange: 49959r
[1644627291235] [24568:20987731] CHIP: [IN] Prepared secure message 0x10794fe18 to 0xC9920843139F706A (1)  of type 0x9 and protocolId (0, 1) on exchange 49959r with MessageCounter:11438685.
[1644627291235] [24568:20987731] CHIP: [IN] Sending encrypted msg 0x10794fe18 with MessageCounter:11438685 to 0xC9920843139F706A (1) at monotonic time: 1465879067 msec
[1644627291235] [24568:20987731] CHIP: [DMG] ICR moving to [CommandSen]
[1644627291235] [24568:20987731] CHIP: [DMG] ICR moving to [AwaitingDe]
[1644627291239] [24568:20987731] CHIP: [EM] Received message of type 0x10 with protocolId (0, 0) and MessageCounter:10227427 on exchange 49959r
[1644627291239] [24568:20987731] CHIP: [EM] Found matching exchange: 49959r, Delegate: 0x0
[1644627291239] [24568:20987731] CHIP: [EM] Rxd Ack; Removing MessageCounter:11438685 from Retrans Table on exchange 49959r
[1644627291239] [24568:20987731] CHIP: [EM] Removed CHIP MessageCounter:11438685 from RetransTable on exchange 49959r

Proposed Solution

Debug and fix 🤷

@bzbarsky-apple bzbarsky-apple self-assigned this Feb 12, 2022
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Feb 12, 2022
1. Send a NOCResponse instead of a status response, like the spec says.
2. Implement the "check for fabric label collision" bit from the spec.
3. Update the name of the "Fabrics" attribute to match the spec.
4. Add a test for UpdateFabricLabel and reading the Fabrics attribute both
   before and after updating the label.

Fixes project-chip#15114
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Feb 12, 2022
1. Send a NOCResponse instead of a status response, like the spec says.
2. Implement the "check for fabric label collision" bit from the spec.
3. Update the name of the "Fabrics" attribute to match the spec.
4. Add a test for UpdateFabricLabel and reading the Fabrics attribute both
   before and after updating the label.

Fixes project-chip#15114
bzbarsky-apple added a commit to bzbarsky-apple/connectedhomeip that referenced this issue Feb 12, 2022
1. Send a NOCResponse instead of a status response, like the spec says.
2. Implement the "check for fabric label collision" bit from the spec.
3. Update the name of the "Fabrics" attribute to match the spec.
4. Add a test for UpdateFabricLabel and reading the Fabrics attribute both
   before and after updating the label.

Fixes project-chip#15114
vivien-apple pushed a commit that referenced this issue Feb 12, 2022
* Fix responses for UpdateFabricLabel to match the spec.

1. Send a NOCResponse instead of a status response, like the spec says.
2. Implement the "check for fabric label collision" bit from the spec.
3. Update the name of the "Fabrics" attribute to match the spec.
4. Add a test for UpdateFabricLabel and reading the Fabrics attribute both
   before and after updating the label.

Fixes #15114

* Fix handling of chip_tests_variables_has inside #each.

It looks like #each breaks the .parent chain that chip_tests_variables_has relies on.  Just
manually hook that up.
jamesluo11 pushed a commit to jamesluo11/connectedhomeip that referenced this issue Apr 26, 2022
…15122)

* Fix responses for UpdateFabricLabel to match the spec.

1. Send a NOCResponse instead of a status response, like the spec says.
2. Implement the "check for fabric label collision" bit from the spec.
3. Update the name of the "Fabrics" attribute to match the spec.
4. Add a test for UpdateFabricLabel and reading the Fabrics attribute both
   before and after updating the label.

Fixes project-chip#15114

* Fix handling of chip_tests_variables_has inside #each.

It looks like #each breaks the .parent chain that chip_tests_variables_has relies on.  Just
manually hook that up.
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

Successfully merging a pull request may close this issue.

2 participants