diff options
| author | amankumarsingh77 <amankumarsingh7702@gmail.com> | 2026-07-26 20:51:43 +0530 |
|---|---|---|
| committer | amankumarsingh77 <amankumarsingh7702@gmail.com> | 2026-07-26 20:51:43 +0530 |
| commit | 7d2256e584709e4b7c27ab83b61950f00def7046 (patch) | |
| tree | 642775bd745cb59423e762f4df8ff6ea65520ac4 /scripts | |
| parent | 083012ef3ede192505a953b7779d0c916dcaa98f (diff) | |
fix(profile): resolve replaced binaries and surface real launch failures
Two failures made a profile launch report the wrong cause.
Linux appends " (deleted)" to /proc/<pid>/exe once the running binary is
unlinked, which is what a google-chrome package upgrade does while the
browser stays open. detectRunningBrowser passed that literal string on as
the executable path, so every launch tried to spawn
"/opt/google/chrome/chrome (deleted)" and hit ENOENT. Executable paths are
now validated against disk, with the marker stripped and argv[0] used as a
fallback; a binary genuinely named "… (deleted)" still wins.
spawn() reports a missing or non-executable binary asynchronously via an
'error' event rather than throwing, and that event was discarded — so
openProfileWindow returned success, no window opened, and the caller
blamed the browser 15s later with a sentinel timeout. The launch now
awaits 'spawn'/'error', returns the real cause, and removes its handshake
page on the failure path.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
