librespot: Error 403
Hello,
suddenly my librespot instance on libreelec stopped playing any songs.
[2023-06-20T05:24:59Z INFO librespot] librespot 0.5.0-dev d07b2ce (Built on 2023-06-18, Build ID: e4T4YlCt, Profile: release)
*** WARNING *** The program 'librespot' uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html>
[2023-06-20T05:24:59Z INFO librespot_playback::mixer::softmixer] Mixing with softvol and volume control: Log(60.0)
[2023-06-20T05:24:59Z INFO librespot_playback::convert] Converting with ditherer: tpdf
[2023-06-20T05:24:59Z INFO librespot_playback::audio_backend::alsa] Using AlsaSink with format: S16
[2023-06-20T05:24:59Z INFO librespot_core::session] Connecting to AP "ap-gew4.spotify.com:4070"
[2023-06-20T05:24:59Z INFO librespot_core::session] Authenticated as "11127372133" !
[2023-06-20T05:24:59Z INFO librespot_core::session] Country: "CZ"
[2023-06-20T05:25:08Z INFO librespot_core::spclient] Resolved "gew4-spclient.spotify.com:443" as spclient access point
[2023-06-20T05:25:08Z ERROR librespot_core::mercury] error 403 for uri hm://keymaster/token/authenticated?scope=playlist-read&client_id=65b708073fc0480ea92a077233ca87bd&device_id=78f3d06ba0952bdccb9e15230ae4f8c6891f6292
[2023-06-20T05:25:08Z ERROR librespot_connect::spirc] ContextError: Error { kind: Unavailable, error: Response(MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=playlist-read&client_id=65b708073fc0480ea92a077233ca87bd&device_id=78f3d06ba0952bdccb9e15230ae4f8c6891f6292", status_code: 403, payload: [[123, 34, 99, 111, 100, 101, 34, 58, 52, 44, 34, 101, 114, 114, 111, 114, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 34, 58, 34, 73, 110, 118, 97, 108, 105, 100, 32, 114, 101, 113, 117, 101, 115, 116, 34, 125]] }) }
[2023-06-20T05:25:08Z ERROR librespot_core::mercury] error 403 for uri hm://keymaster/token/authenticated?scope=playlist-read&client_id=65b708073fc0480ea92a077233ca87bd&device_id=78f3d06ba0952bdccb9e15230ae4f8c6891f6292
[2023-06-20T05:25:08Z ERROR librespot_playback::player] Unable to load audio item: Error { kind: Unavailable, error: Response(MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=playlist-read&client_id=65b708073fc0480ea92a077233ca87bd&device_id=78f3d06ba0952bdccb9e15230ae4f8c6891f6292", status_code: 403, payload: [[123, 34, 99, 111, 100, 101, 34, 58, 52, 44, 34, 101, 114, 114, 111, 114, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 34, 58, 34, 73, 110, 118, 97, 108, 105, 100, 32, 114, 101, 113, 117, 101, 115, 116, 34, 125]] }) }
[2023-06-20T05:25:08Z ERROR librespot_playback::player] Skipping to next track, unable to load track <SpotifyId("spotify:track:4vGFfCD9PvBuKDbTourDdW")>: ()
[2023-06-20T05:25:08Z ERROR librespot_core::mercury] error 403 for uri hm://keymaster/token/authenticated?scope=playlist-read&client_id=65b708073fc0480ea92a077233ca87bd&device_id=78f3d06ba0952bdccb9e15230ae4f8c6891f6292
[2023-06-20T05:25:08Z ERROR librespot_playback::player] Unable to load audio item: Error { kind: Unavailable, error: Response(MercuryResponse { uri: "hm://keymaster/token/authenticated?scope=playlist-read&client_id=65b708073fc0480ea92a077233ca87bd&device_id=78f3d06ba0952bdccb9e15230ae4f8c6891f6292", status_code: 403, payload: [[123, 34, 99, 111, 100, 101, 34, 58, 52, 44, 34, 101, 114, 114, 111, 114, 68, 101, 115, 99, 114, 105, 112, 116, 105, 111, 110, 34, 58, 34, 73, 110, 118, 97, 108, 105, 100, 32, 114, 101, 113, 117, 101, 115, 116, 34, 125]] }) }
I think it is similar to #972 if it is not the same, but I have not found any way how to fix it yet…
~ # curl http://apresolve.spotify.com/
{"ap_list":["ap-gew4.spotify.com:4070","ap-gew4.spotify.com:443","ap-gew4.spotify.com:80","ap-gue1.spotify.com:4070","ap-gew1.spotify.com:443","ap-guc3.spotify.com:80"]}
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 43 (34 by maintainers)
Commits related to this issue
- Obtain spclient access token using login5 instead of keymaster (Fixes #1179) — committed to kingosticks/librespot by kingosticks a year ago
- Kingosticks change: Obtain spclient access token using login5 instead of keymaster (Fixes librespot-org#1179) — committed to Gerrelt/librespot by Gerrelt 8 months ago
- Kingosticks change: Obtain spclient access token using login5 instead of keymaster (Fixes librespot-org#1179) — committed to Gerrelt/librespot by Gerrelt 7 months ago
- Kingosticks change: Obtain spclient access token using login5 instead of keymaster (Fixes librespot-org#1179) — committed to Gerrelt/librespot by Gerrelt 7 months ago
I can’t remember what state it is in. I’ll take a look when I get time
I’m away for the next week without a computer. Anyone who has the time is welcome to take the code and submit a PR. I can’t remember what state I left it in.
No, but I can test it with an iPhone, I’ll be back.
I can confirm that @kingosticks branch fixes it for me. Any chance this get merged?
Hi - will the @kingosticks’s PR be merged? I don’t know if the solution is optimal but for me it works 😃
I had the same 403 problem, and it was also solved by using @kingosticks branch. I now have librespot running on piCore (14.0) and Raspbian (11 Bullseye), connecting to it with the windows and android spotify app, all working fine. Thanks kingosticks!
I have no time now to look closer to the log, but it seems to me that librespot-java also ends with 403 here in Czechia…
If possible can you double check that the same access point hostname definitely resolves to the same IP in both working and non-working cases? Presumably it was the same user account in both cases also?