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

SpotifyAuthenticationException: PremiumAccountRequired #614

Closed
kokarare1212 opened this issue May 16, 2023 · 7 comments
Closed

SpotifyAuthenticationException: PremiumAccountRequired #614

kokarare1212 opened this issue May 16, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@kokarare1212
Copy link
Contributor

kokarare1212 commented May 16, 2023

Describe the bug
Spotify seems to have made some changes and USER_PASS, ZEROCONF login is no longer available.
Of course, the account is a Premium account.
This is the same problem with librespot-python, which has been ported to Python.

To Reproduce
Download and run librespot-player-1.6.2.jar from the release page.

Expected behavior
The login should complete successfully with no exceptions.

Screenshots/Stracktraces/Logs

xyz.gianlu.librespot.core.Session$SpotifyAuthenticationException: PremiumAccountRequired
        at xyz.gianlu.librespot.core.Session.authenticatePartial(Session.java:450) ~[librespot-player-1.6.2.jar:1.6.2]
        at xyz.gianlu.librespot.core.Session.authenticate(Session.java:339) ~[librespot-player-1.6.2.jar:1.6.2]
        at xyz.gianlu.librespot.core.Session.access$600(Session.java:77) ~[librespot-player-1.6.2.jar:1.6.2]
        at xyz.gianlu.librespot.core.Session$Builder.create(Session.java:1029) ~[librespot-player-1.6.2.jar:1.6.2]
        at xyz.gianlu.librespot.ZeroconfServer.handleAddUser(ZeroconfServer.java:367) ~[librespot-player-1.6.2.jar:1.6.2]
        at xyz.gianlu.librespot.ZeroconfServer.access$200(ZeroconfServer.java:56) ~[librespot-player-1.6.2.jar:1.6.2]
        at xyz.gianlu.librespot.ZeroconfServer$HttpRunner.handleRequest(ZeroconfServer.java:499) ~[librespot-player-1.6.2.jar:1.6.2]
        at xyz.gianlu.librespot.ZeroconfServer$HttpRunner.handle(ZeroconfServer.java:574) ~[librespot-player-1.6.2.jar:1.6.2]
        at xyz.gianlu.librespot.ZeroconfServer$HttpRunner.lambda$run$1(ZeroconfServer.java:482) ~[librespot-player-1.6.2.jar:1.6.2]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]

Version/Commit
https://github.com/librespot-org/librespot-java/releases/tag/v1.6.2

@kokarare1212 kokarare1212 added the bug Something isn't working label May 16, 2023
@DanGurt
Copy link

DanGurt commented May 16, 2023

The problem now also occurs with version 1.6.2 when trying to authenticate with USER_PASS

May 16 17:33:14 bash[7012]: 2023-05-16 17:33:14,170 INFO  Session:331 - Connected successfully!
May 16 17:33:14 bash[7012]: 2023-05-16 17:33:14,591 ERROR Log4JUncaughtExceptionHandler:31 - [main]
May 16 17:33:14 bash[7012]: xyz.gianlu.librespot.core.Session$SpotifyAuthenticationException: PremiumAccountRequired
May 16 17:33:14 bash[7012]:         at xyz.gianlu.librespot.core.Session.authenticatePartial(Session.java:450) ~[librespot-player-1.6.2.jar:1.6.2]
May 16 17:33:14 bash[7012]:         at xyz.gianlu.librespot.core.Session.authenticate(Session.java:339) ~[librespot-player-1.6.2.jar:1.6.2]
May 16 17:33:14 bash[7012]:         at xyz.gianlu.librespot.core.Session.access$600(Session.java:77) ~[librespot-player-1.6.2.jar:1.6.2]
May 16 17:33:14 bash[7012]:         at xyz.gianlu.librespot.core.Session$Builder.create(Session.java:1029) ~[librespot-player-1.6.2.jar:1.6.2]
May 16 17:33:14 bash[7012]:         at xyz.gianlu.librespot.player.Main.main(Main.java:80) ~[librespot-player-1.6.2.jar:1.6.2]

@justingood
Copy link

I am seeing the same error using Zeroconf as well

2023-05-16 17:54:04,336 INFO  ZeroconfServer:345 - Accepted new user from Pixel 5. {deviceId: a3zxnza29pchzhxwecjf9yb8ghdmpuuwbjpu828p2}
2023-05-16 17:54:05,381 INFO  Session:137 - Created new session! {deviceId: a3zxnza29pchzhxwecjf9yb8ghdmpuuwbjpu828p2, ap: ap-gae2.spotify.com:80, proxy: false}
2023-05-16 17:54:06,338 INFO  Session:331 - Connected successfully!
2023-05-16 17:54:06,895 ERROR ZeroconfServer:375 - Couldn't establish a new session.
xyz.gianlu.librespot.core.Session$SpotifyAuthenticationException: PremiumAccountRequired
	at xyz.gianlu.librespot.core.Session.authenticatePartial(Session.java:450) ~[librespot.jar:1.6.2]
	at xyz.gianlu.librespot.core.Session.authenticate(Session.java:339) ~[librespot.jar:1.6.2]
	at xyz.gianlu.librespot.core.Session.access$600(Session.java:77) ~[librespot.jar:1.6.2]
	at xyz.gianlu.librespot.core.Session$Builder.create(Session.java:1029) ~[librespot.jar:1.6.2]
	at xyz.gianlu.librespot.ZeroconfServer.handleAddUser(ZeroconfServer.java:367) ~[librespot.jar:1.6.2]
	at xyz.gianlu.librespot.ZeroconfServer.access$200(ZeroconfServer.java:56) ~[librespot.jar:1.6.2]
	at xyz.gianlu.librespot.ZeroconfServer$HttpRunner.handleRequest(ZeroconfServer.java:499) ~[librespot.jar:1.6.2]
	at xyz.gianlu.librespot.ZeroconfServer$HttpRunner.handle(ZeroconfServer.java:574) ~[librespot.jar:1.6.2]
	at xyz.gianlu.librespot.ZeroconfServer$HttpRunner.lambda$run$1(ZeroconfServer.java:482) ~[librespot.jar:1.6.2]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]

@i-do-cpp
Copy link

The fix is to provide a newer client version at https://github.com/librespot-org/librespot-java/blob/0a8e685/lib/src/main/java/xyz/gianlu/librespot/Version.java#L72.
Specifying 117300517 from https://github.com/librespot-org/librespot/blob/ae8387a/core/src/version.rs#L20 makes the login work again.

@kokarare1212
Copy link
Contributor Author

They seem to work well!
I opened a PR regarding the fixes.

@devgianlu
Copy link
Member

devgianlu commented May 17, 2023

I have published v1.6.3

wojked added a commit to wojked/custom-images that referenced this issue May 17, 2023
wojked added a commit to wojked/hassio-addons that referenced this issue May 17, 2023
wojked added a commit to wojked/hassio-addons that referenced this issue May 17, 2023
@wojked
Copy link

wojked commented May 17, 2023

Thank you so much!

@maxwen
Copy link

maxwen commented May 17, 2023

Thanks a lot for fixing this so fast

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants