devgianlu / go-librespot

Yet another open source Spotify client, written in Go.
GNU General Public License v3.0
52 stars 7 forks source link

Add to queue does not work #34

Closed volumio closed 2 months ago

volumio commented 2 months ago

How to replicate:

The daemon crashes:

May 04 17:57:21 motivo volumio[13289]: info: Sending Spotify command with payload to local API: /player/add_to_queue May 04 17:57:21 motivo go-librespot[13784]: panic: assignment to entry in nil map May 04 17:57:21 motivo go-librespot[13784]: goroutine 70 [running]: May 04 17:57:21 motivo go-librespot[13784]: panic({0x5a63b8, 0x6cd468}) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/panic.go:987 +0x414 fp=0x203f7ec sp=0x203f790 pc=0x4ee28 May 04 17:57:21 motivo go-librespot[13784]: runtime.mapassign_faststr(0x590f78, 0x0, {0x61e3b7, 0x9}) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/map_faststr.go:205 +0x420 fp=0x203f824 sp=0x203f7ec pc=0x26ff8 May 04 17:57:21 motivo go-librespot[13784]: go-librespot/tracks.(List).AddToQueue(...) May 04 17:57:21 motivo go-librespot[13784]: /home/runner/work/go-librespot/go-librespot/tracks/tracks.go:199 May 04 17:57:21 motivo go-librespot[13784]: main.(AppPlayer).addToQueue(0x1db8390, 0x1da2ac0) May 04 17:57:21 motivo go-librespot[13784]: /home/runner/work/go-librespot/go-librespot/cmd/daemon/controls.go:239 +0x48 fp=0x203f850 sp=0x203f824 pc=0x5363a0 May 04 17:57:21 motivo go-librespot[13784]: main.(AppPlayer).handleApiRequest(0x1db8390, {{0x61faf0, 0xc}, {0x58b678, 0x1e91050}, 0x1da2640}) May 04 17:57:21 motivo go-librespot[13784]: /home/runner/work/go-librespot/go-librespot/cmd/daemon/player.go:376 +0xa00 fp=0x203f8fc sp=0x203f850 pc=0x53dfb8 May 04 17:57:21 motivo go-librespot[13784]: main.(AppPlayer).Run(0x1db8390, 0x1e8c240) May 04 17:57:21 motivo go-librespot[13784]: /home/runner/work/go-librespot/go-librespot/cmd/daemon/player.go:416 +0x528 fp=0x203ffe0 sp=0x203f8fc pc=0x53e9c8 May 04 17:57:21 motivo go-librespot[13784]: main.(App).withAppPlayer.func4() May 04 17:57:21 motivo go-librespot[13784]: /home/runner/work/go-librespot/go-librespot/cmd/daemon/main.go:210 +0x30 fp=0x203ffec sp=0x203ffe0 pc=0x53a250 May 04 17:57:21 motivo go-librespot[13784]: runtime.goexit() May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/asm_arm.s:831 +0x4 fp=0x203ffec sp=0x203ffec pc=0x84730 May 04 17:57:21 motivo go-librespot[13784]: created by main.(App).withAppPlayer May 04 17:57:21 motivo go-librespot[13784]: /home/runner/work/go-librespot/go-librespot/cmd/daemon/main.go:210 +0x358 May 04 17:57:21 motivo go-librespot[13784]: goroutine 1 [select, 2 minutes]: May 04 17:57:21 motivo go-librespot[13784]: runtime.gopark(0x646428, 0x0, 0x9, 0x18, 0x1) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/proc.go:381 +0x100 fp=0x204ed24 sp=0x204ed10 pc=0x527b0 May 04 17:57:21 motivo go-librespot[13784]: runtime.selectgo(0x204ee1c, 0x1cb7dfc, 0x0, 0x0, 0x2, 0x1) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/select.go:327 +0xb70 fp=0x204edcc sp=0x204ed24 pc=0x64d80 May 04 17:57:21 motivo go-librespot[13784]: go-librespot/zeroconf.(Zeroconf).Serve(0x1c28fa0, 0x204eeb8) May 04 17:57:21 motivo go-librespot[13784]: /home/runner/work/go-librespot/go-librespot/zeroconf/zeroconf.go:268 +0x240 fp=0x204ee70 sp=0x204edcc pc=0x4e9e3c May 04 17:57:21 motivo go-librespot[13784]: main.(App).withAppPlayer(0x1c963f0, 0x1d58220) May 04 17:57:21 motivo go-librespot[13784]: /home/runner/work/go-librespot/go-librespot/cmd/daemon/main.go:272 +0x4d8 fp=0x204eee0 sp=0x204ee70 pc=0x5398bc May 04 17:57:21 motivo go-librespot[13784]: main.(App).withCredentials(0x1c963f0, {0x5aea80, 0x1caa540}) May 04 17:57:21 motivo go-librespot[13784]: /home/runner/work/go-librespot/go-librespot/cmd/daemon/main.go:146 +0x414 fp=0x204ef3c sp=0x204eee0 pc=0x538f40 May 04 17:57:21 motivo go-librespot[13784]: main.(App).SpotifyToken(...) May 04 17:57:21 motivo go-librespot[13784]: /home/runner/work/go-librespot/go-librespot/cmd/daemon/main.go:106 May 04 17:57:21 motivo go-librespot[13784]: main.main() May 04 17:57:21 motivo go-librespot[13784]: /home/runner/work/go-librespot/go-librespot/cmd/daemon/main.go:421 +0x530 fp=0x204efc0 sp=0x204ef3c pc=0x53ad90 May 04 17:57:21 motivo go-librespot[13784]: runtime.main() May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/proc.go:250 +0x268 fp=0x204efec sp=0x204efc0 pc=0x52288 May 04 17:57:21 motivo go-librespot[13784]: runtime.goexit() May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/asm_arm.s:831 +0x4 fp=0x204efec sp=0x204efec pc=0x84730 May 04 17:57:21 motivo go-librespot[13784]: goroutine 2 [force gc (idle), 2 minutes]: May 04 17:57:21 motivo go-librespot[13784]: runtime.gopark(0x6463f8, 0xa392b8, 0x11, 0x14, 0x1) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/proc.go:381 +0x100 fp=0x1c3cfd8 sp=0x1c3cfc4 pc=0x527b0 May 04 17:57:21 motivo go-librespot[13784]: runtime.goparkunlock(...) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/proc.go:387 May 04 17:57:21 motivo go-librespot[13784]: runtime.forcegchelper() May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/proc.go:305 +0xd4 fp=0x1c3cfec sp=0x1c3cfd8 pc=0x525d0 May 04 17:57:21 motivo go-librespot[13784]: runtime.goexit() May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/asm_arm.s:831 +0x4 fp=0x1c3cfec sp=0x1c3cfec pc=0x84730 May 04 17:57:21 motivo go-librespot[13784]: created by runtime.init.5 May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/proc.go:293 +0x1c May 04 17:57:21 motivo go-librespot[13784]: goroutine 18 [GC sweep wait]: May 04 17:57:21 motivo go-librespot[13784]: runtime.gopark(0x6463f8, 0xa398b8, 0xc, 0x14, 0x1) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/proc.go:381 +0x100 fp=0x1c387c8 sp=0x1c387b4 pc=0x527b0 May 04 17:57:21 motivo go-librespot[13784]: runtime.goparkunlock(...) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/proc.go:387 May 04 17:57:21 motivo go-librespot[13784]: runtime.bgsweep(0x1c8e000) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/mgcsweep.go:319 +0x104 fp=0x1c387e4 sp=0x1c387c8 pc=0x3c528 May 04 17:57:21 motivo go-librespot[13784]: runtime.gcenable.func1() May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/mgc.go:178 +0x28 fp=0x1c387ec sp=0x1c387e4 pc=0x2cff4 May 04 17:57:21 motivo go-librespot[13784]: runtime.goexit() May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/asm_arm.s:831 +0x4 fp=0x1c387ec sp=0x1c387ec pc=0x84730 May 04 17:57:21 motivo go-librespot[13784]: created by runtime.gcenable May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/mgc.go:178 +0x74 May 04 17:57:21 motivo go-librespot[13784]: goroutine 19 [GC scavenge wait]: May 04 17:57:21 motivo go-librespot[13784]: runtime.gopark(0x6463f8, 0xa39b98, 0xd, 0x14, 0x2) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/proc.go:381 +0x100 fp=0x1c38fb4 sp=0x1c38fa0 pc=0x527b0 May 04 17:57:21 motivo go-librespot[13784]: runtime.goparkunlock(...) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/proc.go:387 May 04 17:57:21 motivo go-librespot[13784]: runtime.(*scavengerState).park(0xa39b98) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/mgcscavenge.go:400 +0x64 fp=0x1c38fc8 sp=0x1c38fb4 pc=0x39e1c May 04 17:57:21 motivo go-librespot[13784]: runtime.bgscavenge(0x1c8e000) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/mgcscavenge.go:633 +0x64 fp=0x1c38fe4 sp=0x1c38fc8 pc=0x3a560 May 04 17:57:21 motivo go-librespot[13784]: runtime.gcenable.func2() May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/mgc.go:179 +0x28 fp=0x1c38fec sp=0x1c38fe4 pc=0x2cfa0 May 04 17:57:21 motivo go-librespot[13784]: runtime.goexit() May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/asm_arm.s:831 +0x4 fp=0x1c38fec sp=0x1c38fec pc=0x84730 May 04 17:57:21 motivo go-librespot[13784]: created by runtime.gcenable May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/mgc.go:179 +0xbc May 04 17:57:21 motivo go-librespot[13784]: goroutine 20 [finalizer wait]: May 04 17:57:21 motivo go-librespot[13784]: runtime.gopark(0x646338, 0xa4ac60, 0x10, 0x14, 0x1) May 04 17:57:21 motivo go-librespot[13784]: /opt/hostedtoolcache/go/1.20.8/x64/src/runtime/proc.go:381 +0x100 fp=0x1c3c78c sp=0x1c3c778 pc=0x527b0 May 04 17:57:21 motivo go-librespot[13784]: runtime.runfinq()