[GH-ISSUE #3752] [Bug] Windows attached browser scenarios retain locale overrides after cleanup #1460

Closed
opened 2026-10-16 21:05:38 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @N0zoM1z0 on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/3752

Problem

Sequential attached-browser scenarios can leave Chromium environment overrides on the caller-owned target after REA reports cleanup. A later scenario then fails before navigation with a generic public execution_failure.

The full Windows Edge workflow first exposed this while entering its service-worker block scenario, after the environment and storage scenarios had completed. The service-worker policy was not the failing component.

Real Windows reproduction

Pinned main 3d2846f2371bc3e73b7069f713f6daa80f4db78c, Node 24.18.0, Microsoft Edge 154.0.4258.48, ordinary non-admin Windows user:

ProviderAdapterError: Provider rea-playwright-browser-scenario adapter failed during capture_browser_scenario
cause: cdpSession.send: Protocol error (Emulation.setLocaleOverride): Another locale override is already in effect

The complete reproduction ended naturally in 184.72 seconds with no supervisor stop, a 1,216,970,752-byte peak Job commit, zero remaining owned processes, and the external Edge target still alive. Repeating only the next request does not repair the retained target state.

Root cause

The attached scenario configured device metrics, locale, timezone, and media state through CDP/Playwright, then relied on browser transport disconnect to release them. Chromium's locale override remains target-scoped after that disconnect. The next connection therefore conflicts with state still owned by the preceding scenario.

Expected

Cleanup must explicitly restore every target mutation it owns before releasing the attached transport. Failed restoration must remain retryable. If applying an override fails because the caller already owns that state, REA must not clear the caller's override.

Fix validation

The candidate uses an explicit attached-environment owner and bounded constant-size cleanup. A real full environment/storage/service-worker workflow passed. On the exact latest-main branch head, two independent Windows lanes each ran six sequential public CLI scenarios with alternating locale/timezone against one external Edge target; all 12 completed, preserved the target, and ended Job0. Focused tests, typecheck/lint, and a fresh build also pass.

Local evidence is retained under /tmp/rea-windows-e2e-20261013/results/issue3752-fix/; this path records provenance and is not a downloadable artifact.

Originally created by @N0zoM1z0 on GitHub (Oct 14, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/3752 ## Problem Sequential attached-browser scenarios can leave Chromium environment overrides on the caller-owned target after REA reports cleanup. A later scenario then fails before navigation with a generic public `execution_failure`. The full Windows Edge workflow first exposed this while entering its service-worker block scenario, after the environment and storage scenarios had completed. The service-worker policy was not the failing component. ## Real Windows reproduction Pinned main `3d2846f2371bc3e73b7069f713f6daa80f4db78c`, Node 24.18.0, Microsoft Edge 154.0.4258.48, ordinary non-admin Windows user: ```text ProviderAdapterError: Provider rea-playwright-browser-scenario adapter failed during capture_browser_scenario cause: cdpSession.send: Protocol error (Emulation.setLocaleOverride): Another locale override is already in effect ``` The complete reproduction ended naturally in 184.72 seconds with no supervisor stop, a 1,216,970,752-byte peak Job commit, zero remaining owned processes, and the external Edge target still alive. Repeating only the next request does not repair the retained target state. ## Root cause The attached scenario configured device metrics, locale, timezone, and media state through CDP/Playwright, then relied on browser transport disconnect to release them. Chromium's locale override remains target-scoped after that disconnect. The next connection therefore conflicts with state still owned by the preceding scenario. ## Expected Cleanup must explicitly restore every target mutation it owns before releasing the attached transport. Failed restoration must remain retryable. If applying an override fails because the caller already owns that state, REA must not clear the caller's override. ## Fix validation The candidate uses an explicit attached-environment owner and bounded constant-size cleanup. A real full environment/storage/service-worker workflow passed. On the exact latest-main branch head, two independent Windows lanes each ran six sequential public CLI scenarios with alternating locale/timezone against one external Edge target; all 12 completed, preserved the target, and ended Job0. Focused tests, typecheck/lint, and a fresh build also pass. Local evidence is retained under `/tmp/rea-windows-e2e-20261013/results/issue3752-fix/`; this path records provenance and is not a downloadable artifact.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#1460
No description provided.