Issue:
When BAR is installed via Flatpak (info.beyondallreason.bar), the Spring engine runs sandboxed. Symlinks created by just link::create bar point into $DEVTOOLS_DIR/Beyond-All-Reason (typically somewhere under the user's home directory), but the Flatpak sandbox denies the engine access to follow the symlink outside its permitted filesystem.
Steps to reproduce:
- Install BAR via Flatpak.
- Clone BAR-Devtools and clone/link the BAR repo:
cd /home/you/BAR-Devtools
just repos::clone bar
just link::create bar
- Launch BAR (via Flatpak desktop entry or
flatpak run).
- Check logs — the engine prints:
Warning: [FSA::GetFileModificationTime] error 'No such file or directory' getting last modification time of file '/home/you/.var/app/info.beyondallreason.bar/data/games/Beyond-All-Reason.sdd'
Warning: [IsPathOnSpinningDisk] Error 'No such file or directory' getting stat() for file '/home/you/.var/app/info.beyondallreason.bar/data/games/Beyond-All-Reason.sdd'
Root cause:
The symlink itself is valid:
~/.var/app/info.beyondallreason.bar/data/games/Beyond-All-Reason.sdd
→ /home/you/BAR-Devtools/Beyond-All-Reason
But the Flatpak runtime's filesystem sandbox blocks the engine from reading paths outside /home/you/.var/app/info.beyondallreason.bar/ (and a handful of other permitted locations). The kernel returns ENOENT to the engine when it tries to stat() the symlink target, even though the path exists outside the sandbox.
Workaround:
Manually grant the BAR Flatpak access to the devtools directory:
flatpak override --user info.beyondallreason.bar --filesystem=/home/you/BAR-Devtools
Replace the path with wherever your DEVTOOLS_DIR lives.
Proposed fix:
detect_game_dir() in scripts/setup.sh currently checks ~/.local/state/Beyond All Reason and WSL-specific paths, but does not detect the Flatpak data directory at ~/.var/app/info.beyondallreason.bar/data. A fix could either:
- Teach
detect_game_dir() to recognize the Flatpak path (and emit a warning if flatpak override hasn't granted access to the devtools source).
- Add a
just doctor check that detects Flatpak installations and advises the user to run flatpak override if their devtools source is outside the Flatpak sandbox.
- Future: have
just link::create detect the Flatpak runtime and suggest the flatpak override command automatically, or alternatively copy/sync the repo into the Flatpak-visible games directory instead of symlinking.
Additional context:
detect_game_dir() source: scripts/setup.sh lines 1661-1695 — no Flatpak path handling.
- The intended dev workflow is
just bar::launch (native), which avoids this entirely. The issue only affects users who launch BAR via the Flatpak entrypoint while using Devtools symlinks for development.
dev.Containerfile doesn't reference Flatpak; this is purely a host-side sandbox constraint.
LLM Disclosure
Diagnosed and researched by DeepSeek v4 Flash. Reviewed prior to submission by NortySpock.
Issue:
When BAR is installed via Flatpak (
info.beyondallreason.bar), the Spring engine runs sandboxed. Symlinks created byjust link::create barpoint into$DEVTOOLS_DIR/Beyond-All-Reason(typically somewhere under the user's home directory), but the Flatpak sandbox denies the engine access to follow the symlink outside its permitted filesystem.Steps to reproduce:
flatpak run).Root cause:
The symlink itself is valid:
But the Flatpak runtime's filesystem sandbox blocks the engine from reading paths outside
/home/you/.var/app/info.beyondallreason.bar/(and a handful of other permitted locations). The kernel returnsENOENTto the engine when it tries tostat()the symlink target, even though the path exists outside the sandbox.Workaround:
Manually grant the BAR Flatpak access to the devtools directory:
Replace the path with wherever your
DEVTOOLS_DIRlives.Proposed fix:
detect_game_dir()inscripts/setup.shcurrently checks~/.local/state/Beyond All Reasonand WSL-specific paths, but does not detect the Flatpak data directory at~/.var/app/info.beyondallreason.bar/data. A fix could either:detect_game_dir()to recognize the Flatpak path (and emit a warning ifflatpak overridehasn't granted access to the devtools source).just doctorcheck that detects Flatpak installations and advises the user to runflatpak overrideif their devtools source is outside the Flatpak sandbox.just link::createdetect the Flatpak runtime and suggest theflatpak overridecommand automatically, or alternatively copy/sync the repo into the Flatpak-visible games directory instead of symlinking.Additional context:
detect_game_dir()source:scripts/setup.shlines 1661-1695 — no Flatpak path handling.just bar::launch(native), which avoids this entirely. The issue only affects users who launch BAR via the Flatpak entrypoint while using Devtools symlinks for development.dev.Containerfiledoesn't reference Flatpak; this is purely a host-side sandbox constraint.LLM Disclosure
Diagnosed and researched by DeepSeek v4 Flash. Reviewed prior to submission by NortySpock.