question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Playing from playlist fails if the playlist contains locally added tracks

See original GitHub issue

Describe the bug When trying to play any song from a playlist that contains locally added songs (a song not available on spotify by default), it will not pass any audio to librespot-java and an IllegalArgumentException is thrown.

To Reproduce Create a playlist and add some local songs to it, as well as spotify songs. Then, try to play them and send them to librespot-java.

Expected behavior The song will start playing on the speaker.

Screenshots/Stracktraces/Logs

Exception in thread "handle-packet-2034787828" java.lang.IllegalArgumentException: Unknown uri: spotify:local:Wuki:Wukileaks+Secret+Stash:Pon+De+Time+%28Nitti+Gritti+Edit%29:152
	at xyz.gianlu.librespot.mercury.model.PlayableId.fromUri(PlayableId.java:16)
	at xyz.gianlu.librespot.player.remote.Remote3Track.id(Remote3Track.java:83)
	at xyz.gianlu.librespot.player.remote.Remote3Track.toTrackRef(Remote3Track.java:77)
	at xyz.gianlu.librespot.player.remote.Remote3Track.addToState(Remote3Track.java:55)
	at xyz.gianlu.librespot.player.Player$StateWrapper.updateContext(Player.java:771)
	at xyz.gianlu.librespot.player.Player.updateContext(Player.java:295)
	at xyz.gianlu.librespot.player.Player.handleLoad(Player.java:430)
	at xyz.gianlu.librespot.player.Player.handleFrame(Player.java:110)
	at xyz.gianlu.librespot.player.Player.frame(Player.java:206)
	at xyz.gianlu.librespot.spirc.SpotifyIrc$SpircListener.event(SpotifyIrc.java:199)
	at xyz.gianlu.librespot.mercury.MercuryClient$InternalSubListener.dispatch(MercuryClient.java:287)
	at xyz.gianlu.librespot.mercury.MercuryClient.handle(MercuryClient.java:171)
	at xyz.gianlu.librespot.core.PacketsManager$Looper.lambda$run$0(PacketsManager.java:64)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Version/Commit Latest version built from source (as of today)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
devgianlucommented, May 25, 2019

Should be fixed now. but you may still experience some issues due to the fact that removing the track messes up the options.skip_to.track_index. Working properly now.

I’ll keep this open as a reminder to implement local songs playback.

0reactions
Isclecommented, May 25, 2019

You can’t play local tracks with Spotify Connect. Although this could be a pretty interesting feature, I’m closing this for now.

I know! To play them you would need to have the playlist downloaded (at least in Android), I was just pointing out the error 😛

Thanks for fixing it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when adding songs to custom playlist - Apple Community
When I follow the exact steps to add songs to a playlist, I get an error that says something about "Due to Error...
Read more >
Queue ignores playlist and repeats 4-5 tracks
I have a playlist with a series of albums that play through in-order because there's a story. There are roughly 100 songs in...
Read more >
An error occured when trying to add local music to local playlist
I can now access my local music. I then click on a song, it starts playing, I press the 3 dots on the...
Read more >
Trouble Syncing Spotify Local Files? Here's How You Can Fix ...
Open the Spotify app and find the playlist where you added the songs from the local files of your desktop.
Read more >
The 8 most common Spotify problems with simple fixes
Then, select the Add a source button to add your local songs and playlists. Play local files on Spotify. 7. Your Spotify playlists...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found