[GH-ISSUE #129] panic: invalid uri: spotify:track:undefined #78

Closed
opened 2026-02-28 14:25:10 +03:00 by kerem · 1 comment
Owner

Originally created by @lnkpaulo on GitHub (Oct 22, 2024).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/129

Sending play request to http://localhost:3678/player/play where payload: uri='spotify:track:undefined' skip_to_uri=None paused=False gives:

panic: invalid uri: spotify:track:undefined

goroutine 60 [running]:
github.com/devgianlu/go-librespot.SpotifyIdFromUri(...)
	/src/ids.go:114
main.(*AppPlayer).loadCurrentTrack(0xc0000e4800, 0x0, 0x1)
	/src/cmd/daemon/controls.go:199 +0xda5
main.(*AppPlayer).loadContext(0xc0000e4800, 0xc0002d7800, 0x0, 0x0, 0x1)
	/src/cmd/daemon/controls.go:189 +0x60e
main.(*AppPlayer).handleApiRequest(0xc0000e4800, {{0xacfb1e, 0x4}, {0xa462e0, 0xc000580450}, 0xc00061d320})
	/src/cmd/daemon/player.go:488 +0x708
main.(*AppPlayer).Run(0xc0000e4800, 0xc00003dc20)
	/src/cmd/daemon/player.go:578 +0x71a
created by main.(*App).withAppPlayer in goroutine 1
	/src/cmd/daemon/main.go:245 +0x2f1
 

basically the above happens when uri='spotify:track:undefined' .

Originally created by @lnkpaulo on GitHub (Oct 22, 2024). Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/129 Sending play request to _http://localhost:3678/player/play_ where payload: _uri='spotify:track:undefined' skip_to_uri=None paused=False_ gives: ``` panic: invalid uri: spotify:track:undefined goroutine 60 [running]: github.com/devgianlu/go-librespot.SpotifyIdFromUri(...) /src/ids.go:114 main.(*AppPlayer).loadCurrentTrack(0xc0000e4800, 0x0, 0x1) /src/cmd/daemon/controls.go:199 +0xda5 main.(*AppPlayer).loadContext(0xc0000e4800, 0xc0002d7800, 0x0, 0x0, 0x1) /src/cmd/daemon/controls.go:189 +0x60e main.(*AppPlayer).handleApiRequest(0xc0000e4800, {{0xacfb1e, 0x4}, {0xa462e0, 0xc000580450}, 0xc00061d320}) /src/cmd/daemon/player.go:488 +0x708 main.(*AppPlayer).Run(0xc0000e4800, 0xc00003dc20) /src/cmd/daemon/player.go:578 +0x71a created by main.(*App).withAppPlayer in goroutine 1 /src/cmd/daemon/main.go:245 +0x2f1 ``` basically the above happens when uri='spotify:track:undefined' .
kerem 2026-02-28 14:25:10 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@devgianlu commented on GitHub (Oct 22, 2024):

Thank you for reporting. I have made it so that go-librespot will not panic.

<!-- gh-comment-id:2429794378 --> @devgianlu commented on GitHub (Oct 22, 2024): Thank you for reporting. I have made it so that `go-librespot` will not panic.
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/go-librespot#78
No description provided.