Skip to content

fix: graceful fallback when extension lacks network-capture support#865

Merged
jackwener merged 1 commit intomainfrom
fix/graceful-network-capture-fallback
Apr 7, 2026
Merged

fix: graceful fallback when extension lacks network-capture support#865
jackwener merged 1 commit intomainfrom
fix/graceful-network-capture-fallback

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Summary

  • Wrap startNetworkCapture() calls with .catch() in explore.ts and cli.ts (operate open)
  • When the Browser Bridge extension doesn't support network-capture-start (older version), the CLI now degrades gracefully instead of crashing
  • operate open falls back to the JS interceptor injection when session capture fails

Problem

Users with an older Browser Bridge extension get a fatal crash when running opencli explore:

Error: Unknown action: network-capture-start

The daemon returns this when the extension predates the network-capture feature. The CLI should handle this gracefully since network capture is an enhancement, not a requirement.

Test plan

  • opencli explore <url> works with an older extension (graceful degradation)
  • opencli explore <url> still captures network data with a current extension
  • opencli operate open <url> falls back to JS interceptor when session capture fails

When the Browser Bridge extension is older than the CLI, sending
'network-capture-start' to the daemon returns 'Unknown action',
causing explore and operate-open to crash with an unhandled error.

Wrap startNetworkCapture calls with .catch() so they degrade
gracefully — explore continues without network capture data, and
operate-open falls back to the JS interceptor injection.
@jackwener jackwener merged commit 57d59d5 into main Apr 7, 2026
11 checks passed
@jackwener jackwener mentioned this pull request Apr 8, 2026
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