[GH-ISSUE #25] Exception in thread "main" xyz.gianlu.librespot.core.Session$SpotifyAuthenticationException: PremiumAccountRequired #22

Closed
opened 2026-02-28 14:28:22 +03:00 by kerem · 10 comments
Owner

Originally created by @sthlmsrille on GitHub (May 16, 2023).
Original GitHub issue: https://github.com/entriphy/sp-playcount-librespot/issues/25

Describe the bug
When starting the application error "PremiumAccountRequired" occurs

To Reproduce
Start the application

Expected behavior
To be able to login

Screenshots/Stracktraces/Logs
Screenshots if applicable, stacktrace and log is a crash occurred.

Version/Commit
1.4.1

Issue seem related to this in LibreSpot:
https://github.com/librespot-org/librespot-java/issues/614

Originally created by @sthlmsrille on GitHub (May 16, 2023). Original GitHub issue: https://github.com/entriphy/sp-playcount-librespot/issues/25 **Describe the bug** When starting the application error "PremiumAccountRequired" occurs **To Reproduce** Start the application **Expected behavior** To be able to login **Screenshots/Stracktraces/Logs** Screenshots if applicable, stacktrace and log is a crash occurred. **Version/Commit** 1.4.1 Issue seem related to this in LibreSpot: [https://github.com/librespot-org/librespot-java/issues/614](https://github.com/librespot-org/librespot-java/issues/614)
kerem 2026-02-28 14:28:22 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@zachyf commented on GitHub (May 17, 2023):

I'm also seeing this error! Please keep me posted on what you find.

<!-- gh-comment-id:1551003452 --> @zachyf commented on GitHub (May 17, 2023): I'm also seeing this error! Please keep me posted on what you find.
Author
Owner

@longgtruong commented on GitHub (May 17, 2023):

Same error here

<!-- gh-comment-id:1551134988 --> @longgtruong commented on GitHub (May 17, 2023): Same error here
Author
Owner

@jpgrovy commented on GitHub (May 17, 2023):

Same issue... for the record. My account is a premium account as well.

<!-- gh-comment-id:1552157863 --> @jpgrovy commented on GitHub (May 17, 2023): Same issue... for the record. My account is a premium account as well.
Author
Owner

@jpgrovy commented on GitHub (May 17, 2023):

@sthlmsrille @zachyf @longgtruong

I saw this post saying to just change the version number.

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.

Can someone try using this version number "117300517" instead and see if it works? It will take me a few days to get access to my computer with this on it :(

It looks like the Version.java file needs to be updated

Current code and version looks like this

public static BuildInfo standardBuildInfo() { return BuildInfo.newBuilder() .setProduct(Product.PRODUCT_CLIENT) .addProductFlags(ProductFlags.PRODUCT_FLAG_NONE) .setPlatform(Version.platform()) .setVersion(112800721) .build(); }

<!-- gh-comment-id:1552210927 --> @jpgrovy commented on GitHub (May 17, 2023): @sthlmsrille @zachyf @longgtruong I saw this post saying to just change the version number. `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.` Can someone try using this version number "117300517" instead and see if it works? It will take me a few days to get access to my computer with this on it :( It looks like the Version.java file needs to be updated Current code and version looks like this `public static BuildInfo standardBuildInfo() { return BuildInfo.newBuilder() .setProduct(Product.PRODUCT_CLIENT) .addProductFlags(ProductFlags.PRODUCT_FLAG_NONE) .setPlatform(Version.platform()) .setVersion(112800721) .build(); }`
Author
Owner

@zachyf commented on GitHub (May 17, 2023):

Yep that worked for me.

<!-- gh-comment-id:1552224490 --> @zachyf commented on GitHub (May 17, 2023): Yep that worked for me.
Author
Owner

@sthlmsrille commented on GitHub (May 18, 2023):

I've never compiled a Java application, could you upload a jar or guide me how to do it? 😁

<!-- gh-comment-id:1553185868 --> @sthlmsrille commented on GitHub (May 18, 2023): I've never compiled a Java application, could you upload a jar or guide me how to do it? 😁
Author
Owner

@Webchantment commented on GitHub (May 18, 2023):

I re-compiled it with the new version number. Works fine now.
sp-playcount-librespot.zip

<!-- gh-comment-id:1553430286 --> @Webchantment commented on GitHub (May 18, 2023): I re-compiled it with the new version number. Works fine now. [sp-playcount-librespot.zip](https://github.com/entriphy/sp-playcount-librespot/files/11510451/sp-playcount-librespot.zip)
Author
Owner

@marclind commented on GitHub (May 19, 2023):

That's awesome! I also have no experience in java... How do you pass username and password to the re-complied one? Doesnt seem to work running the file together with "USER=username PASSWORD=password".

<!-- gh-comment-id:1554364136 --> @marclind commented on GitHub (May 19, 2023): That's awesome! I also have no experience in java... How do you pass username and password to the re-complied one? Doesnt seem to work running the file together with "USER=username PASSWORD=password".
Author
Owner

@Webchantment commented on GitHub (May 19, 2023):

From the command line...

  1. Run the JAR: java -jar librespot-core-jar-with-dependencies.jar username password

You only need to provide your Spotify username and password once. After creds.json has been generated, the username and password are not required in the launch arguments.

  1. Run the JAR again: java -jar librespot-core-jar-with-dependencies.jar
<!-- gh-comment-id:1555002485 --> @Webchantment commented on GitHub (May 19, 2023): From the command line... 1) Run the JAR: **java -jar librespot-core-jar-with-dependencies.jar username password** > You only need to provide your Spotify username and password once. After creds.json has been generated, the username and password are not required in the launch arguments. 2) Run the JAR again: **java -jar librespot-core-jar-with-dependencies.jar**
Author
Owner

@entriphy commented on GitHub (May 21, 2023):

Fixed in v1.4.2.

<!-- gh-comment-id:1556080445 --> @entriphy commented on GitHub (May 21, 2023): Fixed in [v1.4.2](https://github.com/entriphy/sp-playcount-librespot/releases/tag/v1.4.2).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/sp-playcount-librespot#22
No description provided.