Skip to content

fix(autoresearch): swallow browser launcher errors in /autoresearch export#63

Open
unexge wants to merge 1 commit into
davebcn87:mainfrom
unexge:main
Open

fix(autoresearch): swallow browser launcher errors in /autoresearch export#63
unexge wants to merge 1 commit into
davebcn87:mainfrom
unexge:main

Conversation

@unexge
Copy link
Copy Markdown

@unexge unexge commented May 11, 2026

I use pi-autoresearch on my Linux box - which doesn't have GUI & xdg-open - and /autoresearch export crashes with:

Error: spawn xdg-open ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:507:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:507:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn xdg-open',
  path: 'xdg-open',
  spawnargs: [ 'http://127.0.0.1:33535/' ]
}

This change updates openInBrowser to swallow that exception and since as a next step the URL is printed, I can just port forward that to my local machine and access the UI.

…xport

Attach a silent 'error' listener to the xdg-open/open/start child
process so a missing or failing launcher (common on headless, SSH,
container, or WSL hosts) no longer crashes the export. The dashboard
URL is already printed via notify, so the user can open it manually.
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