Git Product home page Git Product logo

Comments (4)

stephen avatar stephen commented on June 3, 2024

Hm, I don't believe this should be the reason for this error popping up.

Nodetunes should compensate for ports being used, and attempts to find something between 5000 and 5050 that's unused. (see: https://github.com/stephen/nodetunes/blob/master/lib/server.js#L50-L53)

from airsonos.

LinusU avatar LinusU commented on June 3, 2024

Just to clarify, my server wasn't listening at all. I thought that it was listening on port 5000 and thus directed my web browser to http://localhost:5000. That made it send GET / HTTP/1.1\r\n to the airsonos process, which then failed when trying to execute the function methodMapping['GET'].

from airsonos.

jorgenkg avatar jorgenkg commented on June 3, 2024

First of all: @stephen, I love airsonos!

This error also occurs on my Mac whenever I try to AirPlay the sound output from the computer to airsonos. From my understanding, it seems that nodetunes might be the problem.

I'm not sure whether you've got access to a Mac, but I've describe how to reproduce the error below:

  1. Option-click the speaker icon in the top right
  2. Select the airsonos instance
  3. The appended errorlog is then printed:
Searching for Sonos devices on network...
Setting up AirSonos for [PLAY:3]

/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/rtsp.js:47
    this.methodMapping[req.method](req, res);
                                  ^
TypeError: Property '' of object #<Object> is not a function
    at RtspServer.<anonymous> (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/lib/rtsp.js:47:35)
    at EventEmitter.emit (events.js:98:17)
    at null.<anonymous> (/usr/local/lib/node_modules/airsonos/node_modules/nodetunes/node_modules/httplike/lib/server/parser.js:78:16)
    at Socket.EventEmitter.emit (events.js:95:17)
    at Socket.<anonymous> (_stream_readable.js:745:14)
    at Socket.EventEmitter.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:407:10)
    at emitReadable (_stream_readable.js:403:5)
    at readableAddChunk (_stream_readable.js:165:9)
    at Socket.Readable.push (_stream_readable.js:127:10)

from airsonos.

stephen avatar stephen commented on June 3, 2024

I believe this should be fixed in 0.0.17. (nodetunes now checks for invalid methods)

from airsonos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.