[BUG] `browser.cache.disk.parent_directory` of `firefoxUserPrefs` doesn't work.
System info
- Playwright Version: [>=v1.34]
- Operating System: [Ubuntu 22.04]
- Browser: [Firefox]
- Node Version: [v16.17.0]
- Other info: Playwright version < v1.34 works well.
Source code
import {firefox} from 'playwright-firefox';
let firefoxUserPrefs = {
'browser.cache.disk.parent_directory': '/home/harley/Documents/GitHub/playwright_test/disk_cache',
};
const browser = await firefox.launch({
headless: false,
firefoxUserPrefs: firefoxUserPrefs
});
console.log("==== playwright.launch done ====");
const context = await browser.newContext();
await context.newPage();
Steps
- After Firefox launches, visit the
about:configandabout:cachepages.
Expected
- In the
about:configpage, thebrowser.cache.disk.parent_directoryshould be set as/home/harley/Documents/GitHub/playwright_test/disk_cache. - In the
about:cachepage, theStorage disk locationof thediskpart should be set as/home/harley/Documents/GitHub/playwright_test/disk_cache.
Actual
-
In the
about:configpage, thebrowser.cache.disk.parent_directoryis set as/home/harley/Documents/GitHub/playwright_test/disk_cache. -
In the
about:cachepage, theStorage disk locationof thediskpart is not set as/home/harley/Documents/GitHub/playwright_test/disk_cache.
I have read the source code of branch release-1.33 and release-1.34 and I'm wondering if it's caused by this PR: https://github.com/microsoft/playwright/pull/22998.
I think this PR may set the config of Firefox after Firefox launches, but the cache setting should be set before Firefox launches or Firefox needs to be re-launched.
+1 encountering same issue atm.