Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Works from mac, but crashes when iphone sends a track #253

Closed
publicmayhem opened this issue Dec 22, 2015 · 5 comments
Closed

Works from mac, but crashes when iphone sends a track #253

publicmayhem opened this issue Dec 22, 2015 · 5 comments

Comments

@publicmayhem
Copy link

osx version : 10.11.2 (15C50)
node --version: v5.2.0

airsonos runs up and works fine from my mac, playing music from iTunes to my Sonos speaker. But when I try to play music from my iPhone, my phone is able to connect ok as an airplay device, but crashes with the following console output on my mac as soon as it tries to play a track or any sound.

Search complete. Set up 1 device tunnel.
/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/rtspmethods.js:233
debug('uncaptured SET_PARAMETER method: %s', req.content.toString().trim());
^

TypeError: Cannot read property 'toString' of undefined
at setParameter (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/rtspmethods.js:233:63)
at RtspServer. (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/rtsp.js:60:7)
at emitTwo (events.js:88:13)
at ServerParser.emit (events.js:173:7)
at ServerParser._emitMessage (/usr/local/lib/node_modules/airsonos/node_modules/httplike/lib/server-parser.js:28:8)
at ServerParser.Parser._write (/usr/local/lib/node_modules/airsonos/node_modules/httplike/lib/parser.js:91:14)
at doWrite (_stream_writable.js:293:12)
at writeOrBuffer (_stream_writable.js:279:5)
at ServerParser.Writable.write (_stream_writable.js:208:11)
at Socket.ondata (_stream_readable.js:529:20)
at emitOne (events.js:78:13)
at Socket.emit (events.js:170:7)
at readableAddChunk (_stream_readable.js:147:16)
at Socket.Readable.push (_stream_readable.js:111:10)
at TCP.onread (net.js:524:20)

@FabioFuschi-SNK
Copy link

Hello,

i had the same issue here, i tried to uncomment this debug line in
/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/rtspmethods.js:233
and no its working without error.

so there is just a little error in the nodetunes module.
stephen/nodetunes#39

I hope this helps you.

@briankennedy1
Copy link

I was having the same problem trying to AirPlay from NPR One on my iPhone to my Sonos. Spotify and iBooks were working just fine, but NPR One must be missing some data.

I went to /usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/rtspmethods.js:233 and changed the line to debug('uncaptured SET_PARAMETER method: %s', req.getHeader('Content-Type')); as described in FabioFuschi-SNK's link.

Now it's working fine!

@chrismanahan
Copy link

I had the same issue, where Spotify would work, then playing NPR bricked it, even when switch back to Spotify after. Changing the debug line as Brian said fixed if for me too!

@colinrioux
Copy link

Possible for you to send you config... aka like are you connecting the speaker directly via ethernet or w/ the bridge?

@publicmayhem
Copy link
Author

On reading the comments, I downloaded the source and compiled, and it worked without need to change the debug line suggested. Seems to be fixed on master. Thx for your help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants