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

Adding Youtube Music service fails #199

Open
Cybso opened this issue Jan 18, 2023 · 5 comments
Open

Adding Youtube Music service fails #199

Cybso opened this issue Jan 18, 2023 · 5 comments

Comments

@Cybso
Copy link

Cybso commented Jan 18, 2023

When I try to start the service registration for Youtube Music I get the following debug output:

(SONOS)__connectAddr: connected to socket(0x5598516331a8)
(SONOS)Connect: SSL handshake initialized
(SONOS)Connect: /CN=upload.video.google.com
(SONOS)SendRequest: POST /v1:sendRequest HTTP/1.1
Host: music.googleapis.com:443
User-Agent: Linux UPnP/1.0 Sonos/36.4-41270 (ACR_noson)
Connection: close
Accept-Charset: utf-8
Content-Type: text/xml; charset=utf-8
Content-Length: 501
Accept-Encoding: gzip, deflate
Accept-Language: de,de-DE;q=0.9,en-US;q=0.5,en;q=0.3
SOAPAction: "http://www.sonos.com/Services/1.1#getAppLink"
X-Sonos-SWGen: 1

<?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:Header><credentials xmlns="http://www.sonos.com/Services/1.1"><deviceId>(removedDeviceId)</deviceId><deviceProvider>Sonos</deviceProvider></credentials></s:Header><s:Body><ns:getAppLink xmlns:ns="http://www.sonos.com/Services/1.1"><ns:householdId>Sonos_(removedRandomString)</ns:householdId></ns:getAppLink></s:Body></s:Envelope>
(SONOS)GetResponse: HTTP/1.1 403 Forbidden
(SONOS)GetResponse: Vary: Origin
(SONOS)GetResponse: Vary: X-Origin
(SONOS)GetResponse: Vary: Referer
(SONOS)GetResponse: Content-Type: application/json; charset=UTF-8
(SONOS)GetResponse: Date: Wed, 18 Jan 2023 14:58:48 GMT
(SONOS)GetResponse: Server: ESF
(SONOS)GetResponse: Content-Length: 130
(SONOS)GetResponse: X-XSS-Protection: 0
(SONOS)GetResponse: X-Frame-Options: SAMEORIGIN
(SONOS)GetResponse: X-Content-Type-Options: nosniff
(SONOS)GetResponse: Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
(SONOS)GetResponse: Connection: close
(SONOS)GetResponse: 
(SONOS)WSResponse: bad request (403)
(SONOS)DoCall: parse xml failed
(SONOS)GetAppLink: parse xml failed

Version is 5.2.2 from Ubuntu Snap repository.

@richardbowman
Copy link

I just tried to link my YouTube Music acocunt, but when I click Start Service Registration, nothing happens. Not sure where to find this debug output but guessing maybe I have the same issue.

@manuth
Copy link

manuth commented Mar 19, 2023

Open up NOSON from console.
Assuming you have installed NOSON using flatpak, this command should do the trick:

flatpak run io.github.janbar.noson

After doing so, logs will be displayed on your console.

I have the same issue, btw

@richardbowman
Copy link

richardbowman commented Mar 19, 2023

Ok here are the logs, not a lot there, is this helpful to try and figure out what's going on? I clicked the "Start Registration" button twice, the only messages that appear are:

(SONOS)WSResponse: bad request (403)
(SONOS)DoCall: parse xml failed
(SONOS)GetAppLink: parse xml failed

and here are the full logs...

QSocketNotifier: Can only be used with threads started with QThread
Signal handler is enabled.
"using file ':/i18n/noson_en.qm ' for translations."
thumbnailer: register API [LASTFM]
thumbnailer: register API [DEEZER]
installing thumbnails cache in folder "/home/rick/.var/app/io.github.janbar.noson/data/janbar/io.github.janbar.noson/QML/OfflineStorage"
thumbnailer is initialized
qml: LANG=en_US
thumbnailer: configure API [DEEZER]
qml: register account: type=72711 sn=0 token=...
qml: register account: type=3079 sn=0 token=B...
registerContent: 0x5580e4014b30 ()
registerContent: 0x5580e4012160 (FV:2)
registerContent: 0x5580e4013ba0 ()
registerContent: 0x5580e40113e0 (SQ:)
registerContent: 0x5580e3ea0b80 (R:0/0)
registerContent: 0x5580e4012c10 ()
registerContent: 0x5580e3e690e0 ()
(SONOS)FindDeviceDescription: starting new context
(SONOS)FindDeviceDescription: server string found (async-upnp-client/0.33.1 UPnP/2.0 Server/1.0)
(SONOS)FindDeviceDescription: search target not matches
(SONOS)FindDeviceDescription: starting new context
(SONOS)FindDeviceDescription: server string found (async-upnp-client/0.33.1 UPnP/2.0 Server/1.0)
(SONOS)FindDeviceDescription: search target not matches
(SONOS)FindDeviceDescription: starting new context
(SONOS)FindDeviceDescription: location url found (http://192.168.86.249:1400/xml/device_description.xml)
(SONOS)FindDeviceDescription: server string found (Linux UPnP/1.0 Sonos/71.1-38240 (ZPS18))
(SONOS)FindDeviceDescription: search target matches
(SONOS)ParseZoneGroupState: new group 'RINCON_48A6B8DFB63601400:1109708418' with coordinator 'RINCON_48A6B8DFB63601400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_48A6B8DFB63601400' (Gym)
(SONOS)ParseZoneGroupState: new group 'RINCON_542A1BFB6B3001400:1933908675' with coordinator 'RINCON_542A1BFB6B3001400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_542A1BFB6B3001400' (Bedroom)
(SONOS)ParseZoneGroupState: new group 'RINCON_B8E937D6A7F601400:41' with coordinator 'RINCON_B8E937D6A7F601400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_B8E937D6A7F601400' (Living Room)
(SONOS)ParseZoneGroupState: new group 'RINCON_5CAAFD4DB32001400:16' with coordinator 'RINCON_5CAAFD4DB32001400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_5CAAFD4DB32001400' (Porch)
(SONOS)ParseZoneGroupState: topology key 193073761
loadContent: 0x5580e4014b30 ()
handleRenderingControlChange: sig=7 volume: 0.990 [1]
create player 1 [Gym]
handleRenderingControlChange: [RINCON_48A6B8DFB63601400] sig=4 volume: 28.000 [28]
handleRenderingControlChange: sig=6 volume: 28.000 [28]
handleRenderingControlChange: sig=7 volume: 0.990 [1]
create player 2 [Bedroom]
handleRenderingControlChange: [RINCON_542A1BFB6B3001400] sig=4 volume: 29.000 [29]
handleRenderingControlChange: sig=6 volume: 29.000 [29]
handleRenderingControlChange: sig=7 volume: 0.990 [1]
create player 3 [Porch]
handleRenderingControlChange: sig=7 volume: 0.990 [1]
create player 4 [Living Room]
systemEventCB: container [Q:0] has being updated to 19
handleRenderingControlChange: [RINCON_5CAAFD4DB32001400] sig=4 volume: 31.000 [31]
handleRenderingControlChange: sig=6 volume: 31.000 [31]
loadContent: 0x5580e3e690e0 ()
installing network cache of 97656 KB in folder "/home/rick/.var/app/io.github.janbar.noson/cache/janbar/io.github.janbar.noson"
qml: Reloading the zone ...
qml: Connecting zone 'Gym'
Succeeded to register "org.mpris.MediaPlayer2.noson.Gym" on the session bus
registerContent: 0x5580e3a20aa0 ()
loadContent: 0x5580e3a20aa0 (Q:0)
systemEventCB: container [Q:0] has being updated to 19
playerEventCB: container [Q:0] has being updated to 19
loadContent: 0x5580e3a20aa0 (Q:0)
handleRenderingControlChange: [RINCON_B8E937D6A7F601400] sig=4 volume: 33.000 [33]
handleRenderingControlChange: sig=6 volume: 33.000 [33]
handleRenderingControlChange: [RINCON_542A1BFB6B3001400] sig=0 volume: 29.000 [29]
handleRenderingControlChange: sig=2 volume: 29.000 [29]
(SONOS)ParseZoneGroupState: new group 'RINCON_48A6B8DFB63601400:1109708418' with coordinator 'RINCON_48A6B8DFB63601400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_48A6B8DFB63601400' (Gym)
(SONOS)ParseZoneGroupState: new group 'RINCON_542A1BFB6B3001400:1933908675' with coordinator 'RINCON_542A1BFB6B3001400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_542A1BFB6B3001400' (Bedroom)
(SONOS)ParseZoneGroupState: new group 'RINCON_B8E937D6A7F601400:41' with coordinator 'RINCON_B8E937D6A7F601400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_B8E937D6A7F601400' (Living Room)
(SONOS)ParseZoneGroupState: new group 'RINCON_5CAAFD4DB32001400:16' with coordinator 'RINCON_5CAAFD4DB32001400'
(SONOS)ParseZoneGroupState: new group member 'RINCON_5CAAFD4DB32001400' (Porch)
(SONOS)ParseZoneGroupState: topology key 193073761
handleRenderingControlChange: [RINCON_5CAAFD4DB32001400] sig=0 volume: 31.000 [31]
handleRenderingControlChange: sig=2 volume: 31.000 [31]
loadContent: 0x5580e3e690e0 ()
handleRenderingControlChange: [RINCON_48A6B8DFB63601400] sig=0 volume: 28.000 [28]
handleRenderingControlChange: sig=2 volume: 28.000 [28]
libpng warning: iCCP: known incorrect sRGB profile
qt.gui.icc: fromIccProfile: failed minimal tag size sanity
registerContent: 0x5580e456eed0 ()
loadContent: 0x5580e456eed0 ()
(SONOS)SSLSessionFactory: SSL engine initialized
(SONOS)WSResponse: bad request (403)
(SONOS)DoCall: parse xml failed
(SONOS)GetAppLink: parse xml failed

** (noson-gui:2): WARNING **: 17:41:49.898: atk-bridge: get_device_events_reply: unknown signature
(SONOS)WSResponse: bad request (403)
(SONOS)DoCall: parse xml failed
(SONOS)GetAppLink: parse xml failed

@janbar
Copy link
Owner

janbar commented Mar 20, 2023

Hi, all services from google don't work because they require some secret stuff. The response from the google server returns error 403 (forbidden). As the http session is crypted (https) , we cannot discover what is required in the http header.

@sfllaw
Copy link

sfllaw commented Apr 25, 2023

This looks related to #10.

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

No branches or pull requests

5 participants