agentleFS
Seeed-ProjectsSeeed-Projects/Seeed-Jetson-DevelopTool/skills/codex/fix-browser-snap-jetson/AGENTS.md

Seeed-Jetson-DevelopTool / fix-browser-snap-jetson

AGENTS.md57 starsChanged 4 months agoMITView on GitHub

Fix browsers (Chromium, Firefox, etc.) that fail to launch on Jetson devices due to an outdated or broken snapd. Downloads a pinned snapd revision offline, installs it, and holds automatic updates to prevent regression. Use when the user reports that a browser installed via snap cannot open, crashes silently, or shows snap-related errors on Jetson (Ubuntu/L4T).

  • Installs packages

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run one phase at a time. After each phase:

    line 19
  2. Very specific:

    If output contains [STOP] → stop immediately and consult the failure decision tree.

    line 21
  3. Very specific:

    If output ends with [OK] → tell the user "Phase N complete" and run the next phase.

    line 22
  4. Very specific:

    If the browser still does not open, check journalctl -xe | grep snap for confinement errors and refer to …

    line 107

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Fix Browser Not Opening on Jetson (snapd Repair)

Browsers distributed as snap packages (Chromium, Firefox) fail to launch on Jetson when the installed snapd is too old or incompatible with the snap's confinement requirements. The fix is to install a known-good snapd revision offline and hold it from auto-updating.

Root cause: Jetson ships with an older snapd that lacks support for newer snap security profiles. The browser snap starts, hits a permission or mount-namespace error, and exits silently.


Execution model

Run one phase at a time. After each phase:

  • Relay all [install] lines to the user.
  • If output contains [STOP] → stop immediately and consult the failure decision tree.
  • If output ends with [OK] → tell the user "Phase N complete" and run the next phase.

The script is idempotent and safe to rerun.


Parameters

FlagDefaultNotes
--snapd-revision24724snapd snap revision to install (change only if advised)
--phaseallpreflight / download / install / hold / verify / all
--work-dir$HOME/snapd-fixdirectory for downloaded snap and assert files

Phase commands

Phase 1 — preflight (fast, ~5 s)

Checks snapd status, current version, and whether a browser snap is present.

bash ~/.codex/skills/fix-browser-snap-jetson/scripts/fix_browser_snap.sh \
  --phase preflight

Phase 2 — download (medium, ~1–3 min depending on network)

Downloads the pinned snapd snap and its assertion file from the Snap Store.

bash ~/.codex/skills/fix-browser-snap-jetson/scripts/fix_browser_snap.sh \
  --phase download --snapd-revision 24724

Phase 3 — install (fast, ~30 s)

Acknowledges the assertion and installs the downloaded snapd snap.

bash ~/.codex/skills/fix-browser-snap-jetson/scripts/fix_browser_snap.sh \
  --phase install --snapd-revision 24724

Phase 4 — hold (fast, ~5 s)

Holds snapd at the installed revision so automatic refreshes cannot break it again.

bash ~/.codex/skills/fix-browser-snap-jetson/scripts/fix_browser_snap.sh \
  --phase hold

Phase 5 — verify (fast, ~10 s)

Confirms snapd version, hold status, and attempts to launch the browser snap in dry-run mode.

bash ~/.codex/skills/fix-browser-snap-jetson/scripts/fix_browser_snap.sh \
  --phase verify

Run all phases in one command

bash ~/.codex/skills/fix-browser-snap-jetson/scripts/fix_browser_snap.sh \
  --phase all --snapd-revision 24724

Failure decision tree

OutputAction
[STOP] snap command not foundsnapd is not installed at all. Run: sudo apt install snapd then rerun phase preflight.
[STOP] snapd service not runningRun: sudo systemctl enable --now snapd then rerun phase preflight.
[STOP] snap download failedNetwork issue or revision unavailable. Check connectivity; see references/browser_snap_troubleshooting.md section T1.
[STOP] snap ack failedAssert file corrupt or mismatched. Delete --work-dir contents and rerun phase download.
[STOP] snap install failedSee references/browser_snap_troubleshooting.md section T2 for common install errors.
[STOP] snap refresh --hold failedsnapd version may not support hold. See section T3.
[FAIL] browser still not launchingsnapd is fixed but browser snap itself may be broken. See references/browser_snap_troubleshooting.md section T4.

After verify passes — launch the browser

# Chromium
snap run chromium

# Firefox
snap run firefox

If the browser still does not open, check journalctl -xe | grep snap for confinement errors and refer to references/browser_snap_troubleshooting.md section T4.


Reference files

  • references/browser_snap_troubleshooting.md — T1–T4 recovery playbook
  • scripts/fix_browser_snap.sh — main phase-driven repair script

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.