Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get Plex URLs to queue #34

Open
wwwizzarrdry opened this issue Nov 12, 2018 · 6 comments
Open

Unable to get Plex URLs to queue #34

wwwizzarrdry opened this issue Nov 12, 2018 · 6 comments

Comments

@wwwizzarrdry
Copy link

Anyone else getting upnp 701 errors when they queue Plex tracks?

It's not unique to Sonos-web. It happens with all Sonos apis, as well as manually adding tracks.

Would like to know what Sonos is expecting here.

@denysvitali
Copy link
Owner

Does this happen with particular song formats?
Can you provide a log?

@wwwizzarrdry
Copy link
Author

wwwizzarrdry commented Nov 12, 2018

Seems to be anything I throw at it the Sonos api.
I can upload the logs in a little bit, but it's definitely not specific to your implementation as this happens with every Sonos API i've tried.

UnhandledPromiseRejectionWarning: StatusCodeError: 500 - 
<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>
at new StatusCodeError (C:\Users\wwwiz\Projects\node\sonos-web\node_modules\request-promise-core\lib\errors.js:32:15)
at Request.plumbing.callback (C:\Users\wwwiz\Projects\node\sonos-web\node_modules\request-promise-core\lib\plumbing.js:104:33)
at Request.RP$callback [as _callback] (C:\Users\wwwiz\Projects\node\sonos-web\node_modules\request-promise-core\lib\plumbing.js:46:31)
at Request.self.callback (C:\Users\wwwiz\Projects\node\sonos-web\node_modules\request\request.js:185:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (C:\Users\wwwiz\Projects\node\sonos-web\node_modules\request\request.js:1161:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (C:\Users\wwwiz\Projects\node\sonos-web\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:111:20)
at IncomingMessage.emit (events.js:208:7)
at endReadableNT (_stream_readable.js:1064:12)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)

@wwwizzarrdry
Copy link
Author

wwwizzarrdry commented Nov 12, 2018

TL;DR
This was a Plex/Certificate issue not accepting https URIs.

So interestingly enough, this whole time I've been trying to use SSL for my plex uris, but i just tried manually queueing http://192.168.2.115:32400/library/parts/316583/1351232504/file.mp3?X-Plex-Token=xxxx and it worked. Strangely, this works in fine in the browsers resource locator, just not via the Sonos api.

I'll modify your plugin to make this work over http. You may close this issue if you like.

@denysvitali
Copy link
Owner

You shouldn't be using https URLs with invalid certificates. That's why Plex created the *.plex.direct domain. You should take a look at the "Network" table on your browser when you visit the Plex page of your server, and extract the *.plex.direct hostname. For example: https://172-27-0-1.c7326dc46090423aa694172c95f89272.plex.direct:32400.

@wwwizzarrdry
Copy link
Author

Thanks for the info. Strange that I get different error codes depending on how I queie the track though. You'd think that a cert error would return the same error code across implementations.

@denysvitali
Copy link
Owner

No idea. Sonos's player implementation (anacapactl) kinda sucks. It has many unpredictable behaviors that I still don't understand...

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

No branches or pull requests

2 participants