Can't find profile directory
See original GitHub issueContext:
- GOOD Playwright Version: same version (1.6.2)
- BAD Playwright Version: same version
- Operating System: Windows
- Extra:
Code Snippet
process.env.PLAYWRIGHT_BROWSERS_PATH = "0";
process.env.DEBUG = "pw:browser*";
const { firefox } = require("playwright-firefox");
let page, browser;
export async function startAgent() {
try {
browser = await firefox.launch({
headless: false,
proxy: { server: "per-context" },
});
isStarted = true;
} catch (e) {
console.log(e);
}
}
export async function work(proxy = false) {
try {
if (!isStarted) {
await startAgent();
}
let context;
context = await browser.newContext();
page = await context.newPage();
}
}
Describe the bug
This is the logs from DEBUG=pw:browser*
[30;1mpw:browser [0m<launching> D:\node_projects\pwtest\node_modules\playwright-firefox\.local-browsers\firefox-1205\firefox\firefox.exe -no-remote -wait-for-browser -foreground -profile C:\Users\mypc\AppData\Local\Temp\playwright_firefoxdev_profile-vrPsOp -juggler-pipe -silent [30m+0ms[0m
[30;1mpw:browser [0m<launched> pid=23116 [30m+7ms[0m
[30;1mpw:browser [0m[out] [30m+1s[0m
[30;1mpw:browser [0m[out] Juggler listening to the pipe [30m+1ms[0m
[30;1mpw:browser [0m[err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. [30m+662ms[0m
[30;1mpw:browser [0m<gracefully close start> [30m+28s[0m
[30;1mpw:browser [0m<kill> [30m+4ms[0m
[30;1mpw:browser [0m<process did exit: exitCode=1, signal=null> [30m+288ms[0m
[30;1mpw:browser [0m<gracefully close end> [30m+6ms[0m
[30;1mpw:browser [0m<launching> D:\node_projects\pwtest\node_modules\playwright-firefox\.local-browsers\firefox-1205\firefox\firefox.exe -no-remote -wait-for-browser -foreground -profile C:\Users\mypc\AppData\Local\Temp\playwright_firefoxdev_profile-92fLz0 -juggler-pipe -silent [30m+717ms[0m
[30;1mpw:browser [0m<launched> pid=7208 [30m+5ms[0m
[30;1mpw:browser [0m[out] [30m+1s[0m
[30;1mpw:browser [0m[out] Juggler listening to the pipe [30m+1ms[0m
[30;1mpw:browser [0m[err] JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory. [30m+680ms[0m
[30;1mpw:browser [0m<gracefully close start> [30m+27s[0m
[30;1mpw:browser [0m<kill> [30m+3ms[0m
[30;1mpw:browser [0m<process did exit: exitCode=1, signal=null> [30m+249ms[0m
[30;1mpw:browser [0m<gracefully close end> [30m+4ms[0m
It used to work for me for some time. Had this exact error before. Solved it by reinstalling playwright-firefox
setting ```
process.env.PLAYWRIGHT_BROWSERS_PATH = “0”;
it worked for sometime. But its happening again.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Firefox can't find profile folder and I tried all fixes found so far.
Go to the folder that holds your Firefox profile(s). It's usually located at %appdata%\Mozilla\Firefox\Profiles and will contain at least one ...
Read more >"Can't find profile directory" error while running some tests in a ...
Please, advise me. I'm just learning Selenium WebDriver tools and trying to run some tests in a window of Firefox, but the second...
Read more >Can't find Profile folder [WIN11] : r/firefox - Reddit
I have Firefox installed through the new Microsoft Store. I tried several ways: about:support > Profile Folder > Open FolderResults in ...
Read more >Where does Firefox (Snap) store the profiles? - Ask Ubuntu
I upgraded to 22.04 yesterday and Firefox has imported my profiles from the original directory inside ~/.mozilla/firefox/ into the new ...
Read more >How to Copy the Firefox Profile to a New User Profile in ... - 4iT
NOTE: If you can't find any reference to Mozilla, Firefox or profiles in the AppData\Roaming folder of the new user this will be...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@devmondo ah, two browsers simultaneously! Awesome, I can repro now! We’ll fix it shortly
@aslushnikov thanks for the support!
unfortunately i cant share the private code, but it is nothing special really.
please let me know if i could help more.
thanks!