librespot-java icon indicating copy to clipboard operation
librespot-java copied to clipboard

Bad Credentials Error

Open jpgrovy opened this issue 1 year ago • 12 comments

Getting the BAD CREDENTIALS error we've seen in the past. Last year around this time we needed to update the desktop client version number to 117300517. Anyone else seeing this issue?

jpgrovy avatar May 04 '24 02:05 jpgrovy

Have not checked if its the BAD CREDENTIALS error again but yes something is broken since a few days. Need to investigate in more details when I have time

Add: at least rust librespot did not change version yet

maxwen avatar May 12 '24 10:05 maxwen

Thanks. Really appreciate any time you spend on this.

jpgrovy avatar May 12 '24 13:05 jpgrovy

WT... just enabled logging to see what happens and now it works again ... ???? I honestly have no idea why it failed in the last days.

It simply went into a timeout I added in my app for the login I can imagine an issue with the CDN servers. As we had the issue with that SSLPeerUnverifiedException on some of them.

Or starting the rebuild app using a new hex device id triggered some login cache clearing on their side.

maxwen avatar May 13 '24 09:05 maxwen

Weird. I still get bad credentials errors. Did you make any changes?

jpgrovy avatar May 13 '24 20:05 jpgrovy

Is there a way to fix this? I get the error since today.

IVIanuu avatar Jul 29 '24 16:07 IVIanuu

Spotify seems to have deprecated authenticating with username and password. To fix this switch to another authentication method or use go-librespot.

devgianlu avatar Jul 30 '24 14:07 devgianlu

I'm getting the error again. I cannot switch to the go lib because I use it on android. What are the other authentication methods you mentioned?

IVIanuu avatar Aug 12 '24 23:08 IVIanuu

@IVIanuu I am afraid the only way is to grab some stored credentials with go-librespot and use those. I don't think Zeroconf will work on Android.

devgianlu avatar Aug 12 '24 23:08 devgianlu

@devgianlu I was able to authenticate on android via zeroconf using this class:

https://github.com/powerbling/librespot-connect-android/blob/master/librespot-android-zeroconf- server/src/main/java/com/powerbling/librespot_android_zeroconf_server/AndroidZeroconfServer.java#L48

I store the device id, username and blob to create Session objects after the process was killed. Is it safe to do so? Otherwise I would need to always open the Spotify app and reconnect to my app.

IVIanuu avatar Aug 13 '24 10:08 IVIanuu

@IVIanuu That works I guess, but the proper way is to retrieve "stored credentials" from the AP or Login5 after successfull login and then use those.

devgianlu avatar Aug 13 '24 16:08 devgianlu

https://github.com/powerbling/librespot-connect-android/blob/master/librespot-android-zeroconf- server/src/main/java/com/powerbling/librespot_android_zeroconf_server/AndroidZeroconfServer.java#L48

can you plz help on the same I am facing a same error xyz.gianlu.librespot.core.Session$SpotifyAuthenticationException: BadCredentials

PayaltheAppIdeas avatar Aug 14 '24 12:08 PayaltheAppIdeas

xyz.gianlu.librespot.core.Session$SpotifyAuthenticationException: BadCredentials at xyz.gianlu.librespot.core.Session.authenticatePartial(Session.java:453) at xyz.gianlu.librespot.core.Session.authenticate(Session.java:342) at xyz.gianlu.librespot.core.Session.access$600(Session.java:77) at xyz.gianlu.librespot.core.Session$Builder.create(Session.java:1057) at com.djbot.sources.spotify.SpotifyPlayer.login(SpotifyPlayer.java:116) at com.djbot.sources.spotify.Spotify$SettingsFragment.lambda$onCreateView$6$com-djbot-sources-spotify-Spotify$SettingsFragment(Spotify.java:1755) false--

I am facing this error last 10 days in my application. can you please help me on this. I am working on Android java. FYI: The same email ID and password work on both the Spotify app and website.

PayaltheAppIdeas avatar Aug 20 '24 05:08 PayaltheAppIdeas