airsonos icon indicating copy to clipboard operation
airsonos copied to clipboard

Error: Invalid key length

Open mattalxndr opened this issue 7 years ago • 3 comments

Searching for Sonos devices on network...

Family Room (@ 192.168.1.5:1400, RINCON_5CAAFD78602801400:0)

Search complete. Set up 1 device tunnel. crypto.js:239 this._handle.initiv(cipher, toBuf(key), toBuf(iv)); ^

Error: Invalid key length at Error (native) at new Decipheriv (crypto.js:239:16) at Object.Decipheriv (crypto.js:236:12) at Object.decryptAudioData (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/helper.js:141:25) at RtpServer. (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/rtp.js:32:23) at emitTwo (events.js:106:13) at Socket.emit (events.js:191:7) at UDP.onMessage (dgram.js:550:8)

mattalxndr avatar Jan 31 '17 10:01 mattalxndr

@mattalexx The problem is caused by a change in the crypto library in Node 6. See https://github.com/stephen/nodetunes/pull/42.

spdaly avatar Jan 31 '17 16:01 spdaly

Same issue.

swt83 avatar Feb 02 '17 17:02 swt83

This has been discussed in many issues already. I have condensed the workaround in this comment of mine: https://github.com/stephen/airsonos/issues/342#issuecomment-295770479

lfilho avatar Apr 20 '17 21:04 lfilho