aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoramankumarsingh77 <amankumarsingh7702@gmail.com>2026-07-26 20:51:43 +0530
committeramankumarsingh77 <amankumarsingh7702@gmail.com>2026-07-26 20:51:43 +0530
commit7d2256e584709e4b7c27ab83b61950f00def7046 (patch)
tree642775bd745cb59423e762f4df8ff6ea65520ac4 /scripts
parent083012ef3ede192505a953b7779d0c916dcaa98f (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