-
Notifications
You must be signed in to change notification settings - Fork 619
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
Authentication failures #1308
Comments
It appears to be for some users only. It's still working for me right now. So reproducing it (to debug it) might not be so simple (yet). |
The same code gives bad credentials error on my linux machine, but works everytime on Windows. Tried multiple accounts. |
Same problem on my Linux machine since today. Yesterday it was still working fine. Ubuntu 22.04. |
For the record, which version of librespot? 0.4? dev? Those downstream packages use 0.4 I presume. Please try them both. I remember I made some changes on it to dev. Re: @kingosticks would also not be the first time that something gets broken / changed on Spotify's end, only to have it restored the day or week after. Anyway, having it work on one platform and not the other is fishy. |
I tried |
0.5.0-dev is also affected on Arch kernel version 6.9.7. Immediately after posting this, I tried again, and it just worked? I'm not entirely sure what changed; my systemctl script hasn't changed, but after a number of auto-restarts, it came back authenticated? Very strange! |
Same issue here
|
Same Here
|
FWIW, the original bug report was made against latest dev on a Debian system that previously was working fine, with no new packages installed since breaking. (I built from git initially to see if it was fixed upstream.) Feel free to reach out if you need any assistance to debug the issue, I'd be happy to help. |
Given it's working on Windows, what if you change this line: librespot/core/src/connection/mod.rs Line 91 in 299b7de
To pretend that it's always Windows? You may need to do the same here: librespot/core/src/connection/handshake.rs Line 113 in 299b7de
Then in It's the only thing I can now think of why it would work on Windows but not on Linux. |
Same issue here. |
@roderickvd Quickly checked the solution, not working, sadly.
System: NixOS 24.05.20240727.8c50662 (Uakari) x86_64 |
Reporters, please add the access point / servers you are connecting to:
I'm reading that the issue is on Windows also, so let's try to triangulate what's happening. |
Getting this in New Zealand, using librespot-java v1.6.3 on Windows 10. Using USER_PASS auth.
|
Server:
Ping Result:
|
From a raspberry pi 4 running LibreELEC:
|
Probably it happens once your token expires |
Using
Full logspotifyd | 2024-07-30 08:33:28,288 INFO ApResolver:99 - Loaded aps into pool: {accesspoint=[ap-gew1.spotify.com:4070, ap-gew1.spotify.com:443, ap-gew1.spotify.com:80, ap-guc3.spotify.com:4070, ap-gue1.spotify.com:443, ap-gae2.spotify.com:80], dealer=[gew1-dealer2.spotify.com:443, guc3-dealer2.spotify.com:443, gue1-dealer2.spotify.com:443, gae2-dealer2.spotify.com:443], spclient=[gew1-spclient.spotify.com:443, guc3-spclient.spotify.com:443, gue1-spclient.spotify.com:443, gae2-spclient.spotify.com:443]} spotifyd | 2024-07-30 08:33:28,441 INFO Session:140 - Created new session! {deviceId: , ap: ap-gue1.spotify.com:443, proxy: false} spotifyd | 2024-07-30 08:33:29,092 INFO Session:334 - Connected successfully! spotifyd | 2024-07-30 08:33:29,421 ERROR Log4JUncaughtExceptionHandler:31 - [main] spotifyd | xyz.gianlu.librespot.core.Session$SpotifyAuthenticationException: BadCredentials spotifyd | at xyz.gianlu.librespot.core.Session.authenticatePartial(Session.java:453) ~[librespot:1.6.3] spotifyd | at xyz.gianlu.librespot.core.Session.authenticate(Session.java:342) ~[librespot:1.6.3] spotifyd | at xyz.gianlu.librespot.core.Session.access$600(Session.java:77) ~[librespot:1.6.3] spotifyd | at xyz.gianlu.librespot.core.Session$Builder.create(Session.java:1057) ~[librespot:1.6.3] spotifyd | at xyz.gianlu.librespot.player.Main.main(Main.java:80) ~[librespot:1.6.3] spotifyd | 2024-07-30 08:34:30,706 INFO ApResolver:99 - Loaded aps into pool: {accesspoint=[ap-gew1.spotify.com:4070, ap-gew1.spotify.com:443, ap-gew1.spotify.com:80, ap-guc3.spotify.com:4070, ap-gue1.spotify.com:443, ap-gew4.spotify.com:80], dealer=[gew1-dealer2.spotify.com:443, guc3-dealer2.spotify.com:443, gue1-dealer2.spotify.com:443, gew4-dealer2.spotify.com:443], spclient=[gew1-spclient.spotify.com:443, guc3-spclient.spotify.com:443, gue1-spclient.spotify.com:443, gew4-spclient.spotify.com:443]} spotifyd | 2024-07-30 08:34:30,759 INFO Session:140 - Created new session! {deviceId: , ap: ap-gew1.spotify.com:443, proxy: false} spotifyd | 2024-07-30 08:34:31,235 INFO Session:334 - Connected successfully! spotifyd | 2024-07-30 08:34:31,429 ERROR Log4JUncaughtExceptionHandler:31 - [main] spotifyd | xyz.gianlu.librespot.core.Session$SpotifyAuthenticationException: BadCredentials spotifyd | at xyz.gianlu.librespot.core.Session.authenticatePartial(Session.java:453) ~[librespot:1.6.3] spotifyd | at xyz.gianlu.librespot.core.Session.authenticate(Session.java:342) ~[librespot:1.6.3] spotifyd | at xyz.gianlu.librespot.core.Session.access$600(Session.java:77) ~[librespot:1.6.3] spotifyd | at xyz.gianlu.librespot.core.Session$Builder.create(Session.java:1057) ~[librespot:1.6.3] spotifyd | at xyz.gianlu.librespot.player.Main.main(Main.java:80) ~[librespot:1.6.3] |
i am affected too, since
UPDATE:
|
Unfortunately changing the OS in the match clauses as suggested did nothing.
|
Same here in São Paulo, Brazil, stopped working yesterday afternoon. 6.10.2 kernel on Gentoo.
|
Do we have a way to block or force misbehaving APs? Given these logs, at least the following fail:
I tried the naive approach of pointing them to 127.0.0.1 in my /etc/hosts, but that triggers a connection error. Pointing them to another ap's IP also does not seem to do anything to avoid it. |
Is it confirmed that other APs continue to work well? It's not the first time that an AP starts misbehaving, but I don't remember this many. You could try pointing librespot/core/src/apresolve.rs Line 109 in 299b7de
If you want to filter APs then you could do it in the same file, probably here: librespot/core/src/apresolve.rs Line 64 in 299b7de
But filtering that many could result in an empty set... don't you only get like three or something? Edit: misbehaving APs usually get fixed, sometimes in a few days, sometimes weeks. Not sure if this is a transitive failure on Spotify's end, or something that's really changing. That's why it would be good if someone had an old HW device with Connect to test, not something with recent firmware... to see if they're really phasing out this interface. |
Yes, actually, I would have been using cached credentials (which don't expire). This session login failure is for the access point, it's not token based. I've got a Windows 11 machine here today and no cached credentials. Both dev and master fail:
I wonder if the one reported working Windows env above was also using cached creds? @azel1 can you provide a working log? |
I thought it was a good idea to find an opening for more collaboration before I starting shooting more detailed questions at them. This is what I just wrote them:
I'll keep you informed if and how they respond. |
Thanks for your effort, @roderickvd. Unfortunately I happen to know that they have an issue with the lack of reporting (see #626). It's my vague memory that this was addressed in the Java version, but never made it to the Rust build? I could be wrong though, my memory is failing me way too often :(. |
Yes, librespot-java figured it out partially and it hasn't been back ported yet. Could be a good start for someone who wants to contribute - not super hard to send a message from the player to the session when a play finished, so the session can report it back to Spotify. I remember that the librespot-java version didn't work under all circumstances, and doesn't have all fields figured out, so any clarification from Spotify would be welcome. This is one of the things I thought of when I wrote "amongst other things" to Spotify - I'm all for artist monetisation but don't know if payout is high on Spotify's agenda. I am happy to hear from you that apparently it is, so if they could help us scratch that itch... |
So you basically mean create the credentials.json (with, lets say this ) and past the file in /data/librespot, and then in the snapserver.conf in the stream for spotify use this:
? Thank you in advance! |
I only removed the -u and -p parameters and it worked again, although it gave a warning: |
Okay I'm able to get my cred json file but not login, might be newbie question but would love some help.
. |
Login challenge (hashcash)? It has always been like that |
OK I have a working email/password implementation, again it was just the addition of the user-agent basically: |
@DarpNagarsheth Have you solved the issue, i am facing the same issue using zspotify. |
There is no support for that tool here. Thanks. |
I don't agree with the tone of the previous comment, but I've always been curious why the repo doesn't publish releases. Fortunately, I find the latest is often packaged for alpine edge, but the versioning is unclear. Has this been discussed previously and there's a reason new releases aren't created and published? |
It's not by any policy but by the way things go. Mostly because:
By the way, I am extremely happy with the recent influx of contributions! It's ensured 0.5 is tested and got a couple of much needed fixes in. So yes I intend to release 0.5 soon, work and family life also permitting, with either of the PRs in to fix the frequent disconnections. |
I don't get why this guy is being downvoted. Someone needs to step up and publish a release. There will always be bugs and imperfections that can be straightened out later. No release means less actual testing. Librespot is not a "production service", everyone who cares about uptime will 200% test before blindly updating to 0.5. And the whole delay in creating a release is just making everything worse, according to all SE guidelines. Make small changes, perform quick tests and publish releases often - the exact opposite of what we have now. |
Guys calm down. I've been following this project since the early days and here's some context. @roderickvd isn't the original creator, just the person who stepped up to progress it and manage it when no one else could be bothered. He had a Spotify account once and has moved to another service now but he keeps managing the project because nobody else offered to take it over |
Please be kind to those that maintain open source projects in their free time. This is not a job for many and focusing on a project you don't use anymore feels like wasted time. This kind of bad attitude towards open source projects will not get you or the project anywhere. |
Please re-consider your attitude: this software is provided by volunteers spending their spare time, night and day, on the product. They receive nothing for all the work and hassle and time spend. If you p... them off with your angry attitude, you won't get anything back. They will leave and you can continue to be angry for yourself. If you know how much effort it is to release such a product, then just build it yourself. If you don't know how to do it, then how can you judge the effort required? |
@ManiArasteh build it yourself. If you can't, I will compile it for you for 200EUR. |
@ManiArasteh so you built your app with dependencies on open source software, whose unpaid maintainers you are being extremely demanding and rude to. And now you are not getting what you want. Sounds like a "you" problem my dude. Anyhow, offer stands if you want me to build it for you. Just let me know what platform and you can paypal me 300EUR - a special discount for you, today only. |
👮 locking this thread. Thanks for the sensible comments and taking note of what I already said in #1308 (comment). Let's focus on getting either #1357 or #1359 in. @ManiArasteh I will not accept your behaviour. This is your last and only warning before I block you. |
"ERROR librespot] Connection failed: Login failed with reason: Bad credentials"
Credentials are valid.
I assume Spotify has changed the login flow. This affects upstream projects using librespot also, looking at their buglists.
The text was updated successfully, but these errors were encountered: