stuartlangridge/simple-js-matter-device

Failed to pair

Closed this issue · 2 comments

Thank you for this - it's exactly what I was looking for today. Alas no worky.

Ran demo. Google Home on iPhone discovered virtual device and started pairing sequence. I scanned QR code from console, and during pairing to my account saw below errors on console. Ultimately device failed to pair with message on phone "Something went wrong Please try again"

Node JS 20.13.1; Ubuntu 22.04
Google Home app 3.16.104; iOS 17.5.1

2024-06-01 18:02:05.379 INFO  Device               QR Code URL: https://project-chip.github.io/connectedhomeip/qrcode.html?data=MT:Y.K90-Q000KA0648G00
2024-06-01 18:02:05.379 INFO  Device               Manual pairing code: 34970112332
2024-06-01 18:02:31.048 INFO  PaseServer           Pase server: Received pairing request from udp://fe80::4c2:423d:1843:7cf0%enp0s25:55071
2024-06-01 18:02:31.176 INFO  PaseServer           Pase server: session 24182 created with udp://fe80::4c2:423d:1843:7cf0%enp0s25:55071
2024-06-01 18:02:34.302 INFO  Operationa~alsServer addOperationalCert success
2024-06-01 18:02:34.513 INFO  CaseServer           Received pairing request from udp://fe80::4c2:423d:1843:7cf0%enp0s25:55071
2024-06-01 18:02:34.524 INFO  CaseServer           session 24183 created with udp://fe80::4c2:423d:1843:7cf0%enp0s25:55071 for Fabric 000000003AD6F76A(index 2) and PeerNode 00000000697DD470
2024-06-01 18:02:34.624 INFO  GeneralCom~erHandler Commissioning completed on fabric #2929867944 as node #987166570.
2024-06-01 18:02:35.009 ERROR InteractionMessenger Not implemented
    at revokeCommissioning (/home/magnus/node/simple-js-matter-device/node_modules/@project-chip/matter.js/dist/cjs/cluster/server/AdministratorCommissioningServer.js:30:11)
    at /home/magnus/node/simple-js-matter-device/node_modules/@project-chip/matter.js/dist/cjs/cluster/server/AdministratorCommissioningServer.js:40:13
    at Generator.next (<anonymous>)
    at /home/magnus/node/simple-js-matter-device/node_modules/@project-chip/matter.js/dist/cjs/cluster/server/AdministratorCommissioningServer.js:13:71
    at new Promise (<anonymous>)
    at __awaiter (/home/magnus/node/simple-js-matter-device/node_modules/@project-chip/matter.js/dist/cjs/cluster/server/AdministratorCommissioningServer.js:9:12)
    at revokeCommissioning (/home/magnus/node/simple-js-matter-device/node_modules/@project-chip/matter.js/dist/cjs/cluster/server/AdministratorCommissioningServer.js:39:16)
    at CommandServer.handler (/home/magnus/node/simple-js-matter-device/node_modules/@project-chip/matter.js/dist/cjs/cluster/server/ClusterServer.js:256:164)
    at CommandServer.<anonymous> (/home/magnus/node/simple-js-matter-device/node_modules/@project-chip/matter.js/dist/cjs/cluster/server/CommandServer.js:33:41)
    at Generator.next (<anonymous>)
2024-06-01 18:02:35.217 INFO  PaseServer           Pase server: Received pairing request from udp://fe80::4c2:423d:1843:7cf0%enp0s25:59801
2024-06-01 18:02:35.395 INFO  PaseServer           Pase server: session 24184 created with udp://fe80::4c2:423d:1843:7cf0%enp0s25:59801

So... I was trying to pair with the Google Home app on a managed iPhone where the iCloud Keychain is disabled by policy. Since the Google Home app attempted to commission into iOS (aka Apple Home), which uses iCloud Keychain for storage, it was failing at that point. I think at that point Google Home tries to revokeCommissioning, which is not implemented. Long-story-short, it was a problem with my device, not with the code.

Thank you for the detail! A proper implementation of all this would of course implement that function and cope with this situation, but this is more in the nature of a quick demo :) It's great that you worked this out, though; good luck with your project!