[GH-ISSUE #5253] [Issue]: Isolate Playwright file storage from inherited environment #2907

Closed
opened 2026-10-21 05:57:52 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Xelvanis on GitHub (Aug 19, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5253

Originally assigned to: @SpicyMarinara on GitHub.

Summary

e2e/start-servers.mjs gives the mobile and desktop Playwright servers separate DATA_DIR values, but it does not override FILE_STORAGE_DIR. When the parent process defines FILE_STORAGE_DIR, both server children inherit it, resolve to the same storage directory, and compete for one writer lease.

Expected behavior

Each Playwright project should use storage beneath its own temporary data directory regardless of unrelated environment variables inherited from the launching shell.

Actual behavior

One server acquires the shared storage writer lease. The other fails during bootstrap with StorageWriterLeaseError, and Playwright eventually reports that config.webServer timed out.

Steps to reproduce

  1. Use a current staging source checkout with dependencies installed.
  2. Set FILE_STORAGE_DIR=./data/storage in the parent process.
  3. Run a Playwright UI regression that starts the mobile and desktop web servers.
  4. Observe that both server processes resolve file storage to packages/server/data/storage; one cannot acquire the writer lease.

Environment

  • Marinara Engine version: current staging (2.4.4 during reproduction)
  • Install type: source
  • OS + version: Windows 11
  • Browser or app shell: Playwright desktop Chromium

Logs, screenshots, or video

The failing server reported different project data and shared file storage:

[storage] DATA_DIR=...\.tmp\playwright-data\mobile
[storage] FILE_STORAGE_DIR=...\packages\server\data\storage
StorageWriterLeaseError: Another Marinara Engine process may be using this storage directory

Playwright then timed out waiting for config.webServer.

Additional context

Server configuration intentionally gives FILE_STORAGE_DIR precedence over DATA_DIR, so the Playwright launcher must set both project-specific values. The recommended fix is one environment entry in e2e/start-servers.mjs inside startProject, beside DATA_DIR:

FILE_STORAGE_DIR: resolve(dataDir, "storage"),

With that entry present, a run launched under the same inherited FILE_STORAGE_DIR=./data/storage environment passed and created separate .tmp/playwright-data/mobile/storage and .tmp/playwright-data/desktop/storage directories.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Aug 19, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5253 Originally assigned to: @SpicyMarinara on GitHub. <!-- task-id: playwright-storage-isolation --> ## Summary `e2e/start-servers.mjs` gives the mobile and desktop Playwright servers separate `DATA_DIR` values, but it does not override `FILE_STORAGE_DIR`. When the parent process defines `FILE_STORAGE_DIR`, both server children inherit it, resolve to the same storage directory, and compete for one writer lease. ## Expected behavior Each Playwright project should use storage beneath its own temporary data directory regardless of unrelated environment variables inherited from the launching shell. ## Actual behavior One server acquires the shared storage writer lease. The other fails during bootstrap with `StorageWriterLeaseError`, and Playwright eventually reports that `config.webServer` timed out. ## Steps to reproduce 1. Use a current `staging` source checkout with dependencies installed. 2. Set `FILE_STORAGE_DIR=./data/storage` in the parent process. 3. Run a Playwright UI regression that starts the mobile and desktop web servers. 4. Observe that both server processes resolve file storage to `packages/server/data/storage`; one cannot acquire the writer lease. ## Environment - Marinara Engine version: current `staging` (`2.4.4` during reproduction) - Install type: source - OS + version: Windows 11 - Browser or app shell: Playwright desktop Chromium ## Logs, screenshots, or video The failing server reported different project data and shared file storage: ```text [storage] DATA_DIR=...\.tmp\playwright-data\mobile [storage] FILE_STORAGE_DIR=...\packages\server\data\storage StorageWriterLeaseError: Another Marinara Engine process may be using this storage directory ``` Playwright then timed out waiting for `config.webServer`. ## Additional context Server configuration intentionally gives `FILE_STORAGE_DIR` precedence over `DATA_DIR`, so the Playwright launcher must set both project-specific values. The recommended fix is one environment entry in `e2e/start-servers.mjs` inside `startProject`, beside `DATA_DIR`: ```js FILE_STORAGE_DIR: resolve(dataDir, "storage"), ``` With that entry present, a run launched under the same inherited `FILE_STORAGE_DIR=./data/storage` environment passed and created separate `.tmp/playwright-data/mobile/storage` and `.tmp/playwright-data/desktop/storage` directories. ## Template check - [ ] I DID NOT read this template and provide the requested details.
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
Pasta-Devs/Marinara-Engine#2907
No description provided.