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.

nil error when attempting to play a playlist that contains any number of offline files.

See original GitHub issue

Describe the bug Cannot connect to device with spotify when listening to a playlist with any number of offline files.

Version librespot-java-api-v1.5.5

To Reproduce Steps to reproduce the behavior:

  1. Restart machine
  2. Play a custom playlist that contains Offline files, but play a Spotify track.
  3. Try to attach to spocon.
  4. See error

Expected behavior Spotify should attach and skip songs that spocon hasn’t downloaded / doesn’t have access to.

Logs

Apr 09 05:12:41 spotipi java[1135]: 2021-04-09 05:12:41,223 TRACE DealerClient:97 - Received request. {mid: hm://connect-state/v1/player/command, key: cbf79024-7486-47ec-9fb9-c6268e81005c, pid: 886375822, sender: 4caaba3413d4673d3929a47864cd72a79628748d, command: {"endpoint":"transfer","data":"CgYIARAAGAAS4QUI44XLposvEAAZAAAAAAAA8D8gACrKBQoAEhBkYjc4MDcxNzQxNTE3YjU1GhD1MhFpZ9dBg7T7CcOM4/BeIjEKCWFsYnVtX3VyaRIkc3BvdGlmeTphbGJ1bTo1T0FlQ3VkS2VOT2NQSHpHUlFWeGl0IiUKC2FsYnVtX3RpdGxlEhZZcyBWIE9yY2hlc3RyYSBWZXJzaW9uIkoKEGltYWdlX3hsYXJnZV91cmwSNnNwb3RpZnk6aW1hZ2U6YWI2NzYxNmQwMDAwYjI3MzNmNzEwZTUxODRiM2RmZDJmOTJhY2I3NiIqCiBhY3Rpb25zLnNraXBwaW5nX3ByZXZfcGFzdF90cmFjaxIGcmVzdW1lIkkKD2ltYWdlX3NtYWxsX3VybBI2c3BvdGlmeTppbWFnZTphYjY3NjE2ZDAwMDA0ODUxM2Y3MTBlNTE4NGIzZGZkMmY5MmFjYjc2IjUKCmVudGl0eV91cmkSJ3Nwb3RpZnk6cGxheWxpc3Q6NVJKVndsNmRKWGFSM0lVRDJtTFFIcCIqCiBhY3Rpb25zLnNraXBwaW5nX25leHRfcGFzdF90cmFjaxIGcmVzdW1lIjMKCmFydGlzdF91cmkSJXNwb3RpZnk6YXJ0aXN0OjVXRm9memdSeHBWTmtwd2c5WFJTZGciQwoJaW1hZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMDFlMDIzZjcxMGU1MTg0YjNkZmQyZjkyYWNiNzYiDgoJaXRlcmF0aW9uEgEwIhUKDHRyYWNrX3BsYXllchIFYXVkaW8iSQoPaW1hZ2VfbGFyZ2VfdXJsEjZzcG90aWZ5OmltYWdlOmFiNjc2MTZkMDAwMGIyNzMzZjcxMGU1MTg0YjNkZmQyZjkyYWNiNzYiNgoLY29udGV4dF91cmkSJ3Nwb3RpZnk6cGxheWxpc3Q6NVJKVndsNmRKWGFSM0lVRDJtTFFIcBqjAgomChBkZXNrdG9wLWNsaWVudC14EgoxLjEuNTYuNTk1GgAiACoAMgAS4AEKJ3Nwb3RpZnk6cGxheWxpc3Q6NVJKVndsNmRKWGFSM0lVRDJtTFFIcBIxY29udGV4dDovL3Nwb3RpZnk6cGxheWxpc3Q6NVJKVndsNmRKWGFSM0lVRDJtTFFIcBoYCg1jb250ZXh0X293bmVyEgd6YWdlcjBuGjUKCWltYWdlX3VybBIoYWI2NzcwNmMwMDAwZGE4NGFjY2VkZGQ1ZTUyYzNhNzViYjY4MTQ2YxotChNjb250ZXh0X2Rlc2NyaXB0aW9uEhZ6YWdlcm9uLCBpbiBhIG51dHNoZWxsIgAwARoQZGI3ODA3MTc0MTUxN2I1NSIAKgAyACICEAA=","options":{"restore_paused":"restore","restore_position":"extrapolate","restore_track":"only_current","license":"premium"},"from_device_identifier":"4caaba3413d4673d3929a47864cd72a79628748d"}}
Apr 09 05:12:41 spotipi java[1135]: 2021-04-09 05:12:41,227 DEBUG Player:89 - Received command: Transfer
Apr 09 05:12:41 spotipi java[1135]: 2021-04-09 05:12:41,254 DEBUG Player:379 - Loading context (transfer), uri: spotify:playlist:5RJVwl6dJXaR3IUD2mLQHp
Apr 09 05:12:41 spotipi java[1135]: 2021-04-09 05:12:41,260 TRACE MercuryClient:140 - Send Mercury request, seq: 5, uri: hm://context-resolve/v1/spotify:playlist:5RJVwl6dJXaR3IUD2mLQHp, method: GET
Apr 09 05:12:41 spotipi java[1135]: 2021-04-09 05:12:41,662 TRACE MercuryClient:183 - Handling packet, cmd: MercuryReq, seq: 5, flags: 0, parts: 1
Apr 09 05:12:41 spotipi java[1135]: 2021-04-09 05:12:41,769 TRACE MercuryClient:183 - Handling packet, cmd: MercuryReq, seq: 5, flags: 2, parts: 1
Apr 09 05:12:41 spotipi java[1135]: 2021-04-09 05:12:41,801 TRACE MercuryClient:183 - Handling packet, cmd: MercuryReq, seq: 5, flags: 2, parts: 1
Apr 09 05:12:41 spotipi java[1135]: 2021-04-09 05:12:41,841 TRACE MercuryClient:183 - Handling packet, cmd: MercuryReq, seq: 5, flags: 1, parts: 1
Apr 09 05:12:41 spotipi java[1135]: 2021-04-09 05:12:41,945 ERROR DealerClient:112 - Failed handling request. {key: cbf79024-7486-47ec-9fb9-c6268e81005c}
Apr 09 05:12:41 spotipi java[1135]: java.lang.UnsupportedOperationException: null
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.metadata.UnsupportedId.getGid(UnsupportedId.java:17) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.common.ProtoUtils.lambda$jsonToContextTrack$0(ProtoUtils.java:121) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at java.util.Optional.ifPresent(Optional.java:183) ~[?:?]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.common.ProtoUtils.jsonToContextTrack(ProtoUtils.java:119) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.common.ProtoUtils.jsonToContextTracks(ProtoUtils.java:137) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.common.ProtoUtils.jsonToContextPage(ProtoUtils.java:148) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.common.ProtoUtils.jsonToContextPages(ProtoUtils.java:156) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.mercury.MercuryRequests$ResolvedContextWrapper.pages(MercuryRequests.java:142) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.player.PagesLoader.getPage(PagesLoader.java:95) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.player.PagesLoader.nextPage(PagesLoader.java:129) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.player.StateWrapper$TracksKeeper.initializeFrom(StateWrapper.java:1075) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.player.StateWrapper.transfer(StateWrapper.java:480) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.player.Player.handleTransferState(Player.java:382) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.player.Player.access$300(Player.java:49) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.player.Player$1.command(Player.java:96) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.player.state.DeviceStateHandler.notifyCommand(DeviceStateHandler.java:110) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.player.state.DeviceStateHandler.onRequest(DeviceStateHandler.java:176) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.dealer.DealerClient.lambda$handleRequest$1(DealerClient.java:107) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.common.AsyncWorker.lambda$new$0(AsyncWorker.java:20) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at xyz.gianlu.librespot.common.AsyncProcessor.lambda$submit$1(AsyncProcessor.java:40) ~[librespot-java-api-v1.5.5.jar:1.5.5]
Apr 09 05:12:41 spotipi java[1135]:         at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
Apr 09 05:12:41 spotipi java[1135]:         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
Apr 09 05:12:41 spotipi java[1135]:         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
Apr 09 05:12:41 spotipi java[1135]:         at java.lang.Thread.run(Thread.java:834) [?:?]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
devgianlucommented, Apr 9, 2021

That should be fixed too.

I’ve also added the snapshots link to the README.

1reaction
devgianlucommented, Apr 9, 2021

Should be good now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Feedback Request: iOS Offline Issues - The Spotify Community
Solved: Hello everyone! Spotify here. We are looking into customer reports about issues with offlined playlists on iOS devices (music which is.
Read more >
FairPlay Streaming | Apple Developer Forums
On updating to iOS 16.1 we started having playback failure for all our drm content on safari/chrome for ios which uses fairplay. Versions...
Read more >
How to Fix “Script Error” An Error Has Occurred In ... - YouTube
How to Fix “Script Error ” An Error Has Occurred In The Script On This Page In Windows PC.You might have been buffering...
Read more >
Access data offline | Firestore - Firebase
Cloud Firestore supports offline data persistence. This feature caches a copy of the Cloud Firestore data that your app is actively using, so...
Read more >
MediaDrm - Android Developers
Enforcing requirements related to the number of devices that may play ... Offline license state is unknown, an error occurred while trying to...
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