Skip to content

[DO NOT MERGE] Debug restricted session failures on Windows CI - #263

Closed
juliandescottes wants to merge 2 commits into
mozilla:mainfrom
juliandescottes:windows-restricted-session-debug
Closed

juliandescottes wants to merge 2 commits into
mozilla:mainfrom
juliandescottes:windows-restricted-session-debug

Conversation

@juliandescottes

@juliandescottes juliandescottes commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Diagnostic PR, not meant to land.

The restricted session tests often fail on the Windows CI jobs (for example container-isolation.test.ts, restricted-session.test.ts, restricted-session-restart.test.ts). In the failing runs, FirefoxClient.connect() takes 6 to 19 seconds instead of under 1.3 seconds, the session is not detected as restricted, and the event subscriptions fail.

detectRestrictedUserContext only logs unexpected errors with logDebug, so the CI logs do not show the first failure. This PR:

  • rethrows unexpected errors from browser.getUserContexts,
  • enables DEBUG=firefox-mcp on the Windows jobs.

Fail the connection when browser.getUserContexts fails with an
unexpected error, instead of treating the session as not restricted.
Enable debug logs on the Windows CI jobs.
@juliandescottes juliandescottes added the run-integration Trigger integration tests for a PR label Dec 2, 2026
…ion tests

Log how long getBidi, the WebSocket opening and browser.getUserContexts
take. Show the stderr of the MCP server in tests when DEBUG is set. Run
the MCP restricted session tests 20 times on the Windows CI jobs.
@juliandescottes

Copy link
Copy Markdown
Collaborator Author

Investigation done. The slow step was opening the BiDi WebSocket after a Firefox launch on Windows. Fixed in #265.

@juliandescottes
juliandescottes deleted the windows-restricted-session-debug branch December 3, 2026 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-integration Trigger integration tests for a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant