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

Error on commissioning step 'AttestationVerification'; CHIP Error 0x000000AC: Internal error #209

Closed
huytungst opened this issue Mar 8, 2024 · 2 comments

Comments

@huytungst
Copy link

huytungst commented Mar 8, 2024

Thank you for your work.

I could get commissioning and control (on/off) my Matter light bubble without any problems with sample app ver 1.4.2.

After updating the app to ver 2.0.0, I'm stuck right at the step of commissioning with the same smartphone and the same Matter light bulb. In case of a virtual device, everything's still OK.

Device info:

  • Phone: Samsung SM-A305N, Android 11.0 (API 30).
  • Matter Device: Matter light bulb; Matter smart plug. These are Matter certified products and 've been sold to the market.
  • Sample app v 2.0.0

Logcat:

Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification'
Performing next commissioning step 'AttestationVerification'
Verifying attestation
Failed in verifying 'Attestation Information' command received from the device: err 101. Look at AttestationVerificationResult enum to understand the errors
onCommissioningStatusUpdate nodeId [5426229861106051505]  stage [AttestationVerification]  errorCode [172]
Error on commissioning step 'AttestationVerification': '../../src/controller/CHIPDeviceController.cpp:1078: CHIP Error 0x000000AC: Internal error'
Failed to perform commissioning step 8
Going from commissioning step 'AttestationVerification' with lastErr = '../../src/controller/CHIPDeviceController.cpp:1078: CHIP Error 0x000000AC: Internal error' -> 'Cleanup'
Performing next commissioning step 'Cleanup' with completion status = '../../src/controller/CHIPDeviceController.cpp:1078: CHIP Error 0x000000AC: Internal error'
Expiring failsafe on proxy 0x7e94c11428
ICR moving to [AddingComm]
ICR moving to [AddedComma]
<<< [E:30658i S:6949 M:78352732] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest)
(S) Sending msg 78352732 on secure session with LSID: 6949
ICR moving to [CommandSen]
ICR moving to [AwaitingDe]
<<< [E:30657i S:6949 M:78352733 (Ack:253397290)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
(S) Sending msg 78352733 on secure session with LSID: 6949
Flushed pending ack for MessageCounter:253397290 on exchange 30657i
>>> [E:30658i S:6949 M:253397291 (Ack:78352732)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
Found matching exchange: 30658i, Delegate: 0x7e3f125f88
Rxd Ack; Removing MessageCounter:78352732 from Retrans Table on exchange 30658i
ICR moving to [ResponseRe]
InvokeResponseMessage =
{
	suppressResponse = false, 
	InvokeResponseIBs =
	[
		InvokeResponseIB =
		{
			CommandDataIB =
			{
				CommandPathIB =
				{
					EndpointId = 0x0,
					ClusterId = 0x30,
					CommandId = 0x1,
				},
				
				CommandFields = 
				{
					0x0 = 0, 
					0x1 = "" (0 chars), 
				},
			},
			
		},
		
	],
	
	InteractionModelRevision = 1
},
Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001
Failsafe disarmed
onCommissioningStatusUpdate nodeId [5426229861106051505]  stage [Cleanup]  errorCode [0]
Successfully finished commissioning step 'Cleanup'
BaseCompletionListener onCommissioningComplete(): nodeId [5426229861106051505] errorCode [172]
SecureSession[0x7e96289288]: MarkForEviction Type:1 LSID:6949
SecureSession[0x7e96289288]: Moving from state 'kActive' --> 'kPendingEviction'
Failed to send Solitary ack for MessageCounter:253397291 on exchange 30658i:../../src/messaging/ExchangeContext.cpp:144: CHIP Error 0x00000002: Connection aborted
ICR moving to [AwaitingDe]
SecureSession[0x7e96289288]: Released - Type:1 LSID:6949
onCommissioningRequested() failed
java.lang.IllegalStateException: Commissioning failed with error code [172]
	at com.google.homesampleapp.chip.ChipClient$awaitCommissionDevice$2$1.onCommissioningComplete(ChipClient.kt:186)
	at chip.devicecontroller.ChipDeviceController.onCommissioningComplete(ChipDeviceController.java:335)
Commissioning: commissioningServiceDelegate.sendCommissioningError() succeeded

====

Update 1: Same issue with a Matter plug.

Failed in verifying 'Attestation Information' command received from the device: err 101. Look at AttestationVerificationResult enum to understand the errors
onCommissioningStatusUpdate nodeId [202756643158162706]  stage [AttestationVerification]  errorCode [172]
Error on commissioning step 'AttestationVerification': '../../src/controller/CHIPDeviceController.cpp:1078: CHIP Error 0x000000AC: Internal error'
Failed to perform commissioning step 8
Going from commissioning step 'AttestationVerification' with lastErr = '../../src/controller/CHIPDeviceController.cpp:1078: CHIP Error 0x000000AC: Internal error' -> 'Cleanup'
Performing next commissioning step 'Cleanup' with completion status = '../../src/controller/CHIPDeviceController.cpp:1078: CHIP Error 0x000000AC: Internal error'
Expiring failsafe on proxy 0x7e426334e8
ICR moving to [AddingComm]
ICR moving to [AddedComma]
<<< [E:51538i S:47211 M:41956359] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0001:08 (IM:InvokeCommandRequest)
(S) Sending msg 41956359 on secure session with LSID: 47211
ICR moving to [CommandSen]
ICR moving to [AwaitingDe]
<<< [E:51537i S:47211 M:41956360 (Ack:174931977)] (S) Msg TX to 0:FFFFFFFB00000000 [0000] --- Type 0000:10 (SecureChannel:StandaloneAck)
(S) Sending msg 41956360 on secure session with LSID: 47211
Flushed pending ack for MessageCounter:174931977 on exchange 51537i
>>> [E:51538i S:47211 M:174931978 (Ack:41956359)] (S) Msg RX from 0:FFFFFFFB00000000 [0000] --- Type 0001:09 (IM:InvokeCommandResponse)
Found matching exchange: 51538i, Delegate: 0x7f3581eb88
Rxd Ack; Removing MessageCounter:41956359 from Retrans Table on exchange 51538i
ICR moving to [ResponseRe]
InvokeResponseMessage =
{
	suppressResponse = false, 
	InvokeResponseIBs =
	[
		InvokeResponseIB =
		{
			CommandDataIB =
			{
				CommandPathIB =
				{
					EndpointId = 0x0,
					ClusterId = 0x30,
					CommandId = 0x1,
				},
				
				CommandFields = 
				{
					0x0 = 0, 
					0x1 = "" (0 chars), 
				},
			},
			
		},
		
	],
	
	InteractionModelRevision = 1
},
Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001
Failsafe disarmed
onCommissioningStatusUpdate nodeId [202756643158162706]  stage [Cleanup]  errorCode [0]
Successfully finished commissioning step 'Cleanup'
BaseCompletionListener onCommissioningComplete(): nodeId [202756643158162706] errorCode [172]
SecureSession[0x7e94b5b288]: MarkForEviction Type:1 LSID:47211
SecureSession[0x7e94b5b288]: Moving from state 'kActive' --> 'kPendingEviction'
Failed to send Solitary ack for MessageCounter:174931978 on exchange 51538i:../../src/messaging/ExchangeContext.cpp:144: CHIP Error 0x00000002: Connection aborted
ICR moving to [AwaitingDe]
SecureSession[0x7e94b5b288]: Released - Type:1 LSID:47211
onCommissioningRequested() failed
java.lang.IllegalStateException: Commissioning failed with error code [172]
	at com.google.homesampleapp.chip.ChipClient$awaitCommissionDevice$2$1.onCommissioningComplete(ChipClient.kt:186)
	at chip.devicecontroller.ChipDeviceController.onCommissioningComplete(ChipDeviceController.java:335)
Commissioning: commissioningServiceDelegate.sendCommissioningError() succeeded

===

Update 2: Same issue when commissioning via multi-admin device sharing from another app (Tuya Smart Life App)

@huytungst
Copy link
Author

huytungst commented Mar 12, 2024

I see that my problem is quite similar to the issue #206.

Since it said it was a CHIP internal error, I've tried replacing the CHIP library with traditional .so and .jar library files (like v 1.4.2 did). I also tried installing the app using the default apk file. But I still got the same errors.

@huytungst
Copy link
Author

Removing comment-out of HomeScreen.kt line 259 solves this issue.

HomeScreen.kt:259

As-is
// homeViewModel.setDeviceAttestationDelegate()

To-be
homeViewModel.setDeviceAttestationDelegate()

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

1 participant