Skip to content

Bug: No music files displayed due to a few failures #61

Closed

Description

@offensivedev

Hey, I was looking forward to try out Tagr today but couldn't import my music library.

I've mounted two directories from the host /music and /audiobooks - only the music one not rendered in the list although I do see the genres being picked up in filter by genre field.

I could see tagr.db picking up the files and the count is 717 in songs table.

Image

I couldn't find more information in podman logs about what went wrong with the failed files.

Image Image

Activity

  1. offensivedev commented on Oct 23, 2026

    @offensivedev
    Author

    Update: tracks do show up in All Folders but they don't show up in their directory.

  2. suitux commented on Oct 23, 2026

    @suitux
    Owner

    Hi!

    Thanks, that narrows it down a lot. "All Folders" queries every song, while the folder view filters by the exact stored folder path — so the path Tagr saved while scanning doesn't match the /music it's asking for when you click the folder. Something's off in how that path got stored.

    Could you check:

    • In "All Folders", click any song that lives directly in /music and look at the file path shown in the detail panel on the right. What does it say exactly?
    • Or straight from the DB: select folder_path, count(*) from songs group by folder_path limit 20;
    • Your exact MUSIC_FOLDERS value (quotes, slashes, everything) and the full podman run / compose command, including the volume mounts.
    • When you click the music folder, the URL of the request in DevTools → Network that starts with /api/songs/ and its response body.

    If the stored path turns out to be anything other than /music (a symlink target, a relative path, a double slash…), that's the bug and I can reproduce it from there.

  3. Hellraiser28 commented on Oct 23, 2026

    @Hellraiser28
    Contributor

    @suitux I could reproduce it with v1.15.0 (the code is the same on main), and the stored path is fine. It's the routing.

    With MUSIC_FOLDERS=/music,/audiobooks both root folders have a single path segment. The folder view requests /api/songs/music, and Next.js sends a single segment to /api/songs/[id] rather than the catch-all /api/songs/[[...path]]. That route answers 400 Invalid song ID, so the list stays empty and shows ? files. "All Folders" works because it requests /api/songs without a segment, and deeper folders like Albums/… work because they have more than one. A subfolder named like a song sub-route, e.g. /music/audio, fails the same way.

    @offensivedev you can confirm it in the browser while logged in: http://<your-tagr>/api/songs/music returns {"success":false,"error":"Invalid song ID"}.

    I've opened a PR with a fix, it's linked above. Until it's released, this works with v1.15.0 (tested): drop MUSIC_FOLDERS and mount both folders under /music, then run a full scan.

    volumes:
      - /path/to/music:/music/music
      - /path/to/audiobooks:/music/audiobooks

    The 16 "Failed to read metadata" errors are a separate thing: Tagr couldn't parse those files at all. If you can share one of them, or the output of metaflac --list or ffprobe for it, that would help to find out why.

  4. offensivedev commented on Oct 23, 2026

    @offensivedev
    Author

    Yes, I do see /music in the path

    Image
    tagr:
        <<: *common
        image: ghcr.io/suitux/tagr:latest
        container_name: tagr
        user: "0:0"
        cap_add: *extended-capabilities
        environment:
          <<: *common-env
          PUID: 0
          PGID: 0
          NODE_ENV: "production"
          DATABASE_URL: "file:/data/tagr.db"
          AUTH_SECRET: "[REDACTED]"
          AUTH_USER: "admin"
          AUTH_PASSWORD: "[REDACTED]"
          TAGR_INSIGHTS: false
          MUSIC_FOLDERS: "/music,/audiobooks"
        volumes:
          - "${CONFIG_LOCATION:?}/tagr:/data:Z"
          - "${MEDIA_LOCATION:?}/music:/music:Z"
          - "${MEDIA_LOCATION:?}/audiobooks:/audiobooks:Z"
        ports:
          - "4500:3000"

    @Hellraiser28 I can confirm that http://<your-tagr>/api/songs/music returns {"success":false,"error":"Invalid song ID"} for me as well.

  5. Hellraiser28 commented on Oct 23, 2026

    @Hellraiser28
    Contributor

    Thanks for confirming! That matches my reproduction exactly. #62 fixes it; until it's released, the workaround above (both folders mounted under /music, no MUSIC_FOLDERS) gets you going.

  6. offensivedev commented on Oct 23, 2026

    @offensivedev
    Author

    Thank you @Hellraiser28; the workaround did the job and a full sync works now!

  7. added a commit that references this issue on Oct 23, 2026
  8. suitux commented on Oct 23, 2026

    @suitux
    Owner

    Merged, thank you @Hellraiser28

    I'll do a release now 😄

  9. suitux commented on Oct 23, 2026

    @suitux
    Owner

    There you go https://github.com/suitux/Tagr/releases/tag/v1.16.1

    Let me know if I can help with anything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions