#948·glance

Docker secrets parsing regex issue

Author: justHuman110Created Feb 6, 2026Updated Sep 6, 2026
Labelsbug report

Description

Relevant details:

  • Installation: Docker container (docker compose)
  • Glance version: 0.8.4

Issue description: I was trying to set up the Media server history community widget using a .env file (no secrets). I made sure there were no references to Docker Secrets in the variables, but I kept seeing this error when running the container: Config has errors: parsing variable: reading secret file: open /run/secrets/jellyfin-token: no such file or directory.

I finally fixed this when I noticed that the comment on one of the lines contained the string ${secret:plex-token}. Removing this string from the comment portion of the line resulted in the parsing working successfully. This points to an issue in the regex for parsing ${<prefix>:<token_var>} where the parsing is checking the whole line (including comments on the line!) for these specific patterns, leading to this wild goose chase.

This should be changed such that the regex does not try to match anything beyond the } on the line, or something similar to ensure comments and other characters in the line don't get pulled into the regex parsing.

Reproduction steps: Just copy and paste the sample config under the "Options" section provided in the community widget linked above, and it will fail to parse the config with this error.

For example, a line like this in any widget config will cause the same parsing error:

api-key: ${JELLYFIN_KEY} # Use secrets with `${secret:jellyfin-token}`