stephen / airsonos

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

Invalid Key Length #327

Open discopolis opened 8 years ago

discopolis commented 8 years ago

Hi, I have installed AirSonos successfully and it sets up the device tunnels as it should. The speakers then appear on my iPhone but as soon as I select one and hit play it crashes and I get the following error message. I updated with the fix related to issue 320 that @kolky provided but to no avail.

Any ideas?

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)

massive commented 7 years ago

My "workaround" was to install older Node version (0.10.x) and use that instead of current LTS (6.9.x). That works in my case, but obviously is a bit cumbersome and won't work for everyone.

Bhlowe commented 7 years ago

I tried several versions of Node without success. My workaround was to use a docker image that works well. https://github.com/justintime/docker-airsonos

JBalloonist commented 7 years ago

@Bhlowe I'm new to using Docker. Do I need to install Node first in the container then run Airsonos? I followed the instructions to run the container but don't see the speaker in Airplay. Thanks in advance for any help.

Bhlowe commented 7 years ago

No just run the one docker command and it should start and work. Make sure the docker container is running and didn't quit -- use "docker ps"
Also make sure your firewall isn't blocking the exposed ports.

mattwwatson commented 7 years ago

I have same issue macos 10.11.6, node 7.2.0, npm 3.10.9

gnestor commented 7 years ago

Duplicate of https://github.com/stephen/airsonos/issues/338

tagdara commented 7 years ago

The fixes to helper.js in #316 worked for me today on this specific issue.