Skip to content

fix(launcher): run the newest engine, and add tron doctor / tron repair - #96

Merged
ralyodio merged 2 commits into
mainfrom
worktree-tron-doctor
Sep 13, 2026
Merged

ralyodio merged 2 commits into
mainfrom
worktree-tron-doctor

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

What happened

"Something went wrong when opening your profile. Some features may be unavailable." showed up ten times on launch, on a machine where nothing of ours had changed: the last desktop release was v3.9.12 on Sept 1. TB_FORCE=1 tron upgrade cleared it.

That dialog is Chromium's profile-error dialog. It reports one database it could not open, once per feature that needed it, and the autofill, keyword, token, payments and account services all sit on the single Web Data file. So one broken or locked file arrives as ten dialogs. The causes all live on the machine, and none of them is fixed by reinstalling TronBrowser, because a reinstall never touches the profile:

  • A stuck instance. A windowless browser process still holding the databases. This is what the forced reinstall fixed: its first step stops every TronBrowser process.
  • The engine went backwards. TronBrowser ships no engine. The Flathub Flatpak jumped from 151 to 152 on Sept 3 and 4. The launcher ran the first Ungoogled Chromium it found, native before Flatpak, regardless of version, so a distro package appearing on PATH could downgrade the engine underneath a profile written by the newer build.
  • A stale SingletonLock, a corrupt database, a full disk, or an unwritable profile.

What changed

  • Launcher runs the newest engine. Every candidate's version is read and the highest wins; a tie keeps the native binary. It also warns when the engine is older than the Last Version that wrote the profile.
  • tron doctor reports the engine and every candidate, the profile's last writer, running instances and the lock, each database's integrity and schema version, disk space, permissions, and the database lines from the engine log. --json for scripts. Exits non-zero when something is wrong.
  • tron repair removes a stale lock and moves a database that no longer opens into a dated folder inside the profile, never deleting it. Refuses under a running browser and names the stuck-instance case.
  • TB_FORCE=1 tron upgrade is documented in tron help and the installer help.
  • Cache-prune race fixed. The once-daily background upgrade fires as the browser starts and prunes oversized caches when nothing has the profile open. It now waits 30s, and the prune re-checks for a running browser after the slow sizing pass, right before unlinking.

Tests

  • apps/desktop/test/doctor.test.ts: 11 cases against synthetic profiles (healthy, downgrade, same version with build suffix, corrupt DB, stale lock, log filtering, repair moves aside and keeps a backup, dry run, refusal under a running process, nothing to do for a downgrade).
  • apps/desktop/test/launcher.test.ts: 6 new cases for engine selection (Flatpak newer, native newer, tie, single engine) and the downgrade warning.
  • Desktop suite: 130 passed. Typecheck clean. Launcher, CLI heredoc and install.sh pass sh -n and shellcheck.

Rollout

tron-doctor ships in the tarball (staged by build-release.sh); the doctor/repair subcommands ship in the CLI, which deploys from main via install.sh. Both land with a merge plus a v3.9.13 tag, and reach users on tron upgrade.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y9BHV9dFe6Q43CPUbvFyef

ralyodio and others added 2 commits September 13, 2026 04:30
…epair`

"Something went wrong when opening your profile. Some features may be
unavailable." is Chromium's profile-error dialog: one database it could not
open, reported once per feature that needed it, so a single broken `Web Data`
file arrives as ten dialogs. No TronBrowser release causes it and no reinstall
fixes it, because the engine, the locks and the databases all live on the
user's machine.

The launcher used to run the first Ungoogled Chromium it found, native before
Flatpak, regardless of version. A profile carries the schema of whichever
build wrote it last, so a distro package appearing beside the self-updating
Flatpak could downgrade the engine underneath the profile with nothing in
TronBrowser changing. It now runs the newest candidate, and warns when the
engine is older than the `Last Version` that wrote the profile.

`tron doctor` reports the engine and every candidate, the profile's last
writer, running instances and SingletonLock, each database's integrity and
schema version, disk space, permissions, and the database lines from the
engine's log. `tron repair` removes a stale lock and moves a database that no
longer opens aside (never deletes it) so the browser rebuilds it; it refuses
under a running browser.

Also: the once-daily background upgrade now waits 30s so its cache prune can
see the browser it was launched beside, and the prune re-checks for a running
browser after the slow sizing pass, right before unlinking.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9BHV9dFe6Q43CPUbvFyef
… doctor

Document `TB_FORCE=1 tron upgrade` in the CLI help: it reinstalls the current
release and stops every TronBrowser process first, which is what cleared the
profile-error dialog on a machine where a windowless instance was holding the
databases. The doctor now names that case when it finds the profile in use.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9BHV9dFe6Q43CPUbvFyef
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

49 finding(s)

MEDIUM: 31 | LOW: 18

Severity Rule Location
MEDIUM js-open-redirect apps/desktop/extensions/ai-sidebar/install-helper.js:156
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/media.js:34
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/media.js:57
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/newtab.js:237
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/newtab.js:266
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/newtab.js:336
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/options.js:305
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/sidepanel.js:77
MEDIUM js-unescaped-html-sink apps/desktop/extensions/ai-sidebar/sidepanel.js:165
MEDIUM sh-remote-script-execution apps/desktop/launcher/tronbrowser:122
MEDIUM sh-remote-script-execution apps/desktop/launcher/tronbrowser:432
MEDIUM js-unescaped-html-sink apps/extensions/public/store.js:77
MEDIUM js-unescaped-html-sink apps/extensions/public/store.js:227
MEDIUM js-unescaped-html-sink apps/extensions/public/store.js:569
MEDIUM js-unescaped-html-sink apps/web/public/app.js:29
MEDIUM js-unescaped-html-sink apps/web/public/dns.js:54
MEDIUM sh-remote-script-execution apps/web/public/install.sh:155
MEDIUM sh-remote-script-execution apps/web/public/install.sh:160
MEDIUM sh-remote-script-execution apps/web/public/install.sh:259
MEDIUM sh-remote-script-execution apps/web/public/install.sh:277
MEDIUM sh-remote-script-execution apps/web/public/install.sh:904
MEDIUM js-unescaped-html-sink apps/web/public/settings.js:96
MEDIUM js-unescaped-html-sink apps/web/public/settings.js:168
MEDIUM js-dynamic-code-execution packages/sdk/src/mcp/tools.ts:80
MEDIUM js-dynamic-code-execution packages/sdk/src/mcp/tools.ts:92
MEDIUM js-dynamic-code-execution packages/sdk/src/mcp/tools.ts:103
MEDIUM js-dynamic-code-execution packages/sdk/src/page.ts:65
MEDIUM js-dynamic-code-execution packages/sdk/src/page.ts:70
MEDIUM sql-template-interpolation services/api/src/store/db.ts:116
MEDIUM js-dynamic-code-execution services/api/src/store/scanner.ts:44
MEDIUM sh-predictable-temp-path start.sh:25
LOW js-dynamic-code-execution packages/agent-runtime/src/analyze/form-script.test.ts:6
LOW js-unescaped-html-sink packages/agent-runtime/src/analyze/form-script.test.ts:26
LOW js-unescaped-html-sink packages/agent-runtime/src/analyze/form-script.test.ts:49
LOW js-dynamic-code-execution packages/browser-core/src/automation/extract-script.test.ts:6
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:35
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:47
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:70
LOW js-unescaped-html-sink packages/browser-core/src/automation/extract-script.test.ts:89
LOW js-dynamic-code-execution packages/browser-core/src/automation/snapshot-script.test.ts:11
LOW js-unescaped-html-sink packages/browser-core/src/automation/snapshot-script.test.ts:24
LOW js-unescaped-html-sink packages/browser-core/src/automation/snapshot-script.test.ts:63
LOW js-unescaped-html-sink packages/provenance/src/scan.test.ts:47
LOW js-unescaped-html-sink packages/provenance/src/scan.test.ts:170
LOW js-unescaped-html-sink packages/provenance/src/scan.test.ts:216
LOW secret-generic-api-key packages/storage/src/config.ts:51
LOW secret-generic-credential packages/storage/src/config.ts:51
LOW js-dynamic-code-execution services/api/src/store/scanner.test.ts:32
LOW js-hardcoded-crypto-key services/api/src/store/signing.test.ts:24

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 08da49f into main Sep 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant