stephen / nodetunes

AirTunes v2 Server implementation
214 stars 64 forks source link

Fix for nodestunes crypto crash; 302. #42

Open Kolky opened 8 years ago

Kolky commented 8 years ago

This solves airsonos issue #302. Using node v6.2.1 and npm 3.9.6.

ntwb commented 8 years ago

Thanks, this fixed AirSonos for me 👍

NPM v3.10.3, NodeJS v6.2.2 Mac OS X v10.11.5

mrjcleaver commented 8 years ago

Great, solved the problem for me too! Thank you :)

NPM 3.9.3 NodeJS 6.2.1 Mac OS X 10.10.5

nickgs commented 8 years ago

This worked great for me too. Thanks!

NPM 3.8.8 NodeJS v6.2.0 Mac OS X v10.11.5

denisbr commented 8 years ago

Works for me too, thanks.

rib1 commented 8 years ago

works, thanks!

foomac:airsonos doe$ system_profiler SPSoftwareDataType Software:

System Software Overview:

  System Version: OS X 10.11.5 (15F34)
  Kernel Version: Darwin 15.5.0
  Boot Volume: Macintosh HD
  Boot Mode: Normal
  Computer Name: foomac
  Secure Virtual Memory: Enabled
  System Integrity Protection: Enabled

foomac:airsonos doe$ node --version v6.2.0 foomac:airsonos doe$ npm --version 3.10.3

h9nry commented 8 years ago

works, thanks! node 6.3.0, npm 3.10.3, RaspberryPi 3

richardtape commented 8 years ago

Also allowed me to use airsonos. Couldn't be happier. Thanks so much!

bengotow commented 8 years ago

This is definitely the fix for the airsonos issue (worked for me at least!) Would be great to see this merged.

alessiodionisi commented 8 years ago

This fixed Nodetunes for me (macOS Sierra / iOS 10)

Please Pull!!

zzamzoum commented 7 years ago

Hello everyone I am totally beginner and I try to install airsonos on my mac Sierra 10.12. So I followed your advice .. but when I run youtube or VLC I get the following error: Error: Invalid key length this is from the that I can not understand how you manage to settle the problem. If someone has a little time to help me I would be grateful thank you

georgieapt commented 7 years ago

Hi, Complete newbie to techie stuff also. Sorry, need a bit of a dummies guide here! How/where am I inputting this fix?

Thanks, Georgie

ntwb commented 7 years ago

FYI: The new Sonos beta software version 7 now supports playing directly from Spotify 💥 So if you're here for the AIrSonos fix and you use Spotify you might no longer need this 🎉

ernie932 commented 7 years ago

I also need help. I installed airsonos using this tutorial: https://hipsterpixel.co/2016/02/02/how-to-airplay-music-and-podcasts-to-your-sonos-speakers-tutorial/

I am not sure how to input this change. I have a Mac and am using Terminal. Do i use npm to install this fix? I am a total noob. Please help. I just need what command I need to put into Terminal to get this working.

gismo141 commented 7 years ago

Alright - How to install a working version:

First remove everything you've installed already:

npm uninstall -g airsonos
npm uninstall -g nodetunes

Then install the working forks:

npm install -g git://github.com/Kolky/nodetunes.git#master
cd ~
git clone https://github.com/lsmith77/airsonos.git airsonos
cd airsonos
npm install babel
npm install -g

Now everything should be installed so you now can execute that damn thing and hopefully it works:

airsonos
ernie932 commented 7 years ago

Thank you! I will try this out when I get home. One quick question: Why do I need to install babel? Is it something that airsonos needs to run properly?

gismo141 commented 7 years ago

Yes somehow it is needed and written down as well in the dependencies.

I just reset my Mac so I was forced to reinstall everything and babel was one of the missing things. Hopefully you're able to resolve the problem as well!

ernie932 commented 7 years ago

Thank you so much! I was able to get it. Terminal gave me an error asking to run the command as root/Administrator. So I looked it up and ran the commands with sudo before it.

Thanks again!

gismo141 commented 7 years ago

Glad it worked - have fun!

burnflare commented 7 years ago

This fixed airsonos for me! Any reason why this hasn't been merged into master yet?

zzamzoum commented 7 years ago

Hello Michael, I followed your explanations but here is the error message that appears when I run airsons. Could you help me ? Thank you in advance ;)


De : Michael Riedel notifications@github.com Envoyé : lundi 21 novembre 2016 16:32:29 À : stephen/nodetunes Cc : zzamzoum; Comment Objet : Re: [stephen/nodetunes] Fix for nodestunes crypto crash; 302. (#42)

Alright - How to install a working version:

First remove everything you already installed:

npm uninstall -g airsonos npm uninstall -g nodetunes

Then install the working forks:

npm install -g git://github.com/Kolky/nodetunes.git#master npm install babel cd ~ git clone https://github.com/lsmith77/airsonos.git airsonos cd airsonos npm install -g

Now everything should be installed so you now can execute that damn thing and hopefully it works:

airsonos

- You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/stephen/nodetunes/pull/42#issuecomment-261970525, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVxwqrsj2QJMbqeHMeE353spNT021T67ks5rAbmNgaJpZM4I5Quw.

zzamzoum commented 7 years ago

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.<anonymous> (/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)

MacBook-Pro-de-abdelaziz:airsonos abdelazizboudriga$


De : Michael Riedel notifications@github.com Envoyé : lundi 21 novembre 2016 16:32:29 À : stephen/nodetunes Cc : zzamzoum; Comment Objet : Re: [stephen/nodetunes] Fix for nodestunes crypto crash; 302. (#42)

Alright - How to install a working version:

First remove everything you already installed:

npm uninstall -g airsonos npm uninstall -g nodetunes

Then install the working forks:

npm install -g git://github.com/Kolky/nodetunes.git#master npm install babel cd ~ git clone https://github.com/lsmith77/airsonos.git airsonos cd airsonos npm install -g

Now everything should be installed so you now can execute that damn thing and hopefully it works:

airsonos

- You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/stephen/nodetunes/pull/42#issuecomment-261970525, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVxwqrsj2QJMbqeHMeE353spNT021T67ks5rAbmNgaJpZM4I5Quw.

zzamzoum commented 7 years ago

every thing was ok but when I enter this code : nom Install -g i have this

MacBook-Pro-de-abdelaziz:~ abdelazizboudriga$ sudo npm install -g

npm ERR! addLocal Could not install /Users/abdelazizboudriga

npm ERR! Darwin 16.1.0

npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g"

npm ERR! node v7.2.0

npm ERR! npm v3.10.9

npm ERR! code EISDIR

npm ERR! errno -21

npm ERR! syscall read

npm ERR! eisdir EISDIR: illegal operation on a directory, read

npm ERR! eisdir This is most likely not a problem with npm itself

npm ERR! eisdir and is related to npm not being able to find a package.json in

npm ERR! eisdir a package you are trying to install.

npm ERR! Please include the following file with any support request:

npm ERR! /Users/abdelazizboudriga/npm-debug.log


De : Michael Riedel notifications@github.com Envoyé : lundi 21 novembre 2016 16:32:29 À : stephen/nodetunes Cc : zzamzoum; Comment Objet : Re: [stephen/nodetunes] Fix for nodestunes crypto crash; 302. (#42)

Alright - How to install a working version:

First remove everything you already installed:

npm uninstall -g airsonos npm uninstall -g nodetunes

Then install the working forks:

npm install -g git://github.com/Kolky/nodetunes.git#master npm install babel cd ~ git clone https://github.com/lsmith77/airsonos.git airsonos cd airsonos npm install -g

Now everything should be installed so you now can execute that damn thing and hopefully it works:

airsonos

- You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/stephen/nodetunes/pull/42#issuecomment-261970525, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVxwqrsj2QJMbqeHMeE353spNT021T67ks5rAbmNgaJpZM4I5Quw.

gismo141 commented 7 years ago

It looks like you are executing the command in the wrong directory.

Please verify that you are executing it in the airsonos directory. You can verify the directory by issuing

pwd
zzamzoum commented 7 years ago

i verify that but another pb..

MacBook-Pro-de-abdelaziz:airsonos abdelazizboudriga$ pwd

/Users/abdelazizboudriga/airsonos

MacBook-Pro-de-abdelaziz:airsonos abdelazizboudriga$ sudo npm install -g

npm WARN lifecycle airsonos@0.2.6~prepublish: cannot run in wd %s %s (wd=%s) airsonos@0.2.6 babel ./lib/ -d ./bin/ /Users/abdelazizboudriga/airsonos

npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

npm WARN deprecated static-favicon@1.0.2: use serve-favicon module

npm WARN deprecated react-tools@0.13.3: react-tools is deprecated. For more information, visit https://fb.me/react-tools-deprecated

npm WARN deprecated node-uuid@1.4.7: use uuid module instead

npm ERR! Darwin 16.1.0

npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g"

npm ERR! node v6.9.1

npm ERR! npm v3.10.8

npm ERR! path /usr/local/lib/node_modules/airsonos/bin/index.js

npm ERR! code ENOENT

npm ERR! errno -2

npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/airsonos/bin/index.js'

npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/airsonos/bin/index.js'

npm ERR! enoent This is most likely not a problem with npm itself

npm ERR! enoent and is related to npm not being able to find a file.

npm ERR! enoent

npm ERR! Please include the following file with any support request:

npm ERR! /Users/abdelazizboudriga/airsonos/npm-debug.log

MacBook-Pro-de-abdelaziz:airsonos abdelazizboudriga$


De : Michael Riedel notifications@github.com Envoyé : jeudi 1 décembre 2016 17:01:38 À : stephen/nodetunes Cc : zzamzoum; Comment Objet : Re: [stephen/nodetunes] Fix for nodestunes crypto crash; 302. (#42)

It looks like you are executing the command in the wrong directory.

Please verify that you are executing it in the airsonos directory. You can verify the directory by issuing

pwd

- You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/stephen/nodetunes/pull/42#issuecomment-264212971, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVxwqpyN6URAYNzl_NB2sfRFGgokijYpks5rDu9igaJpZM4I5Quw.

layzzzee8 commented 7 years ago

I get the same error

JBalloonist commented 7 years ago

Awesome this is working for me as well. Thank you!

gismo141 commented 7 years ago

@layzzzee8 and @zzamzoum normally you shouldn't need to use sudo to install these things.

If you need to, then maybe you could add --unsafe-perm to the npm install-calls. E.g.

sudo npm install -g --unsafe-perm

See this Stack Overflow Topic.

Hopefully this helps.

russbrenner commented 7 years ago

Worked with the following procedure, as posted by @gismo141 above.

npm uninstall -g airsono npm uninstall -g nodetunes

npm install -g git://github.com/Kolky/nodetunes.git#master cd ~ (or whatever WD you want) git clone https://github.com/lsmith77/airsonos.git airsonos cd airsonos npm install -g

Installs airsonos in /usr/local/bin/airsonos (global prefix assumed).

I've been running it with forever:

npm install -g forever forever start -a -l forever.log -o airsonos.log -e airsonos_error.log /usr/local/bin/airsonos

System info:

System Version: macOS 10.12.2 (16C68) Kernel Version: Darwin 16.3.0 Boot Mode: Normal Secure Virtual Memory: Enabled System Integrity Protection: Enabled

npm -v 4.0.5

node -v v7.4.0

sabrehagen commented 7 years ago

@stephen Why is this not merged?

HugoGresse commented 6 years ago

@stephen Why is this not merged?

jvanaert commented 6 years ago

Hi @stephen would it be possible to merge this fix ? It would make the experience for new devs much easier to get things working with your nice libraries ! Or are you open for transferring the maintenance of this awesome lib into the community ? Thanks ! Jeroen