denysvitali / sonos-web

Web interface for Sonos audio systems
120 stars 14 forks source link

Starting server fails with "TypeError: Cannot read property 'match' of undefined" #22

Closed peterkeller closed 7 years ago

peterkeller commented 7 years ago

npm v3.10.9 node v6.9.2

Taking the actual master branch and starting the server with npm start it fails with "TypeError: Cannot read property 'match' of undefined":

[575]% npm start

> sonos-web@1.0.1 start /Development/sonos/sonos-web
> gulp bundle && node server.js
...
[I] Plugin sonos-web-soundcloud was loaded
YouTube {}
[I] Plugin sonos-web-youtube was loaded
Sonos {
  host: '192.168.1.35',
  port: 1400,
  options: 
   { endpoints: 
      { transport: '/MediaRenderer/AVTransport/Control',
        rendering: '/MediaRenderer/RenderingControl/Control',
        device: '/DeviceProperties/Control' } } }
/player/widget-888cef9-2d55a6d8.js
/Development/sonos/sonos-web/plugins/soundcloud/main.js:97
            var clientId = body.match(/"([A-z0-9]{32})"/i);
                               ^

TypeError: Cannot read property 'match' of undefined
    at SoundCloud._parseWidgetJs (/Development/sonos/sonos-web/plugins/soundcloud/main.js:97:32)
    at Request._request [as _callback] (/Development/sonos/sonos-web/plugins/soundcloud/main.js:90:30)
    at self.callback (/Development/sonos/sonos-web/node_modules/request/request.js:188:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at Request.init (/Development/sonos/sonos-web/node_modules/request/request.js:276:17)
    at new Request (/Development/sonos/sonos-web/node_modules/request/request.js:130:8)
    at SoundCloud.request [as _request] (/Development/sonos/sonos-web/node_modules/request/index.js:54:10)
    at Request._request [as _callback] (/Development/sonos/sonos-web/plugins/soundcloud/main.js:89:26)
    at Request.self.callback (/Development/sonos/sonos-web/node_modules/request/request.js:188:22)

npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.9.2
npm ERR! npm  v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! sonos-web@1.0.1 start: `gulp bundle && node server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sonos-web@1.0.1 start script 'gulp bundle && node server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sonos-web package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gulp bundle && node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs sonos-web
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls sonos-web
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Development/sonos/sonos-web/npm-debug.log
denysvitali commented 7 years ago

I'm closing the issue, if this doesn't fix it feel free to comment and I'll reopen it