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

Error in log by getting cover art #177

Closed
0xERR0R opened this issue Apr 14, 2020 · 13 comments
Closed

Error in log by getting cover art #177

0xERR0R opened this issue Apr 14, 2020 · 13 comments

Comments

@0xERR0R
Copy link
Contributor

0xERR0R commented Apr 14, 2020

Tried the last version (0.14.3), I get following error in log, no covers are being displayed. Tested over the web ui

 panic: runtime error: invalid memory address or nil pointer dereference

 -> github.com/djherbis/fscache.(*handleCounter).inc
 ->   /go/pkg/mod/github.com/djherbis/fscache@v0.10.0/fscache.go:327

    github.com/djherbis/fscache.(*FSCache).newFile
      /go/pkg/mod/github.com/djherbis/fscache@v0.10.0/fscache.go:227
    github.com/djherbis/fscache.(*FSCache).Get
      /go/pkg/mod/github.com/djherbis/fscache@v0.10.0/fscache.go:154
    github.com/deluan/navidrome/engine.(*cover).Get
      /github/workspace/engine/cover.go:50
    github.com/deluan/navidrome/server/subsonic.(*MediaRetrievalController).GetCoverArt
      /github/workspace/server/subsonic/media_retrieval.go:43
    github.com/deluan/navidrome/server/subsonic.H.func1
      /github/workspace/server/subsonic/api.go:138
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/go-chi/chi.(*ChainHandler).ServeHTTP
      /go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/chain.go:31
    github.com/go-chi/chi.(*Mux).routeHTTP
      /go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:431
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/deluan/navidrome/server/subsonic.authenticate.func1.1
      /github/workspace/server/subsonic/middlewares.go:93
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/deluan/navidrome/server/subsonic.checkRequiredParameters.func1
      /github/workspace/server/subsonic/middlewares.go:63
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/deluan/navidrome/server/subsonic.postFormToQueryParams.func1
      /github/workspace/server/subsonic/middlewares.go:36
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/go-chi/chi.(*Mux).ServeHTTP
      /go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:70
    github.com/deluan/navidrome/server/subsonic.(*Router).ServeHTTP
      /github/workspace/server/subsonic/api.go:48
    github.com/go-chi/chi.(*Mux).Mount.func1
      /go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:298
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/deluan/navidrome/server.RequestLogger.func1
      /github/workspace/server/middlewares.go:21
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/go-chi/chi.(*ChainHandler).ServeHTTP
      /go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/chain.go:31
    github.com/go-chi/chi.(*Mux).routeHTTP
      /go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:431
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/deluan/navidrome/server.InjectLogger.func1
      /github/workspace/server/server.go:104
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/go-chi/chi/middleware.Heartbeat.func1.1
      /go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/middleware/heartbeat.go:21
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/go-chi/chi/middleware.(*Compressor).Handler.func1
      /go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/middleware/compress.go:213
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/go-chi/chi/middleware.Recoverer.func1
      /go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/middleware/recoverer.go:37
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/go-chi/chi/middleware.RealIP.func1
      /go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/middleware/realip.go:34
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/go-chi/chi/middleware.RequestID.func1
      /go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/middleware/request_id.go:76
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/go-chi/cors.(*Cors).Handler.func1
      /go/pkg/mod/github.com/go-chi/cors@v1.0.1/cors.go:201
    net/http.HandlerFunc.ServeHTTP
      /usr/local/go/src/net/http/server.go:2012
    github.com/go-chi/chi.(*Mux).ServeHTTP
      /go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:86
    net/http.serverHandler.ServeHTTP
      /usr/local/go/src/net/http/server.go:2807
    net/http.(*conn).serve
      /usr/local/go/src/net/http/server.go:1895
    created by net/http.(*Server).Serve
      /usr/local/go/src/net/http/server.go:2933
@deluan
Copy link
Member

deluan commented Apr 14, 2020

What version you were using before? Can you stop Navidrome, remove data/cache/images and try again?

@0xERR0R
Copy link
Contributor Author

0xERR0R commented Apr 14, 2020

This was the first try, no installation before. Cache cleaned -> same result. Also in jamstash. I have only flac files, may be this is the problem?

@deluan
Copy link
Member

deluan commented Apr 14, 2020

Not related to FLAC... Maybe a permission problem. Does Navidrome create the data/cache/images folder when you start it?

@0xERR0R
Copy link
Contributor Author

0xERR0R commented Apr 14, 2020

user pi, owner is pi, there is some content inside

ls -la cache/images

pi@pi3:~$ ls -la cache/images/
total 92
drwxr-xr-x 2 pi pi 4096 Apr 14 13:17 .
drwxr-xr-x 4 pi pi 4096 Apr 14 12:47 ..
-rw------- 1 pi pi    0 Apr 14 13:17 l074Bx0GUb2032fc10fdb79349e50d3cbaa8413d9
-rw------- 1 pi pi  108 Apr 14 13:17 l074Bx0GUb2032fc10fdb79349e50d3cbaa8413d9.key
-rw------- 1 pi pi    0 Apr 14 13:17 l1oyUnRpH2a5de9c3c9aada25a6723aba04eaa12d
-rw------- 1 pi pi   97 Apr 14 13:17 l1oyUnRpH2a5de9c3c9aada25a6723aba04eaa12d.key
-rw------- 1 pi pi    0 Apr 14 12:47 l3AmXKXfQd77af48b0fedc081d816da1a917e6817
-rw------- 1 pi pi  109 Apr 14 12:47 l3AmXKXfQd77af48b0fedc081d816da1a917e6817.key
-rw------- 1 pi pi    0 Apr 14 13:14 l6pfm7iJJc714726d5425ad95fcf64398b4ded667
-rw------- 1 pi pi  113 Apr 14 13:14 l6pfm7iJJc714726d5425ad95fcf64398b4ded667.key
-rw------- 1 pi pi    0 Apr 14 13:16 l802kBeMU4efa585fd90c295c0e7e57116858cc8e
-rw------- 1 pi pi  115 Apr 14 13:16 l802kBeMU4efa585fd90c295c0e7e57116858cc8e.key
-rw------- 1 pi pi    0 Apr 14 12:47 l8MTFTpkCe162204affe17b1233a00ca00561d86e
-rw------- 1 pi pi  105 Apr 14 12:47 l8MTFTpkCe162204affe17b1233a00ca00561d86e.key

@deluan
Copy link
Member

deluan commented Apr 14, 2020

The zeroed files are the cached images. Something is preventing it to finish storing the data in the file... If you delete the whole folder it is recreated, right?

@0xERR0R
Copy link
Contributor Author

0xERR0R commented Apr 14, 2020

directory removed, navidrome restarted -> same error, files were recreated

pi@pi3:~$ rm -rf cache/images/
pi@pi3:~$ ls -la cache/images/
total 8
drwxr-xr-x 2 pi pi 4096 Apr 14 15:05 .
drwxr-xr-x 4 pi pi 4096 Apr 14 15:05 ..

pi@pi3:~$ ls -la cache/images/
total 48
drwxr-xr-x 2 pi pi 4096 Apr 14 15:07 .
drwxr-xr-x 4 pi pi 4096 Apr 14 15:05 ..
-rw------- 1 pi pi    0 Apr 14 15:07 l0U9pgXT-c714726d5425ad95fcf64398b4ded667
-rw------- 1 pi pi  113 Apr 14 15:07 l0U9pgXT-c714726d5425ad95fcf64398b4ded667.key
-rw------- 1 pi pi    0 Apr 14 15:07 l41CNjvNV17cc3d64638ae1571b5d0d80a0ffa340
-rw------- 1 pi pi  128 Apr 14 15:07 l41CNjvNV17cc3d64638ae1571b5d0d80a0ffa340.key
-rw------- 1 pi pi    0 Apr 14 15:07 l64h6akKRe162204affe17b1233a00ca00561d86e
-rw------- 1 pi pi  105 Apr 14 15:07 l64h6akKRe162204affe17b1233a00ca00561d86e.key
-rw------- 1 pi pi    0 Apr 14 15:07 lILMXZP0J34647401eb0a85ba33f56e650bcdda74
-rw------- 1 pi pi  100 Apr 14 15:07 lILMXZP0J34647401eb0a85ba33f56e650bcdda74.key
-rw------- 1 pi pi    0 Apr 14 15:07 lNWT6v6Hxd77af48b0fedc081d816da1a917e6817
-rw------- 1 pi pi  109 Apr 14 15:07 lNWT6v6Hxd77af48b0fedc081d816da1a917e6817.key
-rw------- 1 pi pi    0 Apr 14 15:07 loM2ZECl1bbba081764f27d7c75535de2fb30a206
-rw------- 1 pi pi  106 Apr 14 15:07 loM2ZECl1bbba081764f27d7c75535de2fb30a206.key
-rw------- 1 pi pi    0 Apr 14 15:06 lUPAvC2Rbbbf663751a116242b7bb58acf13b5907
-rw------- 1 pi pi   95 Apr 14 15:06 lUPAvC2Rbbbf663751a116242b7bb58acf13b5907.key
-rw------- 1 pi pi    0 Apr 14 15:07 luZhIpd9T87f4d9492582a82d9fc32d6d43fe0873
-rw------- 1 pi pi   98 Apr 14 15:07 luZhIpd9T87f4d9492582a82d9fc32d6d43fe0873.key
-rw------- 1 pi pi    0 Apr 14 15:07 lY5iWjBFR423b850fff5f2f8e53a50ec35dba9d0f
-rw------- 1 pi pi  115 Apr 14 15:07 lY5iWjBFR423b850fff5f2f8e53a50ec35dba9d0f.key
-rw------- 1 pi pi    0 Apr 14 15:07 lY9wJ_x0we565b0b93273951bc990b49d3c4ee63b
-rw------- 1 pi pi  127 Apr 14 15:07 lY9wJ_x0we565b0b93273951bc990b49d3c4ee63b.key

@deluan
Copy link
Member

deluan commented Apr 14, 2020

Not sure why this is happening. I opened an issue in the cache library I'm using and hopefully we will hear back from the dev (he is usually very responsive)

I may add a flag to disable image caching. I'll take a look at this tonight.

@deluan
Copy link
Member

deluan commented Apr 14, 2020

While we wait for @djherbis, have you tried with the other ARM images? Maybe this is an issue specifically with the ARMv7 image.

@0xERR0R
Copy link
Contributor Author

0xERR0R commented Apr 14, 2020

Just tried arm/v6 binary -> same error.

@deluan
Copy link
Member

deluan commented Apr 14, 2020

While we don't have a fix for this, I just released a bug fix version 0.14.4 that allows you to disable image caching. See https://www.navidrome.org/docs/usage/troubleshooting/#album-cover-art-is-not-showing-up

@deluan
Copy link
Member

deluan commented Apr 15, 2020

Hey @0xERR0R, @djherbis released a new version that seems to fix the alignment error. I just generated the binaries for ARM v6 and v7, and attached bellow.

navidrome_v0.14.4-next_Linux_armv6.tar.gz
navidrome_v0.14.4-next_Linux_armv7.tar.gz

Let me know if it works and then I'll release a new version with the fix.

@0xERR0R
Copy link
Contributor Author

0xERR0R commented Apr 15, 2020

Hey @deluan. @djherbis I just tried the new version - works like a charm, great work, thank you!

@deluan deluan closed this as completed in 5ed1d5c Apr 15, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants