mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 00:05:55 +03:00
[GH-ISSUE #1649] Audio key error #752
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#752
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @publicstaticvoidmain42 on GitHub (Nov 21, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1649
Description
Track fails to load and play. Logs say "audio key error 0 1".
Version
0.7.0+
How to reproduce
--enable-oauthfor authentication and some client nameLog
./target/release/librespot --name "a client" --disable-discovery --enable-oauthHost (what you are running
librespoton):@kingosticks commented on GitHub (Nov 21, 2025):
Debug log please. I cannot reproduce this.
@drobotk commented on GitHub (Nov 21, 2025):
inb4 it turns out the old method of getting keys is being phased out
@publicstaticvoidmain42 commented on GitHub (Nov 21, 2025):
@kingosticks Sorry, there you go:
@kingosticks commented on GitHub (Nov 21, 2025):
Is this with all tracks? Does switching to a different album make any difference? What about selecting different
--bitrate? Just to double check, you do have premium, yes? Is this suddenly a new failure i.e. did librespot used to work for you?@roderickvd commented on GitHub (Nov 22, 2025):
It seems to be thinking that it's an MP3 file?
@drobotk commented on GitHub (Nov 22, 2025):
I think that's Symphonia's probe trying hard to interpret the encrypted file as audio
@roderickvd commented on GitHub (Nov 22, 2025):
You’re right, I glimpsed over that “could not get audio key” line. Is it the same for you in other gateways? (Here: gew1) you can try blocking that one using your hosts file.
@publicstaticvoidmain42 commented on GitHub (Nov 22, 2025):
Yes.
No.
Checked it, same error.
Yes. I have Spotify Premium.
Yes. It was working fine for ~8 months.
@publicstaticvoidmain42 commented on GitHub (Nov 22, 2025):
Just to check if it was just me, I contacted one of my friends to try it with some of their family accounts. Almost all of them had the same audio key error but there's a new error we did get on one of the accounts. I'll paste the debug output below. The issue that happens here is that it starts librespot but as soon as he tried to play a song with Spotify Connect, the client kept jumping through songs without even playing then and eventually he had to quit with ctrl c.
@drobotk commented on GitHub (Nov 22, 2025):
That version of librespot has a bug that was fixed in 0.8.0.
@publicstaticvoidmain42 commented on GitHub (Nov 22, 2025):
@drobotk Sorry. I'll ask them to update and check again.
@publicstaticvoidmain42 commented on GitHub (Nov 22, 2025):
Right, it works for them with 0.8.0. Not sure why it doesn't work for me however.
@kingosticks commented on GitHub (Nov 22, 2025):
When Spotify change things they do it on a handful of accounts at a time. They may be phasing out this way of getting the key and you're unlucky enough to be one of the first. I'll grab my debug log later for this song and I'm also in the UK so it should be identical except mine works, so the only difference is then your account. Which isn't good news for anyone.
@kingosticks commented on GitHub (Nov 23, 2025):
Here's my debug log. Very similar... except it can get the key and play audio like normal. So not much insight there, just to show everything is the same... right up until it doesn't work for you. I've got a family account.
@publicstaticvoidmain42 commented on GitHub (Nov 24, 2025):
Is there any way I can help with getting the new audio key logic?
@drobotk commented on GitHub (Nov 24, 2025):
As far as we know, there is no "new audio key logic" that librespot could legally implement. For now we have to wait and see.
@drobotk commented on GitHub (Dec 2, 2025):
Is this the same issue as this?
@kingosticks commented on GitHub (Dec 2, 2025):
I don't think so because that was discovered by comparing the difference in behaviour between go-librespot and librespot as per https://github.com/devgianlu/go-librespot/issues/235#issuecomment-3599449993. And the above working log I provided replicates exactly what @publicstaticvoidmain42 is doing, including the same market so we should be getting the exact same IDs.
@YutongGu commented on GitHub (Dec 23, 2025):
@drobotk Is there a particular commit you could point me to that fixes this issue? Looking to backport this fix as I'm currently stuck on an older version of librespot.
@sebitokazu commented on GitHub (Dec 23, 2025):
Been seeing this error pretty consistently since yesterday but randomly, some songs play and some fail:
@YutongGu commented on GitHub (Dec 23, 2025):
This is the error that I see (note that I'm on an older version of librespot):
Not sure if related but I also see this:
@milnivlek commented on GitHub (Dec 25, 2025):
This just started happening for me too yesterday (Dec 23, US Pacific Time) on 1 of the 3 Spotify accounts I use with librespot. That account is now completely unable to play any music to librespot. This is quite worrying if this is indeed a change that's going to be rolled out to all accounts eventually.
@Snowy-Fluffy commented on GitHub (Dec 25, 2025):
any updates?
@sebitokazu commented on GitHub (Dec 25, 2025):
is it possible that this is related to the Spotify scraping? https://annas-archive.li/blog/backing-up-spotify.html
@Ainate commented on GitHub (Dec 25, 2025):
Happened to me too.. Skip skip skip skip.. Was working fine until yesterday
@photovoltex commented on GitHub (Dec 25, 2025):
Can anyone with the issue please try to see if go-librespot has the same issue? Just to check that this is a general or
librespotspecific problem.@milnivlek commented on GitHub (Dec 25, 2025):
I just switched my snapcast setup to use
go-librespot, and unfortunately the end result was the same: 2 of my accounts work fine, but 1 account is unable to play any tracks (the same account that's no longer working withlibrespot).@YutongGu commented on GitHub (Dec 26, 2025):
This is a bit of a shot in the dark here but given all the request timeout messages, could be this be caused by a rate limit placed on Spotify’s side as a measure against the mass scraping that recently occurred? The timeline of when people reported this issue and when the scrape was reported seems to align serendipitously.
This comment seems to back that theory:
https://github.com/justin025/onthespot/pull/271#issuecomment-3686830741
@sebitokazu commented on GitHub (Dec 26, 2025):
is there any update on this? given that i've seen accounts with the issue and accounts without the issue this past couple of days, i'm starting to believe this is happening behind the scenes and can be somehow related to the massive scraping
UPDATE: i tried my account that was working on a device that wasn't working, and it works. viceversa, i tried the account with the error on my device that was working, and it keeps failing. seems to be related to the account i think
@milnivlek commented on GitHub (Dec 26, 2025):
Per https://github.com/WakuwakuP/roon-librespot-streamer/pull/27, it sounds like blocking DNS resolution forapresolve.spotify.comis a viable workaround for this problem. I haven't had the chance to try it yet on my own setup, but will do it once I have time.UPDATE: Just tried it. This doesn't seem to help, unfortunately. Sorry for getting folks' hopes up.
@Snowy-Fluffy commented on GitHub (Dec 26, 2025):
did not help
@Snowy-Fluffy commented on GitHub (Dec 26, 2025):
Maybe cause I'm also getting a 429 error (I think they are related)
@Snowy-Fluffy commented on GitHub (Dec 26, 2025):
you know, spotify has now done something so that you will receive 429 in any case even if you are not restricted
@Snowy-Fluffy commented on GitHub (Dec 26, 2025):
damn spotify
@milnivlek commented on GitHub (Dec 26, 2025):
Sounds like folks are still actively investigating: https://github.com/librespot-org/librespot/discussions/1562#discussioncomment-15344453
This isn't my area of technical expertise, so I'm just a mere helpless bystander here. But to everyone working on figuring out this problem--thank you and all the best!
@LowerHater commented on GitHub (Dec 27, 2025):
I'll assume those maintaining librespot are aware already, but michaelherger's spotty project, which uses his custom librespot fork has got API access working using a custom OAuth fix.
Some details are here:
https://forums.lyrion.org/forum/user-forums/3rd-party-software/1802770-announce-spotty-v4-60-0-the-christmas-crash-release-%F0%9F%8E%84%F0%9F%8E%81
@michaelherger commented on GitHub (Dec 27, 2025):
I think I'm not doing anything special there, and TBH I'm not sure how this is related to the issue reported here. But what I'm doing differently from the initial report by @publicstaticvoidmain42 is that I'm authorizing from my application using the Web API (PKCE flow). API accesses therefore don't use anything librespot provided. Only for playback I feed the access token I received to the spotty helper (librespot) using the
--access-tokenand--client-idparameters.That said: reports are mixed. The mechanism still seems to be a bit flakey. Or too complicated for the users who try to set this up, as it requires defining the callback URL (
redirect_uri) in the client configuration.@Semmu commented on GitHub (Dec 27, 2025):
Hi folks,
I just started experiencing this issue myself as well. Not sure if it's limited to API calls or anything, because I'm controlling my librespot instance through the Spotify Web API, and I was testing my integration a lot when librespot suddenly refused to play anything and started printing the same logs:
But it's strange, it can load/play one track after around 10-20 skipped? Very-very flaky backend behaviour...
@WakuwakuP commented on GitHub (Dec 28, 2025):
Sorry, I haven't been able to resolve the situation yet either.
@YutongGu commented on GitHub (Dec 29, 2025):
Do we know for a fact that this affect only open-sourced implementations of spotify-connect or if this affects devices with official integrations as well? I wonder if anyone who's able to reproduce their issue with librespot is able to test on another device like their TV. That might provide some helpful insights
@kingosticks commented on GitHub (Dec 29, 2025):
The official clients I've looked at (desktop windows and Linux only) have already moved to using Spotify's alternate DRM system for all media, not just lossless. That alternate DRM system doesn't use the same endpoint for retrieving the key that we're using. I think you'd need to find a system that hadn't been updated to use the new DRM. I know some AV receivers still run old software but it's difficult to observe what they are doing. I don't personally own one.
@YutongGu commented on GitHub (Dec 29, 2025):
Gotcha. Does that mean that Librespot and other open source integrations would have to move to this new DRM system? Is that even technically feasible?
@YutongGu commented on GitHub (Dec 29, 2025):
I’ve done some more digging into the subject matter and I’ve answered my own questions on this. Is it possible that Spotify is trying to deprecate its Shannon DRM and forcing devices over to the new PlayPlay DRM and is doing a slow rollout on that? If so, that could be a fatal blow for projects like this and presumably some older official clients that have not kept up to date.
@kingosticks commented on GitHub (Dec 29, 2025):
It's technically feasible, but maybe not legally feasible. Spotify are aggressively protecting that IP. However, they've no moral highground and they continue to erode our goodwill so it's anyone's guess what 2026 will bring.
@Semmu commented on GitHub (Dec 30, 2025):
I just want to share that the moment librespot and its derivatives stop to work will be the moment I cancel my Spotify subscription.
Maybe someone from Spotify will see this and it will make them think a bit.
@YutongGu commented on GitHub (Dec 30, 2025):
https://github.com/misiektoja/spotify_monitor/issues/27#issuecomment-3691961905
Does this comment offer any insight as to a potential workaround? It seems to be related. I’m staying hopeful that there’s a way around this.
@YutongGu commented on GitHub (Dec 30, 2025):
It looks like the changes from Spotify is indeed affecting older official clients.
https://community.spotify.com/t5/Other-Podcasts-Partners-etc/connect-not-playing-on-Cambridge-Audio-NP30/m-p/7282161
@urknall commented on GitHub (Dec 30, 2025):
Same here, i am not especially bound to librespot and spotify, but for me its important to use my music ecosystem the way I want. Right now i am testing deezer and qobuz and they do very well with it. I doubt Spotify cares, but as soon there is no librespot support with spotify i will cancel my family subscription.
@gasparhabif commented on GitHub (Jan 5, 2026):
+1 same issue
@silelmot commented on GitHub (Jan 9, 2026):
same issue here:
its a new account, bought over a vpn.
@roderickvd commented on GitHub (Jan 9, 2026):
I've seen other reports too that this hits new accounts, not old accounts.
@milnivlek commented on GitHub (Jan 9, 2026):
Yes, this aligns with my own anecdotal data points. Within my Spotify Premium Family Plan, the 2 oldest accounts are unaffected. But my newest account is affected. I also tried creating a new account from scratch and adding it to my Family Plan, but that new account was also affected.
@jakobhn commented on GitHub (Jan 12, 2026):
I’m experiencing the same issue. I have two older users who aren’t affected, but newer ones have been running into audio key errors since around Christmas. Any insight into statements about the issue from Spotify, or any potential workarounds?
@milnivlek commented on GitHub (Jan 16, 2026):
Just to confirm: are there currently no further leads as to a possible solution...? Are we just waiting to see if Spotify will revert or fix something on their end?
(Just a status check, not blaming. I fully understand this seems to be largely beyond our control.)
@olm52 commented on GitHub (Jan 17, 2026):
Yesterday I checked Lyrion Music Server Spotty plugin and is working.
During Spotify login it asked to connect for a verification.
@kingosticks commented on GitHub (Jan 19, 2026):
Can someone with a blocked account try again? Apparently they've fixed the issue that AVR users were having that suspiciously started at the same time.
@jendelel commented on GitHub (Jan 19, 2026):
Unfortunately, the same issue for me :(
On Mon, Jan 19, 2026 at 8:01 PM Nick Steel @.***> wrote:
@eddible commented on GitHub (Jan 19, 2026):
Oh mine does work now, before it would just keep skipping through the tracks. I created my account last year in October/November.
@joberdick commented on GitHub (Jan 19, 2026):
still have the issue
@sebitokazu commented on GitHub (Jan 19, 2026):
still have the issue too
@milnivlek commented on GitHub (Jan 19, 2026):
Still seeing the same "Audio key error". But if there's indeed a fix, maybe they're rolling it out gradually too? (one can hope)
@nicolaheile commented on GitHub (Jan 20, 2026):
I have the same issue - my account in the Family Packet is working, and a new account created for the kids is not working with this issue.
If I connect and play music - and the second device joined my jam, this account can play music. But that's not usable :-). A third account in the Family Packet is working, too. It looks like new accounts are not working but old?!
But the new accounts are working with an Old Sonos Roam Speaker - so in theory it is working...
@OzGav commented on GitHub (Jan 24, 2026):
Over on librespot some people are reporting this is working again. If anyone here has found that Spotify is working again then post “working again” below. Please DO NOT post anything if Spotify is not working.
@Zetanova commented on GitHub (Jan 26, 2026):
I have no this issue with vanilla raspotify, tried first 03.12.2025 with an old account and it worked,
then yesterday I tried with the same setup and the same account and it still worked, till today.
Today I created a new account and switched to it and the issues appeared.
@flos06 commented on GitHub (Jan 31, 2026):
I'm a bit confused. I have the same error so to me it would seem that the entire project is broken, but looking at the other issues that are being opened it is not broken for a lot of people? Seeing how this ticket was opened in November is there any progress being made or are we out of luck?
@milnivlek commented on GitHub (Jan 31, 2026):
It seems that Spotify only rolled out their changes to newer accounts, which is why most existing users haven't been affected yet. But yeah it sounds like this will be a complete blocker going forward for newer users, if no reasonable solution is found.
@canuckdev commented on GitHub (Jan 31, 2026):
The project is not broken, this is on Spotify.
@canuckdev commented on GitHub (Jan 31, 2026):
snapcast users please see https://github.com/stijnvdb88/snap.net and more specifically https://github.com/stijnvdb88/Snap.Net/blob/master/Snap.Net.Broadcast/README.md. (Windows)
Edit: This solution works with lossless which I don't think worked with librespot.
@jr-k commented on GitHub (Feb 3, 2026):
Same error here :(
@Arneball commented on GitHub (Feb 5, 2026):
I get key audio key error if i close the tcp connection, invalidating the session and try to switch track. I've been experimenting with retrying fetching audio key while the session is reinitialized, but i haven't found a way to make it stable. I was experimenting with having the session as a Arc in Player and adding retry logic but it is not stable either. Not terrible proficient in Rust so it'll take some more digging from my end.
@kingosticks commented on GitHub (Feb 5, 2026):
But that's not new behaviour, right?
@Arneball commented on GitHub (Feb 5, 2026):
Probably not but it would be nice to have a way of keeping the playback going even with flaky connection. I'm not sure why my connection is dropped every now and then. Sometimes it bails on missing ping/pong, but when it does fail then i have to manually restart the playback. It can even fail midplay when downloading the next song, which sets the volume to a different one or stops playback.
@canuckdev commented on GitHub (Feb 13, 2026):
Spotify says its best developers haven't written a line of code since December, thanks to AI | TechCrunch
Hmm, right around Dec 24 is when librespot and go-librespot stopped working!
@Semmu commented on GitHub (Feb 18, 2026):
It started doing this for me too, sometimes it does not happen for a whole day, but sometimes it happens multiple times in an hour.
@kingosticks commented on GitHub (Feb 18, 2026):
I find it strange this would be inconsistent. Do you have a debug log when it's intermittent? Do you see Access Point connection issues in the logs, resulting in re-connections?
@lbrzeczek commented on GitHub (Feb 19, 2026):
I have the same problem. The new installation looks fine in theory, but I haven't been able to play a single song... :(
@mijofa commented on GitHub (Feb 21, 2026):
I only just recently (3 days ago) created a Spotify account, and am having this issue all the time, making Librespot impossible to use, ever.
My partner, who's had her account for ~6+ yrs is not having any issues... same Librespot installation/etc.
@nicolaheile commented on GitHub (Feb 21, 2026):
But with the Sonos speaker there are no issues. It seems that Spotify doesn't break everything. I have an very old Sonos roam still working while librespot works only on old accounts.
@st4hli commented on GitHub (Feb 25, 2026):
That's a real dealbreaker for new accounts and will be for the whole librespot project soon (if no one finds a solution). Spotify is kicking out the whole open source community by this move.
@Ririshi commented on GitHub (Feb 25, 2026):
I just made this issue: https://github.com/kraxarn/spotify-qt/issues/317
The underlying librespot issue that is making the bug show up in spotify-qt may be related? I attached some librespot logs there. I seem to be getting these messages every now and then:
My account is older but I have switched billing a few times so I don't know if that has changed anything. Either way, it's working most of the time, but randomly stops sometimes.
@kingosticks commented on GitHub (Feb 25, 2026):
Can you answer that one ?
@Ririshi commented on GitHub (Feb 26, 2026):
I can certainly look at that. When you speak of AP disconnections, do you mean my local network, or do you mean a spotty connection to the Spotify servers? I posted a debug log of it happening on the issue I linked in my previous comment, does that clarify anything?
@kingosticks commented on GitHub (Feb 26, 2026):
I mean a disconnect from the Spotify Access Point that results in librespot having to reconnect to an access point. You log is too small a snippet to show the AP changing between the audo key request working and not working. Prefer entire logs, not snippets.