Hi folks,
I've updated node-red-contrib-homekit-bridged to last 1.2.0 version and I'm getting this error thrown when starting node-red and visiting it's webpage: "Can't find variable: nrchkbVersion"
My searches on the net about "nrchkbVersion" gave no result :(
It was good to see you on discord. If you have a few minutes once you’re back running- please post the steps you took here. In case future users have similar issues.
So far I believe we learned:
-running on Mac mini
-node version 14.x
-nodered version 0.20 (upgraded!)
-plugin version 1.2.x
It’s too late now but I believe you might have avoided the issue if you’d upgraded nodered before upgrading the plugin. Please let us know if things worked out after upgrading nodered. Thanks!
Folks, quick feedback:
First of all, a tremendous thanks to the people (including CRXPorter, TheNON, Djiwondee) on Discord channel.
Nice, immediate reactivity, that's a real pleasure.
Then, here's what I did to fix the issue (honnestly, it was not expected):
• I first made a backup of my json config (located into ~/.node-red)
• Then I upgraded to Node.js version: v14.10.0, Node-RED version: v1.1.3
• I've deleted all homekit nodes from my config and removed node-red-contrib-homekit-bridged
• I've quitted node-red, moved back my json backup and launched node-red back again.
--> No more error, no more red dashed strokes on my homekit node. Everything's working back.
Thanks! It’s a good note, we should probably add a note to upgrade node, nodered, others before upgrading homekit.
I’m glad you’re sorted out.
Upgrading the plugin should not keep node red from starting. There should be a fault handling. Now I'm stuck with the same problem. This should have a big red warning sign in the release notes!!!
@B0rax Do you mean we need additional information to update node-red before updating nrchkb?
We have small warning as we thought that we are good but it seems there are some people with very old versions.
Yes a warning in the changelog to Update node-red before updating nrchkb would have saved me.
After updating node-red and NRCHKB I'm running into this issue that crashes node-red whenever there is a HomeKit node active:
26 Oct 10:47:59 - [red] Uncaught Exception:
26 Oct 10:47:59 - Error: Invalid IV length
at Cipheriv.createCipherBase (internal/crypto/cipher.js:79:18)
at Cipheriv.createCipherWithIV (internal/crypto/cipher.js:115:20)
at new Cipheriv (internal/crypto/cipher.js:217:22)
at Object.createCipheriv (crypto.js:109:10)
at Object.chacha20_poly1305_encryptAndSeal (/home/pi/.node-red/node_modules/hap-nodejs/dist/lib/util/hapCrypto.js:80:35)
at HAPServer._this._handlePairVerifyStepOne (/home/pi/.node-red/node_modules/hap-nodejs/dist/lib/HAPServer.js:499:39)
at HAPServer._this._handlePairVerify (/home/pi/.node-red/node_modules/hap-nodejs/dist/lib/HAPServer.js:463:23)
at IncomingMessage.<anonymous> (/home/pi/.node-red/node_modules/hap-nodejs/dist/lib/HAPServer.js:240:39)
at IncomingMessage.emit (events.js:198:13)
at endReadableNT (_stream_readable.js:1129:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
@B0rax this kind of info would be good?

Regarding your error. Update Node.js to latest LTS version. (12.x.y)
Hap-NodeJS (lib that is under the hood of nrchkb and homebridge) requires newer for security ciphers.
that looks good to me. Thanks!
The official node-red update script didn't update node.js to the newest version because it deemed my version "current enough". I now manually updated node.js to 12.19.0. and that fixed it :)
Thanks!
@B0rax to be honest I believe that node-red updater is updating Node.js to good enough version.
Is it possible for you to verify it for me?
As I said, it skipped updating node.js for my version. I had to update it manually.