Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cannot sync playlist #2876

Closed
Engineer-of-Stuff opened this issue Feb 22, 2024 · 9 comments
Closed

[Bug]: Cannot sync playlist #2876

Engineer-of-Stuff opened this issue Feb 22, 2024 · 9 comments
Labels
bug triage New bug reports that need to be evaluated

Comments

@Engineer-of-Stuff
Copy link

Engineer-of-Stuff commented Feb 22, 2024

Version

0.51.1

Current Behavior

I have a Navidrome install and attempted to sync my playlist to the server. Server failed with a Go panic. Also fails if the playlist already exists on the server. Fails on a fresh install as well as an existing one.

Steps To Reproduce

Not sure.

Environment

- OS: Android
- Client: Symfonium

How Navidrome is installed?

Binary (from downloads page)

Configuration

MusicFolder = "/music"
EnableSharing = true

Spotify.ID = "xxx"
Spotify.Secret = "xxx"

LastFM.Enabled = true
LastFM.ApiKey = "xxx"
LastFM.Secret = "xxx"

Relevant log output

ERRO[0463] data not found                                id=a31a6c66-ad8c-4916-915f-fe89fbae905a requestId=navidrome/EGMpupM3A1-000049 username=USER
WARN[0463] API: Failed response                          endpoint=/rest/getPlaylist.view error=70 message="Directory not found" requestId=navidrome/EGMpupM3A1-000049 username=USER
ERRO[0463] Error getting playlist's tracks - THIS SHOULD NOT HAPPEN!  error="data not found" playlistId=a31a6c66-ad8c-4916-915f-fe89fbae905a requestId=navidrome/EGMpupM3A1-000050 username=USER

 panic: runtime error: invalid memory address or nil pointer dereference
 
 -> github.com/navidrome/navidrome/core.(*playlists).Update.func1
 ->   /github/workspace/core/playlists.go:238

    github.com/navidrome/navidrome/persistence.(*SQLStore).WithTx.func1
      /github/workspace/persistence/persistence.go:116
    github.com/pocketbase/dbx.(*DB).Transactional
      /go/pkg/mod/github.com/pocketbase/[email protected]/db.go:220
    github.com/navidrome/navidrome/persistence.(*SQLStore).WithTx
      /github/workspace/persistence/persistence.go:114
    github.com/navidrome/navidrome/core.(*playlists).Update
      /github/workspace/core/playlists.go:228
    github.com/navidrome/navidrome/server/subsonic.(*Router).UpdatePlaylist
      /github/workspace/server/subsonic/playlists.go:148
    github.com/navidrome/navidrome/server/subsonic.(*Router).routes.func5.h.func6
      /github/workspace/server/subsonic/api.go:206
    github.com/navidrome/navidrome/server/subsonic.hr.func1
      /github/workspace/server/subsonic/api.go:213
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server/subsonic.(*Router).routes.func5.getPlayer.func1.1
      /github/workspace/server/subsonic/middlewares.go:174
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/go-chi/chi/v5.(*ChainHandler).ServeHTTP
      /go/pkg/mod/github.com/go-chi/chi/[email protected]/chain.go:31
    github.com/go-chi/chi/v5.(*Mux).routeHTTP
      /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:443
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server/subsonic.(*Router).routes.authenticate.func17.1
      /github/workspace/server/subsonic/middlewares.go:107
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server/subsonic.checkRequiredParameters.func1
      /github/workspace/server/subsonic/middlewares.go:67
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server/subsonic.postFormToQueryParams.func1
      /github/workspace/server/subsonic/middlewares.go:41
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/go-chi/chi/v5.(*Mux).ServeHTTP
      /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:73
    github.com/go-chi/chi/v5.(*Mux).Mount.func1
      /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:315
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server.requestLogger.func1
      /github/workspace/server/middlewares.go:33
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server.jwtVerifier.jwtVerifier.Verify.func1.func2
      /go/pkg/mod/github.com/go-chi/jwtauth/[email protected]/jwtauth.go:78
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server.authHeaderMapper.func1
      /github/workspace/server/auth.go:181
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server.loggerInjector.func1
      /github/workspace/server/middlewares.go:64
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/go-chi/chi/v5/middleware.(*Compressor).Handler-fm.(*Compressor).Handler.func1
      /go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/compress.go:209
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server.clientUniqueIDMiddleware.func1
      /github/workspace/server/middlewares.go:157
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server.serverAddressMiddleware.func1
      /github/workspace/server/middlewares.go:185
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server.(*Server).initRoutes.robotsTXT.func4.1
      /github/workspace/server/middlewares.go:75
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server.(*Server).initRoutes.Heartbeat.func3.1
      /go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/heartbeat.go:21
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/go-chi/chi/v5/middleware.Recoverer.func1
      /go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/recoverer.go:45
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/navidrome/navidrome/server.realIPMiddleware.RealIP.func1
      /go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/realip.go:36
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/go-chi/chi/v5/middleware.RequestID.func1
      /go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/request_id.go:76
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/go-chi/cors.(*Cors).Handler-fm.(*Cors).Handler.func1
      /go/pkg/mod/github.com/go-chi/[email protected]/cors.go:228
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/unrolled/secure.(*Secure).Handler-fm.(*Secure).Handler.func1
      /go/pkg/mod/github.com/unrolled/[email protected]/secure.go:198
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/go-chi/chi/v5.(*ChainHandler).ServeHTTP
      /go/pkg/mod/github.com/go-chi/chi/[email protected]/chain.go:31
    github.com/go-chi/chi/v5.(*Mux).routeHTTP
      /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:443
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2136
    github.com/go-chi/chi/v5.(*Mux).ServeHTTP
      /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:90
    net/http.serverHandler.ServeHTTP
      /usr/local/go/src/net/http/server.go:2938
    net/http.(*conn).serve
      /usr/local/go/src/net/http/server.go:2009
    created by net/http.(*Server).Serve in goroutine 13
      /usr/local/go/src/net/http/server.go:3086

nginx log:

xxx.xxx.xxx.xxx - - [22/Feb/2024:13:26:21 -0700] "GET /rest/getPlaylist.view?id=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx&u=USER&t=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&s=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&v=1.13.0&c=Symfonium&f=json HTTP/1.1" 200 198 "-" "Symfonium/8.0.0a (Linux;Android 9)"
xxx.xxx.xxx.xxx - - [22/Feb/2024:13:26:21 -0700] "GET /rest/updatePlaylist.view?playlistid=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx&name=Soundtracks&songIdToAdd=78015b4f9c721df0b4e33bb16a3b932a&songIdToAdd=da08b18759193594bbd59ee0bb571a6e&songIdToAdd=6f2b949d020ee9047594d5689206a61c&songIdToAdd=13bec94e965882c02ea01bda2ba0c5f9&songIdToAdd=f67cf96bb1c23e183e4643f135a12069&songIdToAdd=ef8a632a80498e757404d75fde360277&songIdToAdd=e0b1479df48f051bb5b0d91201bd3a7e&songIdToAdd=1a21128a7a9a6ea281cad1dc35ddd7ed&songIdToAdd=e9a71751b3ce06b71ae49d6f2733abbb&songIdToAdd=75a31f95c2cc3a20d9ccf45d66945a65&songIdToAdd=e890512e286ad6f5dc23aefaefd5470a&songIdToAdd=40653d953252729d16fd1275f57602fb&songIdToAdd=d63c7b014c7ac9948876353fe5722ea3&songIdToAdd=0258baa9615146d9913de2086dae4937&songIdToAdd=c15a72fcdf8cd8a8b8745ceff12cd52a&songIdToAdd=a3ab8502f3fed328e263ec193429fe38&songIdToAdd=03c9e8384fa14c525f373ff332f265cc&songIdToAdd=c0aba156228dc50f2cc10cb45357b1e7&songIdToAdd=33da6740ab32dc464bab9066c74853f0&songIdToAdd=c8307814a52968183131628207ed9659&songIdToAdd=98189dd958e2de2eaa2d530e8f4d7ed3&songIdToAdd=e55b362351ac2566e5b3a6fce87270d8&songIdToAdd=13e4801187f4cd2ec310d1a33ca82475&songIdToAdd=9172612898643c96a3efbd770e9654b2&songIdToAdd=e0c921995d25a89084dce4eff68daccb&songIdToAdd=27b4139a3c1d0c44fc8d288f421b4e3e&songIdToAdd=8bbfd15b7d1a126e1cf3fc45431162d4&songIdToAdd=8625277bd4eeb1d034a21f0b7c7c486b&songIdToAdd=a77b92cc9c3083a689867f2619e42c07&songIdToAdd=0b292e63d92b9546ed711674079e94e2&songIdToAdd=7267f33ddc9813d8fe466c8c7a5d2550&songIdToAdd=12ff6f467661224e691f97b05b60b63b&songIdToAdd=7d6d1153c4d9fd96bfdeb8e7dd0bdcef&songIdToAdd=9ba0584c661bc4cb61673c58062d2cac&songIdToAdd=88c1e672a4320830f2a6ff8063b22d9d&songIdToAdd=1212c439c39bb2a519e8898ea9708413&songIdToAdd=577b7e9b431c7b7bc9f60742c8da0540&songIdToAdd=ab231bd422d45f7aa95b580b8092bfa2&songIdToAdd=44f99d014379c7bdbe7a16f7e5363015&songIdToAdd=9c860b2350fd26ae7aa01bc91aed1dcd&songIdToAdd=7c0a9b0596c24331576f9045d592fdf1&songIdToAdd=7490f77a025e38fdbb388d8af2edb113&songIdToAdd=75cc9571d0d3e8cfe939e861fee53758&songIdToAdd=520adf1d9776ecebebec9b6d28989360&songIdToAdd=4b6de98456cc5865465734bbb28a61e5&songIdToAdd=decdd0ea4fbda13ed637d244f3e968a0&songIdToAdd=d3c52c895e294cd58d79b64c076b1a5b&songIdToAdd=c918ec0e5b43ec621cb1719e9aa44255&songIdToAdd=5221eef0e3584c7aee787ec561d9d4a3&songIdToAdd=acbe6578fd82581718c09bafb414ea77&u=USER&t=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&s=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&v=1.13.0&c=Symfonium&f=json HTTP/1.1" 500 0 "-" "Symfonium/8.0.0a (Linux;Android 9)"
@Engineer-of-Stuff Engineer-of-Stuff added bug triage New bug reports that need to be evaluated labels Feb 22, 2024
@Prankish8407
Copy link

Symfonium is a 3rd party API app that makes use of Navidrome.
i bought that app too and i have 0 issues with syncing.
Im running it via docker container routed externally via cloudflare.

you might want to try substreamer --> free app and works like charm to with playlist support sync as well.
Maybe that'll work, if not, its def. your way of installation and might even be ports etc.

@Engineer-of-Stuff
Copy link
Author

Okay, sure. But the server shouldn't be crashing because of something the client did.

@Engineer-of-Stuff
Copy link
Author

I created a new playlist on Symfonium and synced it to the server. This worked fine.

The issue occurs when I have pre-existing playlists that aren't present on Navidrome. When I try to sync Symfonium, it uses the old playlist ID, assuming that the playlist exists on the server.

@swishkin
Copy link

swishkin commented Mar 22, 2024

I'm getting a similar/the same error trying to set up and sync a smart playlist.

Prior to this error, I was getting the playlists imported, but they didn't populate according to the smart playlist queries I set up. However, I didn't see this error at that time. I'm not sure if I missed it or it wasn't showing this information.

2024-03-22T02:53:36.232446807Z time="2024-03-22T02:53:36Z" level=error msg="Error getting playlist's tracks - THIS SHOULD NOT HAPPEN!" error="data not found" playlistId=15bcf348-bee8-4773-a37d-b49380ed3b5b requestId=3ec1263b4e36/0I9bHxuFXH-000022 username=user
2024-03-22T02:53:36.232855048Z 
2024-03-22T02:53:36.232864336Z  panic: runtime error: invalid memory address or nil pointer dereference
2024-03-22T02:53:36.232867373Z  
2024-03-22T02:53:36.232869557Z  -> github.com/deluan/rest.(*Controller).GetAll
2024-03-22T02:53:36.232871793Z  ->   /go/pkg/mod/github.com/deluan/[email protected]/controller.go:51
2024-03-22T02:53:36.232874048Z 
2024-03-22T02:53:36.232880162Z     github.com/deluan/rest.GetAll.func1
2024-03-22T02:53:36.232887916Z       /go/pkg/mod/github.com/deluan/[email protected]/handlers.go:27
2024-03-22T02:53:36.232890342Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.232892459Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.232894579Z     github.com/navidrome/navidrome/server/nativeapi.getPlaylist.func1.1
2024-03-22T02:53:36.232896734Z       /github/workspace/server/nativeapi/playlists.go:32
2024-03-22T02:53:36.232898860Z     github.com/navidrome/navidrome/server/nativeapi.getPlaylist.func2
2024-03-22T02:53:36.232900973Z       /github/workspace/server/nativeapi/playlists.go:42
2024-03-22T02:53:36.232911979Z     github.com/navidrome/navidrome/server/nativeapi.(*Router).routes.func1.(*Router).addPlaylistTrackRoute.func4.1
2024-03-22T02:53:36.232914679Z       /github/workspace/server/nativeapi/native_api.go:113
2024-03-22T02:53:36.232916801Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.232918832Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.232920874Z     github.com/go-chi/chi/v5.(*Mux).routeHTTP
2024-03-22T02:53:36.232922973Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:443
2024-03-22T02:53:36.232925053Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.232927048Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.232929127Z     github.com/go-chi/chi/v5.(*Mux).ServeHTTP
2024-03-22T02:53:36.232931199Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:73
2024-03-22T02:53:36.232933221Z     github.com/go-chi/chi/v5.(*Mux).Mount.func1
2024-03-22T02:53:36.232935319Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:315
2024-03-22T02:53:36.232937333Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.232939346Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.232941340Z     github.com/navidrome/navidrome/server.JWTRefresher.func1
2024-03-22T02:53:36.232943431Z       /github/workspace/server/auth.go:275
2024-03-22T02:53:36.232945541Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.232947580Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.232949624Z     github.com/navidrome/navidrome/server/nativeapi.(*Router).routes.func1.Authenticator.func2.1
2024-03-22T02:53:36.232951728Z       /github/workspace/server/auth.go:253
2024-03-22T02:53:36.232953711Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.232955903Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.232957899Z     github.com/go-chi/chi/v5.(*ChainHandler).ServeHTTP
2024-03-22T02:53:36.232959920Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/chain.go:31
2024-03-22T02:53:36.232962029Z     github.com/go-chi/chi/v5.(*Mux).routeHTTP
2024-03-22T02:53:36.232968756Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:443
2024-03-22T02:53:36.232971356Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.232973447Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.232975457Z     github.com/go-chi/chi/v5.(*Mux).ServeHTTP
2024-03-22T02:53:36.232977563Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:73
2024-03-22T02:53:36.232979565Z     github.com/go-chi/chi/v5.(*Mux).Mount.func1
2024-03-22T02:53:36.232981529Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:315
2024-03-22T02:53:36.232983601Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.232985591Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.232987610Z     github.com/navidrome/navidrome/server.requestLogger.func1
2024-03-22T02:53:36.232989643Z       /github/workspace/server/middlewares.go:33
2024-03-22T02:53:36.232991625Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.232993670Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.232995679Z     github.com/navidrome/navidrome/server.jwtVerifier.jwtVerifier.Verify.func1.func2
2024-03-22T02:53:36.232997755Z       /go/pkg/mod/github.com/go-chi/jwtauth/[email protected]/jwtauth.go:78
2024-03-22T02:53:36.232999862Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233001846Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233003867Z     github.com/navidrome/navidrome/server.authHeaderMapper.func1
2024-03-22T02:53:36.233005966Z       /github/workspace/server/auth.go:181
2024-03-22T02:53:36.233007962Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233009974Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233011998Z     github.com/navidrome/navidrome/server.loggerInjector.func1
2024-03-22T02:53:36.233014001Z       /github/workspace/server/middlewares.go:64
2024-03-22T02:53:36.233016068Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233018085Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233020114Z     github.com/go-chi/chi/v5/middleware.(*Compressor).Handler-fm.(*Compressor).Handler.func1
2024-03-22T02:53:36.233022218Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/compress.go:209
2024-03-22T02:53:36.233024237Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233026230Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233028238Z     github.com/navidrome/navidrome/server.clientUniqueIDMiddleware.func1
2024-03-22T02:53:36.233030309Z       /github/workspace/server/middlewares.go:157
2024-03-22T02:53:36.233032412Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233034437Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233039248Z     github.com/navidrome/navidrome/server.serverAddressMiddleware.func1
2024-03-22T02:53:36.233041603Z       /github/workspace/server/middlewares.go:185
2024-03-22T02:53:36.233043637Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233045682Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233047712Z     github.com/navidrome/navidrome/server.(*Server).initRoutes.robotsTXT.func4.1
2024-03-22T02:53:36.233049815Z       /github/workspace/server/middlewares.go:75
2024-03-22T02:53:36.233052117Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233054542Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233057870Z     github.com/navidrome/navidrome/server.(*Server).initRoutes.Heartbeat.func3.1
2024-03-22T02:53:36.233061456Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/heartbeat.go:21
2024-03-22T02:53:36.233065384Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233068126Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233070206Z     github.com/go-chi/chi/v5/middleware.Recoverer.func1
2024-03-22T02:53:36.233072217Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/recoverer.go:45
2024-03-22T02:53:36.233074348Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233076385Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233079401Z     github.com/navidrome/navidrome/server.realIPMiddleware.RealIP.func1
2024-03-22T02:53:36.233081519Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/realip.go:36
2024-03-22T02:53:36.233083530Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233085519Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233087497Z     github.com/go-chi/chi/v5/middleware.RequestID.func1
2024-03-22T02:53:36.233089484Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/middleware/request_id.go:76
2024-03-22T02:53:36.233091621Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233093701Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233095747Z     github.com/go-chi/cors.(*Cors).Handler-fm.(*Cors).Handler.func1
2024-03-22T02:53:36.233097843Z       /go/pkg/mod/github.com/go-chi/[email protected]/cors.go:228
2024-03-22T02:53:36.233099848Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233101844Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233103852Z     github.com/unrolled/secure.(*Secure).Handler-fm.(*Secure).Handler.func1
2024-03-22T02:53:36.233105892Z       /go/pkg/mod/github.com/unrolled/[email protected]/secure.go:198
2024-03-22T02:53:36.233107991Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233110008Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233112030Z     github.com/go-chi/chi/v5.(*ChainHandler).ServeHTTP
2024-03-22T02:53:36.233117349Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/chain.go:31
2024-03-22T02:53:36.233119673Z     github.com/go-chi/chi/v5.(*Mux).routeHTTP
2024-03-22T02:53:36.233121769Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:443
2024-03-22T02:53:36.233123861Z     net/http.HandlerFunc.ServeHTTP
2024-03-22T02:53:36.233125870Z       /usr/local/go/src/net/http/server.go:2136
2024-03-22T02:53:36.233127957Z     github.com/go-chi/chi/v5.(*Mux).ServeHTTP
2024-03-22T02:53:36.233130074Z       /go/pkg/mod/github.com/go-chi/chi/[email protected]/mux.go:90
2024-03-22T02:53:36.233132175Z     net/http.serverHandler.ServeHTTP
2024-03-22T02:53:36.233134182Z       /usr/local/go/src/net/http/server.go:2938
2024-03-22T02:53:36.233136207Z     net/http.(*conn).serve
2024-03-22T02:53:36.233138282Z       /usr/local/go/src/net/http/server.go:2009
2024-03-22T02:53:36.233140307Z     created by net/http.(*Server).Serve in goroutine 91
2024-03-22T02:53:36.233142646Z       /usr/local/go/src/net/http/server.go:3086
2024-03-22T02:53:36.233144811Z     
2024-03-22T02:53:36.233146883Z 2024/03/22 02:53:36 Reading playlist(id:15bcf348-bee8-4773-a37d-b49380ed3b5b): data not found
2024-03-22T02:53:36.233201715Z time="2024-03-22T02:53:36Z" level=error msg="HTTP: GET http://music.example.com/api/playlist/15bcf348-bee8-4773-a37d-b49380ed3b5b" elapsedTime="271.638µs" httpStatus=500 remoteAddr=123.456.789.010 requestId=3ec1263b4e36/0I9bHxuFXH-000024 responseSize=26

Here are the two smart playlists I've tried importing:

{
  "all": [
    {"inTheLast": {"lastPlayed": 30}}
  ],
  "sort": "lastPlayed",
  "order": "desc",
  "limit": 100
}
{
  "all": [
    {"gt": {"playcount": 0}}
  ],
  "sort": "playcount",
  "order": "desc",
  "limit": 5
}

Anything else I can provide to help troubleshoot this?

@deluan
Copy link
Member

deluan commented May 11, 2024

I created a new playlist on Symfonium and synced it to the server. This worked fine.

The issue occurs when I have pre-existing playlists that aren't present on Navidrome. When I try to sync Symfonium, it uses the old playlist ID, assuming that the playlist exists on the server.

Yes, I see in the logs that when you select "Push local version to provider", Symfonium sends an /updatePlaylist request with only the playlist ID, and then another one with a songIdToAdd list. The second call causes the panic if the playlist does not exist.

I'm putting a safeguard in place to handle this error, but in this case, the playlist simply won't sync.

@Tolriq, what is the reason for the first call? Are you expecting the playlist to be created or cleared out when you call /updatePlaylist without any ids? That's not the endpoint's behaviour. To do that, you call deletePlaylist first and then call createPlaylist.

Do you see any other Subsonic servers behaving differently?

@deluan
Copy link
Member

deluan commented May 11, 2024

@swishkin Thanks for the report, but your issue is a different one: #2735. Please follow that one for updates.

@Tolriq
Copy link

Tolriq commented May 11, 2024

Once a playlist is synced in Symfonium and have a server id then the server becomes the source of trust. So the playlist is supposed to be there.

There's 2 different cases but due to the servers that does not support post the calls are always split.
For creation, create then update for update delete then update.

So when pushing a diff in the playlist it's getcontent then delete then update but there's only 1 call of each for servers that support post.

There not 2 calls as you suggest in the OP, it's a get then an update, no delete since the get returned nothing and seemed to have returned a 200 despite the playlist missing.

Might worth to check what you return on getPlaylist on missing ID.

@deluan
Copy link
Member

deluan commented May 11, 2024

@Engineer-of-Stuff:

I created a new playlist on Symfonium and synced it to the server. This worked fine.

The issue occurs when I have pre-existing playlists that aren't present on Navidrome. When I try to sync Symfonium, it uses the old playlist ID, assuming that the playlist exists on the server.

Yeah, seems that Symfonium is not respacting the fact that the getPlaylist returns code 70 (not found), and tries to update the playlist anyways.

But Navidrome should not panic in this case, I'm putting a fix for this.

@Tolriq:

Might worth to check what you return on getPlaylist on missing ID.

You can see the response from the logs in the OP:

WARN[0463] API: Failed response      endpoint=/rest/getPlaylist.view error=70 message="Directory not found" requestId=navidrome/EGMpupM3A1-000049 username=USER

(I know, "Directory" does not make sense here, I'm fixing it too)

Let me know if you need anything else from me to investigate this issue, or if you find anything.

@deluan deluan closed this as completed in ed83c22 May 11, 2024
felipemarinho97 added a commit to felipemarinho97/navidrome that referenced this issue Aug 7, 2024
* Bump golang.org/x/sync from 0.6.0 to 0.7.0

Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.6.0 to 0.7.0.
- [Commits](golang/sync@v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump github.com/onsi/gomega from 1.31.1 to 1.32.0

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.31.1 to 1.32.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](onsi/gomega@v1.31.1...v1.32.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix DiscTitle OpenSubsonic compatibility. Closes navidrome#2929

* Bump github.com/onsi/ginkgo/v2 from 2.15.0 to 2.17.1

Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.15.0 to 2.17.1.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](onsi/ginkgo@v2.15.0...v2.17.1)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump github.com/pressly/goose/v3 from 3.18.0 to 3.19.2

Bumps [github.com/pressly/goose/v3](https://github.com/pressly/goose) from 3.18.0 to 3.19.2.
- [Release notes](https://github.com/pressly/goose/releases)
- [Changelog](https://github.com/pressly/goose/blob/master/CHANGELOG.md)
- [Commits](pressly/goose@v3.18.0...v3.19.2)

---
updated-dependencies:
- dependency-name: github.com/pressly/goose/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Update Go to 1.22.2 and TagLib to 2.0.1 (navidrome#2946)

* Bump github.com/pelletier/go-toml/v2 from 2.1.1 to 2.2.0

Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.1.1 to 2.2.0.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](pelletier/go-toml@v2.1.1...v2.2.0)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump github.com/go-chi/jwtauth/v5 from 5.3.0 to 5.3.1

Bumps [github.com/go-chi/jwtauth/v5](https://github.com/go-chi/jwtauth) from 5.3.0 to 5.3.1.
- [Release notes](https://github.com/go-chi/jwtauth/releases)
- [Commits](go-chi/jwtauth@v5.3.0...v5.3.1)

---
updated-dependencies:
- dependency-name: github.com/go-chi/jwtauth/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Fix function name in comment (navidrome#2947)

Signed-off-by: looklose <[email protected]>

* Fix a few mistakes in the French translation (navidrome#2872)

Co-authored-by: Deluan Quintão <[email protected]>

* Ignore formatting diffs when checking for POEditor changes

* Fix some typos in comments (navidrome#2949)

Signed-off-by: oftenoccur <[email protected]>

* Add make target to build docker image

* Bump follow-redirects from 1.15.4 to 1.15.6 in /ui (navidrome#2911)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.4 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.4...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @testing-library/jest-dom from 6.2.0 to 6.4.2 in /ui (navidrome#2845)

Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 6.2.0 to 6.4.2.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](testing-library/jest-dom@v6.2.0...v6.4.2)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump prettier from 3.2.2 to 3.2.5 in /ui (navidrome#2844)

Bumps [prettier](https://github.com/prettier/prettier) from 3.2.2 to 3.2.5.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.2.2...3.2.5)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove deprecation warning about `notify`

* Fix jukebox mode under Windows (navidrome#2774)

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Use named pipe for socket path under windows during mpv playback, change function name, unexport function

Signed-off-by: apkatsikas <[email protected]>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Fix typo

Signed-off-by: apkatsikas <[email protected]>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Early return for Close on Windows

Signed-off-by: apkatsikas <[email protected]>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Update import and run prettier

Signed-off-by: apkatsikas <[email protected]>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Update function name

Signed-off-by: apkatsikas <[email protected]>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Create track_close files for both platforms and move MpvTrack Close into new file

Signed-off-by: apkatsikas <[email protected]>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Create SocketName function for both platforms, restore name of TempFileName

Signed-off-by: apkatsikas <[email protected]>

* bug(core/playback/mpv): jukebox mode under windows - navidrome#2767

Add missing params to SocketName on windows

Signed-off-by: apkatsikas <[email protected]>

* Unexport SocketName, use socketName in NewTrack

---------

Signed-off-by: apkatsikas <[email protected]>

* Bump github.com/pelletier/go-toml/v2 from 2.2.0 to 2.2.1 (navidrome#2956)

Bumps [github.com/pelletier/go-toml/v2](https://github.com/pelletier/go-toml) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Changelog](https://github.com/pelletier/go-toml/blob/v2/.goreleaser.yaml)
- [Commits](pelletier/go-toml@v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump react-icons from 5.0.1 to 5.1.0 in /ui (navidrome#2957)

Bumps [react-icons](https://github.com/react-icons/react-icons) from 5.0.1 to 5.1.0.
- [Release notes](https://github.com/react-icons/react-icons/releases)
- [Commits](react-icons/react-icons@v5.0.1...v5.1.0)

---
updated-dependencies:
- dependency-name: react-icons
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Externalize MPV command template (navidrome#2948)

* externalise MPVTemplate

* Remove unnecessary comment

---------

Co-authored-by: Deluan <[email protected]>

* Bump golang.org/x/net from 0.21.0 to 0.23.0 (navidrome#2962)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.21.0 to 0.23.0.
- [Commits](golang/net@v0.21.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix issue in navidrome#2767 (comment)

* Block regular users from changing their own playlists ownership

* Allow comments in the NSP file.

See comment navidrome#1417 (comment)

* Fix typo

* Include MPV in release Docker image. Refers to navidrome#2910

* Bump github.com/onsi/gomega from 1.32.0 to 1.33.0 (navidrome#2968)

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.32.0 to 1.33.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](onsi/gomega@v1.32.0...v1.33.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Handling long playlist comments (navidrome#2973)

Closes navidrome#1737

* wrapping playlist comment in a <Collapse> element

* Extract common collapsible logic into a component

---------

Co-authored-by: Deluan <[email protected]>

* Use the RealIP middleware also behind a reverse proxy (navidrome#2858)

* Use the RealIP middleware only behind a reverse proxy

* Fix proxy ip source in tests

* Fix test for PR#2087

The PR did not update the test after changing the behavior, but the test still
passed because another condition was preventing the user from being created in
the test.

* Use RealIP even without a trusted reverse proxy

* Use own type for context key

* Fix casing to follow go's conventions

* Do not apply RealIP middleware twice

* Fix IP source in logs

The most interesting data point in the log message is the proxy's IP, but
having the client IP too can help identify integration issues.

* Fix scrobble error spam in the logs.

Relates to navidrome#2831 and navidrome#2975

* Add OpenSubsonic channelCount

* Fix typo in comment (navidrome#2974)

* Bump github.com/pressly/goose/v3 from 3.19.2 to 3.20.0

* Bump Go dependencies (navidrome#2976)

* Fix build

* Bump dependencies

* Bump github.com/spf13/viper from 1.15.0 to 1.18.2

* Add support for Reverse Proxy auth in Subsonic endpoints  (navidrome#2558)

* feat(subsonic): Add support for Reverse Proxy auth - navidrome#2557

Signed-off-by: Jeremiah Menétrey <[email protected]>

* Small refactoring

---------

Signed-off-by: Jeremiah Menétrey <[email protected]>
Co-authored-by: Deluan Quintão <[email protected]>

* Add AlbumPlayCountMode config option (navidrome#2803)

Closes navidrome#1032

* feat(album_repository.go): add kodi-style album playcount option - navidrome#1032

Signed-off-by: Victor van der Veen <[email protected]>

* fix format issue and remove reference to kodi (now normalized)

Signed-off-by: Victor van der Veen <[email protected]>

* reduced complexity but added rounding

Signed-off-by: Victor van der Veen <[email protected]>

* Use constants for AlbumPlayCountMode values

---------

Signed-off-by: Victor van der Veen <[email protected]>
Co-authored-by: Deluan <[email protected]>

* Add tests for AlbumPlayCountMode

* Add tests for AlbumPlayCountMode, change the calc to match the request from navidrome#1032

* Remove AlbumPlayCountMode from command line options

* Load mime_types from external file

* Refactor DB Album mapping to model.Album

* Refactor loadGenres, remove duplication

* Use signal.NotifyContext

* Fix signaler on Windows

* Fix int types in OpenSubsonic responses.

Refer to https://support.symfonium.app/t/symfonium-sync-crashes-when-tpos-is-not-an-int/4204

* Fix AlbumPlayCountMode. Closes navidrome#2984

* Fix PlaylistTracks's loadAllGenres. Fix navidrome#2988

* Bump Go dependencies

* Sort repeated lyrics that may be out of order (navidrome#2989)

With synchronized lyrics with repeated text, there is not a guarantee that the repeat is in order (e.g. `[00:00.00][00:10.00] a\n[00:05.00]b`).
This change will post-process lyrics with repeated timestamps in one line to ensure that it is always sorted.

* Fix typo

* Add `HTTPSecurityHeaders.CustomFrameOptionsValue` option.

Requested in navidrome#248 (comment)

* Fix CollapsibleComment in PlaylistDetails. Closes navidrome#2992

* Pin golangci-lint-action version as a workaround to fix the pipeline.

See golangci/golangci-lint#4695

* Improves golangci-lint configuration and workflow (navidrome#3004)

* chore: the default Go version is based on the go.mod

* chore: use linter configuration instead of exclude-rules

* chore: update workflow

* Persist adjusted volume (navidrome#2997)

Co-authored-by: Deluan Quintão <[email protected]>

* Guard against missing active track (navidrome#2996)

Co-authored-by: Deluan Quintão <[email protected]>

* Bump Go dependencies

* Limit access to Jukebox for admins only (configurable).

Closes navidrome#2849

* Fix ambiguous column when sorting media_files by created_at.

Fix navidrome#3006

* Change default transcodings to a proper typed struct

* Fix migration package name mismatch

* Make dependency injection more consistent

* Terminate all MPV instances when stopping Navidrome (navidrome#3008)

* Terminate all mpv instances when stopping Navidrome

* Exit trackSwitcher goroutine when terminating

* Remove potential race condition when starting the Playback device

* Fix lint error

* Removed unused and unneeded vars/functions

* Use device short name in log

* Small refactor

* Small nitpick

* Make start functions more uniform

* Make sorting lists by name/title case-insensitive (navidrome#2993)

* Make sort by order_* fields case-insensitive.

* Sort internet radios by name case-insensitive

* Clean up runNavidrome function

* Remove unused code

* Simplify normalized AlbumPlayCountMode calc

* fix: languageName for Persian (navidrome#3011)

"انگلیسی" is "English"

* Update Go to 1.22.3

* Fix M3U mimetype on Debian Bullseye

* Replace sync.WaitGroup with more appropriate errgroup.Group

* Bump actions/stale and dessant/lock-threads versions

* Bump actions/github-script to v7

* Add Catppuccin Macchiato Theme (navidrome#3014)

* Added Catppuccin Macchiato theme

* fixed index.js formatting

* Do not panic if when updatePlaylist is called with a non-existent ID.

Fix navidrome#2876

* Read sampleRate from audio files

* Add sampleRate to the DB

* Add samplingRate to OpenSubsonic responses

* Fix "Add download link to PR" workflow

* Refactor merge.FS

* Refactor cache.HTTPClient

* Uses Unix milliseconds support from standard Go lib

* Refactor random functions

* Simplify random.Int64 usage with generics

* Remove duplicated test

* Revert "Add download link to PR" workflow

* Change dsf mime-type to audio/x-dsf.

Fix navidrome#3021

* Update Go to 1.22.3

* Refactor to use more Go 1.22 features

* Rename MediaFolder to Library

* Store MusicFolder as a library in DB

* Associate main entities with library

* Fix race condition

* fix bug in jukebox: property unavailable (navidrome#3024)

* fix bug in jukebox: property unavailable

* fix lint error

* Fix memory leak in CachedGenreRepository (navidrome#3031)

that the scanner was run, the ttlcache was also created each time.
This caused (under testing with 166 genres in the database) the
memory consumed by navidrome to 101.18MB over approx 3 days; 96%
of which is in instances of this cache. Swapping to a singleton
has reduced this to down to ~ 2.6MB

Co-authored-by: Rob Emery <[email protected]>

* Improve resizeImage code readability

* Simplify image format detection code

* Simplify resources.FS

* Refactor random.WeightedChooser, unsing generics

* Fix lint error

* Always run docker steps (navidrome#3034)

* Fix docker publishing for PRs

* Revert "Fix docker publishing for PRs"

This reverts commit 15c9a0d.

* Revert "Always run docker steps (navidrome#3034)"

This reverts commit 5d41165.

* Deterministic pagination in random albums sort (navidrome#1841)

* Deterministic pagination in random albums sort

* Reseed on first random page

* Add unit tests

* Use rand in Subsonic API

* Use different seeds per user on SEEDEDRAND() SQLite3 function

* Small refactor

* Fix id mismatch

* Add seeded random to media_file (subsonic endpoint `getRandomSongs`)

* Refactor

* Remove unneeded import

---------

Co-authored-by: Deluan <[email protected]>

* Add missing Test function

* Make first WebUI random page stick

* Update caniuse-lite

* Fix 32 bits builds

* Fix G404 gosec lint error

* Update Ukrainian translations (navidrome#3029)

Co-authored-by: deluan <[email protected]>

* Show number of results from a query in the logs

* Bump github.com/matoous/go-nanoid/v2 from 2.0.0 to 2.1.0 (navidrome#3038)

Bumps [github.com/matoous/go-nanoid/v2](https://github.com/matoous/go-nanoid) from 2.0.0 to 2.1.0.
- [Release notes](https://github.com/matoous/go-nanoid/releases)
- [Commits](matoous/go-nanoid@v2.0.0...v2.1.0)

---
updated-dependencies:
- dependency-name: github.com/matoous/go-nanoid/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Optimize SQLite3 access. Mainly separate read access from write access.

Based on tips from https://archive.is/Xfjh6#selection-257.0-278.0

* Replace panics with log.Fatals

* Fix XML marshaling of OpenSubsonic structured lyrics (navidrome#3041)

* Revert isDBInitialized

* Fix image stuttering (navidrome#3035)

* Fix image stuttering.

* Fix docker publishing for PRs

* Write tests for new square parameter.

* Simplify code for createImage.

---------

Co-authored-by: Deluan Quintão <[email protected]>

* Small optimization in MediaFiles.ToAlbum()

* Bump github.com/onsi/ginkgo/v2 from 2.17.3 to 2.19.0 (navidrome#3054)

Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.17.3 to 2.19.0.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](onsi/ginkgo@v2.17.3...v2.19.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Simplify dbx wrapper

* Bump github.com/spf13/viper from 1.18.2 to 1.19.0 (navidrome#3068)

Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.18.2 to 1.19.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](spf13/viper@v1.18.2...v1.19.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump prettier from 3.2.5 to 3.3.0 in /ui (navidrome#3069)

Bumps [prettier](https://github.com/prettier/prettier) from 3.2.5 to 3.3.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.2.5...3.3.0)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix tests expectations

* Refactor string utilities into its own package `str`

* Small refactoring

* Replace gg.If with cmp.Or

* Initialize Index Groups regex just once

* More micro-optimizations

* Small refactoring

* Fix race condition in external metadata retrieval

* Increase artist image url sizes.

See https://support.symfonium.app/t/artist-picture-less-compressed/4447

* Change resized image cache key

* Add R128_{TRACK,ALBUM}_GAIN support to the scanner (navidrome#3072)

* Add R128 gain tags support to the scanner

* Add R128 test to metadata_internal_test.go

* Pass explicit tag names to getGainValue function

* Don't expose `fullText` data in the Native API

* Bump prettier from 3.3.0 to 3.3.1 in /ui

Bumps [prettier](https://github.com/prettier/prettier) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.3.0...3.3.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Do not use lastFM api key and secret to determine if LastFM.Enabled should be set.

* Increase artist image url sizes.

See https://support.symfonium.app/t/artist-picture-less-compressed/4447

* Bump uuid from 9.0.1 to 10.0.0 in /ui

Bumps [uuid](https://github.com/uuidjs/uuid) from 9.0.1 to 10.0.0.
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](uuidjs/uuid@v9.0.1...v10.0.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump react-icons from 5.1.0 to 5.2.1 in /ui

Bumps [react-icons](https://github.com/react-icons/react-icons) from 5.1.0 to 5.2.1.
- [Release notes](https://github.com/react-icons/react-icons/releases)
- [Commits](react-icons/react-icons@v5.1.0...v5.2.1)

---
updated-dependencies:
- dependency-name: react-icons
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump golang.org/x/image from 0.16.0 to 0.17.0

Bumps [golang.org/x/image](https://github.com/golang/image) from 0.16.0 to 0.17.0.
- [Commits](golang/image@v0.16.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump clsx from 2.1.0 to 2.1.1 in /ui

Bumps [clsx](https://github.com/lukeed/clsx) from 2.1.0 to 2.1.1.
- [Release notes](https://github.com/lukeed/clsx/releases)
- [Commits](lukeed/clsx@v2.1.0...v2.1.1)

---
updated-dependencies:
- dependency-name: clsx
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump ejs from 3.1.9 to 3.1.10 in /ui

Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](mde/ejs@v3.1.9...v3.1.10)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump @testing-library/jest-dom from 6.4.2 to 6.4.5 in /ui

Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 6.4.2 to 6.4.5.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](testing-library/jest-dom@v6.4.2...v6.4.5)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.0 to 1.19.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](prometheus/client_golang@v1.19.0...v1.19.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix album/media file random sort (navidrome#3089)

* Add http headers to trace log

* Wrap ttlcache in our own SimpleCache implementation

* Also use SimpleCache in cache.HTTPClient

* Upgrade to ttlcache/v3

* Evict expired items from SimpleCache

* Don't panic on PostScan errors. Fix navidrome#3118

* Bump golang.org/x/image from 0.17.0 to 0.18.0 (navidrome#3119)

Bumps [golang.org/x/image](https://github.com/golang/image) from 0.17.0 to 0.18.0.
- [Commits](golang/image@v0.17.0...v0.18.0)

---
updated-dependencies:
- dependency-name: golang.org/x/image
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/lestrrat-go/jwx/v2 from 2.0.21 to 2.1.0 (navidrome#3113)

Bumps [github.com/lestrrat-go/jwx/v2](https://github.com/lestrrat-go/jwx) from 2.0.21 to 2.1.0.
- [Release notes](https://github.com/lestrrat-go/jwx/releases)
- [Changelog](https://github.com/lestrrat-go/jwx/blob/develop/v2/Changes)
- [Commits](lestrrat-go/jwx@v2.0.21...v2.1.0)

---
updated-dependencies:
- dependency-name: github.com/lestrrat-go/jwx/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/go-chi/chi/v5 from 5.0.12 to 5.0.14 (navidrome#3115)

Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.0.12 to 5.0.14.
- [Release notes](https://github.com/go-chi/chi/releases)
- [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md)
- [Commits](go-chi/chi@v5.0.12...v5.0.14)

---
updated-dependencies:
- dependency-name: github.com/go-chi/chi/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/pressly/goose/v3 from 3.20.0 to 3.21.1 (navidrome#3114)

Bumps [github.com/pressly/goose/v3](https://github.com/pressly/goose) from 3.20.0 to 3.21.1.
- [Release notes](https://github.com/pressly/goose/releases)
- [Changelog](https://github.com/pressly/goose/blob/master/CHANGELOG.md)
- [Commits](pressly/goose@v3.20.0...v3.21.1)

---
updated-dependencies:
- dependency-name: github.com/pressly/goose/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump prettier from 3.3.1 to 3.3.2 in /ui (navidrome#3097)

Bumps [prettier](https://github.com/prettier/prettier) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@3.3.1...3.3.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @testing-library/jest-dom from 6.4.5 to 6.4.6 in /ui (navidrome#3096)

Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 6.4.5 to 6.4.6.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/main/CHANGELOG.md)
- [Commits](testing-library/jest-dom@v6.4.5...v6.4.6)

---
updated-dependencies:
- dependency-name: "@testing-library/jest-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump braces from 3.0.2 to 3.0.3 in /ui (navidrome#3085)

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/spf13/cobra from 1.8.0 to 1.8.1 (navidrome#3095)

Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](spf13/cobra@v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Remove unnecessary annotation table primary key

* Add Nuclear Theme (navidrome#3098)

* fix background color for nord theme (navidrome#3124)

* Bump github.com/go-chi/chi/v5 from 5.0.14 to 5.1.0 (navidrome#3126)

Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.0.14 to 5.1.0.
- [Release notes](https://github.com/go-chi/chi/releases)
- [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md)
- [Commits](go-chi/chi@v5.0.14...v5.1.0)

---
updated-dependencies:
- dependency-name: github.com/go-chi/chi/v5
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/unrolled/secure from 1.14.0 to 1.15.0 (navidrome#3127)

Bumps [github.com/unrolled/secure](https://github.com/unrolled/secure) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/unrolled/secure/releases)
- [Commits](unrolled/secure@v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/unrolled/secure
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix album sorting in Artist page

* Remove unnecessary Fragment component.

* Add Auto-Import toggle switch to playlists list view.

* Fix race condition

* Bump github.com/go-chi/httprate from 0.9.0 to 0.10.0 (navidrome#3160)

Bumps [github.com/go-chi/httprate](https://github.com/go-chi/httprate) from 0.9.0 to 0.10.0.
- [Commits](go-chi/httprate@v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: github.com/go-chi/httprate
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add Hungarian language (navidrome#3157)

* Use SHA256 in Gravatar URLs

* Fix "Cannot read properties of undefined". Closes navidrome#3070

* Bump github.com/microcosm-cc/bluemonday from 1.0.26 to 1.0.27 (navidrome#3141)

Bumps [github.com/microcosm-cc/bluemonday](https://github.com/microcosm-cc/bluemonday) from 1.0.26 to 1.0.27.
- [Release notes](https://github.com/microcosm-cc/bluemonday/releases)
- [Commits](microcosm-cc/bluemonday@v1.0.26...v1.0.27)

---
updated-dependencies:
- dependency-name: github.com/microcosm-cc/bluemonday
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/onsi/gomega from 1.33.1 to 1.34.0 (navidrome#3176)

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.33.1 to 1.34.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](onsi/gomega@v1.33.1...v1.34.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Use userId in player, other fixes (navidrome#3182)

* [bugfix] player: use userId, other fixes

This PR primarily resolves navidrome#1928 by switching the foreign key of `player` from `user.user_name` to `user.id`.
There are also a few other fixes/changes:

- For some bizarre reason, `ip_address` is never returned from `read`/`get`. Change the field to `ip`, which works. Somehow
- Update `players_test.go` mock to also check for user agent, replicating the actual code
- Update `player_repository.go` `isPermitted` to check user id. I don't know how this worked before...
- tests!
- a few places referred to `typ`, when it is really `userAgent`. Change the field names

* baseRequest -> selectPlayer

* remove comment

* update migration, make all of persistence foreign key enabled

* maybe don't forget to save the file first

* Use same key for replaygain's preAmp (navidrome#3184)

Resolves navidrome#2933. To prevent this from happening again, make the localstorage keys consts for set/get

* Fix Player filter

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: looklose <[email protected]>
Signed-off-by: oftenoccur <[email protected]>
Signed-off-by: apkatsikas <[email protected]>
Signed-off-by: Jeremiah Menétrey <[email protected]>
Signed-off-by: Victor van der Veen <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Deluan <[email protected]>
Co-authored-by: looklose <[email protected]>
Co-authored-by: Cyrille <[email protected]>
Co-authored-by: oftenoccur <[email protected]>
Co-authored-by: Andrew Katsikas <[email protected]>
Co-authored-by: Jonathan <[email protected]>
Co-authored-by: Tim <[email protected]>
Co-authored-by: crazygolem <[email protected]>
Co-authored-by: Anna Smith <[email protected]>
Co-authored-by: vvdveen <[email protected]>
Co-authored-by: Kendall Garner <[email protected]>
Co-authored-by: Ludovic Fernandez <[email protected]>
Co-authored-by: Matthias Schmidt <[email protected]>
Co-authored-by: Valeri Sokolov <[email protected]>
Co-authored-by: edthu <[email protected]>
Co-authored-by: Fynn Petersen-Frey <[email protected]>
Co-authored-by: Rob Emery <[email protected]>
Co-authored-by: Rob Emery <[email protected]>
Co-authored-by: Guilherme Souza <[email protected]>
Co-authored-by: deluan <[email protected]>
Co-authored-by: Drew Weymouth <[email protected]>
Co-authored-by: Caio Cotts <[email protected]>
Co-authored-by: kartikynwa <[email protected]>
Co-authored-by: gruneforth <[email protected]>
Co-authored-by: Caio Cotts <[email protected]>
Co-authored-by: Soderes <[email protected]>
@NovaCyntax
Copy link

NovaCyntax commented Aug 19, 2024

image

Not sure if this is the right issue, but I'm receiving similar issues using Symfonium and attempting to sync changes back to the server. The playlists have existed for a long time and I have used Navidrome for a couple years now, primarily with Symfonium. I only just recently began having issues with API requests/responses failing. The attached image are the warnings/failures that now occur when I try to "push" a playlist from Symfonium to Navidrome, and it appears as if it's an issue on server-side.

Any recommendations or insight would be much appreciated!

Edit: I removed the playlists in question from Symfonium, re-added them, and then manually input the changes. It now works. I'm not sure what happened on Navidrome's end, I didn't change anything regarding permissions or initiate a RAID rebuild etc. So it is still possible somehow that playlists have their "ID" change within the Navidrome database, I just wish I could reproduce the issue and document why that happened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage New bug reports that need to be evaluated
Projects
None yet
Development

No branches or pull requests

6 participants