Skip to content

Sonos addandplay error #18

@maccyber

Description

@maccyber
sonos -a spotify:track:26DGqPBe4GnSu6KRxpKq1F

Gives:

TypeError: Cannot read property '0' of undefined
/usr/lib/node_modules/sonos_cli/sonos_additions.js:61
      var newIndex =  _.reduce(data[0].FirstTrackNumberEnqueued, function(it, num){

Wireshark capture

POST /MediaRenderer/AVTransport/Control HTTP/1.1
SOAPAction: "urn:schemas-upnp-org:service:AVTransport:1#AddURIToQueue"
Content-type: text/xml; charset=utf8
host: 10.0.0.97:1400
content-length: 1207
Connection: close

<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<u:AddURIToQueue xmlns:u="urn:schemas-upnp-org:service:AVTransport:1">
<InstanceID>0</InstanceID>
<EnqueuedURI>x-sonos-spotify:spotify%3Atrack%3A26DGqPBe4GnSu6KRxpKq1F</EnqueuedURI>
<EnqueuedURIMetaData>&lt;DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns:r="urn:schemas-rinconnetworks-com:metadata-1-0/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/"&gt;&lt;item id="00030000spotify%3Atrack%3A26DGqPBe4GnSu6KRxpKq1F"  restricted="true"&gt;&lt;dc:title&gt;America&lt;/dc:title&gt;            &lt;upnp:class&gt;object.item.audioItem.musicTrack&lt;/upnp:class&gt;&lt;desc id="cdudn"            nameSpace="urn:schemas-rinconnetworks-com:metadata-1-0/"&gt;SA_RINCON2311_X_#Svc2311-0-Token&lt;/desc&gt;&lt;/item&gt;&lt;/DIDL-Lite&gt;</EnqueuedURIMetaData>
<DesiredFirstTrackNumberEnqueued>NaN</DesiredFirstTrackNumberEnqueued>
<EnqueueAsNext>0</EnqueueAsNext>
</u:AddURIToQueue></s:Body></s:Envelope>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<s:Body>
<s:Fault>
<faultcode>s:Client</faultcode>
<faultstring>UPnPError</faultstring>
<detail>
<UPnPError xmlns="urn:schemas-upnp-org:control-1-0">
<errorCode>800</errorCode></UPnPError>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions