Last Good Version
1.58.2
First Bad Version
latest
Steps to reproduce
- Install the latest Playwright in Termux.
- Set "PLAYWRIGHT_BROWSERS_PATH=0".
- Run any Playwright command (e.g. "npx playwright install").
- Observe "Unsupported platform: android".
"defaultCacheDirectory" is evaluated before "PLAYWRIGHT_BROWSERS_PATH=0" is respected.
Expected behavior
When PLAYWRIGHT_BROWSERS_PATH=0 is set, Playwright should not evaluate defaultCacheDirectory.
Instead, it should respect the explicit browser path as it did in previous releases, allowing Playwright to run on Termux without triggering the Android unsupported-platform check.
This was the previous behavior and allowed Termux users to provide their own browser installation.
Actual behavior
Playwright evaluates defaultCacheDirectory before checking the PLAYWRIGHT_BROWSERS_PATH override.
On Android/Termux this causes the platform check to execute first, resulting in:
Unsupported platform: android
This happens even when PLAYWRIGHT_BROWSERS_PATH=0 is set and an explicit browser path is provided.
As a result, the override no longer avoids the unsupported-platform check, unlike previous versions.
Additional context
This appears to be a regression.
Previously, PLAYWRIGHT_BROWSERS_PATH=0 prevented evaluation of defaultCacheDirectory, allowing Termux users to provide an explicit browser path.
I previously opened a PR #41683 proposing to defer evaluation of defaultCacheDirectory until it is actually needed. The PR was closed because the motivation was unclear.
The motivation is to restore the previous behavior where an explicit PLAYWRIGHT_BROWSERS_PATH override is respected before any default cache directory or platform-specific logic is evaluated.
If this behavior is intentional, could you clarify why PLAYWRIGHT_BROWSERS_PATH is no longer honored before evaluating defaultCacheDirectory?
Environment
System:
OS: android
CPU: Unknown
Memory: 2.25 GB / 7.44 GB
Binaries:
Node: 26.3.1 - /data/data/com.termux/files/usr/bin/node
npm: 11.17.0 - /data/data/com.termux/files/usr/bin/npm
pnpm: 11.9.0 - /data/data/com.termux/files/usr/bin/pnpm
Deno: 2.9.1 - /data/data/com.termux/files/usr/bin/deno
Languages:
Bash: 5.3.9 - /data/data/com.termux/files/usr/bin/bash
Last Good Version
1.58.2
First Bad Version
latest
Steps to reproduce
"defaultCacheDirectory" is evaluated before "PLAYWRIGHT_BROWSERS_PATH=0" is respected.
Expected behavior
When PLAYWRIGHT_BROWSERS_PATH=0 is set, Playwright should not evaluate defaultCacheDirectory.
Instead, it should respect the explicit browser path as it did in previous releases, allowing Playwright to run on Termux without triggering the Android unsupported-platform check.
This was the previous behavior and allowed Termux users to provide their own browser installation.
Actual behavior
Playwright evaluates defaultCacheDirectory before checking the PLAYWRIGHT_BROWSERS_PATH override.
On Android/Termux this causes the platform check to execute first, resulting in:
Unsupported platform: android
This happens even when PLAYWRIGHT_BROWSERS_PATH=0 is set and an explicit browser path is provided.
As a result, the override no longer avoids the unsupported-platform check, unlike previous versions.
Additional context
This appears to be a regression.
Previously, PLAYWRIGHT_BROWSERS_PATH=0 prevented evaluation of defaultCacheDirectory, allowing Termux users to provide an explicit browser path.
I previously opened a PR #41683 proposing to defer evaluation of defaultCacheDirectory until it is actually needed. The PR was closed because the motivation was unclear.
The motivation is to restore the previous behavior where an explicit PLAYWRIGHT_BROWSERS_PATH override is respected before any default cache directory or platform-specific logic is evaluated.
If this behavior is intentional, could you clarify why PLAYWRIGHT_BROWSERS_PATH is no longer honored before evaluating defaultCacheDirectory?
Environment
System: OS: android CPU: Unknown Memory: 2.25 GB / 7.44 GB Binaries: Node: 26.3.1 - /data/data/com.termux/files/usr/bin/node npm: 11.17.0 - /data/data/com.termux/files/usr/bin/npm pnpm: 11.9.0 - /data/data/com.termux/files/usr/bin/pnpm Deno: 2.9.1 - /data/data/com.termux/files/usr/bin/deno Languages: Bash: 5.3.9 - /data/data/com.termux/files/usr/bin/bash