stephen / airsonos

:musical_note: AirPlay to Sonos
MIT License
2.1k stars 255 forks source link

Error: Invalid key length #354

Open mattalxndr opened 7 years ago

mattalxndr commented 7 years ago

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)

spdaly commented 7 years ago

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

swt83 commented 7 years ago

Same issue.

lfilho commented 7 years ago

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