Comments (6)
I tried to reproduce on Windows 11 and macOS 14, both ran without any issues.
Is your machine managed or has cooperate software installed on it?
from playwright.
Yes my machine is managed by our IT team and has corporate softwares on it (Microsoft Office 365 and many others).
from playwright.
Interesting! Could you please try the following?
- Create a file
test.mjs
with the content below - Run it (
node test.mjs
) with having theDEBUG=pw:browser
env var set (in PowerShell e.g.$Env:DEBUG="pw:browser"
)
import { chromium, expect } from '@playwright/test';
(async () => {
const browser = await chromium.launch({ headless: false, slowMo: 100 });
{
const context = await browser._newContextForReuse();
const page = await context.newPage();
await page.goto('https://playwright.dev/');
await expect(page).toHaveTitle(/Playwright/);
}
{
const context = await browser._newContextForReuse();
const page = context.pages()[0];
await page.goto('https://playwright.dev/');
await page.getByRole('link', { name: 'Get started' }).click();
await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
}
await browser.close();
})();
This might give us more debug output while mimicking what we do inside the extension.
from playwright.
Hi,
Here below is the output of the test program you asked me to run. By the way, a chromium window opened correctly:
pw:browser <launching> C:\Users\xxxx\AppData\Local\ms-playwright\chromium-1112\chrome-win\chrome.exe --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --no-sandbox --user-data-dir=C:\Users\xxxx\AppData\Local\Temp\playwright_chromiumdev_profile-aoNOCG --remote-debugging-pipe --no-startup-window +0ms
pw:browser <launched> pid=3148 +34ms
pw:browser [pid=3148][err] [3148:4124:0507/064126.456:ERROR:chrome_browser_cloud_management_controller.cc(161)] Cloud management controller initialization aborted as CBCM is not enabled. Please use the `--enable-chrome-browser-cloud-management` command line flag to enable it if you are not using the official Google Chrome build. +454ms
pw:browser [pid=3148] <gracefully close start> +2s
pw:browser [pid=3148] <process did exit: exitCode=0, signal=null> +339ms
pw:browser [pid=3148] starting temporary directories cleanup +1ms
pw:browser [pid=3148] finished temporary directories cleanup +17ms
pw:browser [pid=3148] <gracefully close end>
The test you ask me to run concerns the chromium browser but I do not have any problem with chromium... my problem is only with firefox... then I ran the same test program where I replaced the string "chromium" by "firefox" and here is the resulting output. During the test, no window opened for Firefox:
pw:browser <launching> C:\Users\xxxx\AppData\Local\ms-playwright\firefox-1447\firefox\firefox.exe -no-remote -wait-for-browser -foreground -profile C:\Users\xxxx\AppData\Local\Temp\playwright_firefoxdev_profile-5EqNMJ -juggler-pipe -silent +0ms
pw:browser <launched> pid=12764 +12ms
pw:browser [pid=12764][err] JavaScript warning: resource://services-settings/Utils.sys.mjs, line 114: unreachable code after return statement +163ms
pw:browser [pid=12764][out] console.warn: services.settings: Ignoring preference override of remote settings server +2ms
pw:browser [pid=12764][out] console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment +0ms
pw:browser [pid=12764][out] console.error: ({}) +305ms
pw:browser [pid=12764][out] +4ms
pw:browser [pid=12764][out] Juggler listening to the pipe +0ms
pw:browser [pid=12764][out] console.error: "Warning: unrecognized command line flag" "-foreground" +33ms
pw:browser [pid=12764][out] console.error: SearchEngineSelector: "Received empty search configuration!" +2s
pw:browser [pid=12764][out] console.error: SearchEngineSelector: "Received empty search configuration!" +109ms
pw:browser [pid=12764][out] console.error: SearchService: "#init: failure initializing search:" ({}) +0ms
pw:browser [pid=12764][err] JavaScript error: resource://gre/modules/SearchEngineSelectorOld.sys.mjs, line 118: NS_ERROR_UNEXPECTED: Failed to get engine data from Remote Settings +13ms
pw:browser [pid=12764][out] console.error: "Received empty top sites configuration!" +1ms
pw:browser [pid=12764][err] JavaScript error: resource://gre/modules/SearchEngineSelectorOld.sys.mjs, line 118: NS_ERROR_UNEXPECTED: Failed to get engine data from Remote Settings +0ms
pw:browser [pid=12764][err] JavaScript error: resource://gre/modules/SearchEngineSelectorOld.sys.mjs, line 118: NS_ERROR_UNEXPECTED: Failed to get engine data from Remote Settings +0ms
pw:browser [pid=12764][err] JavaScript error: resource://gre/modules/SearchEngineSelectorOld.sys.mjs, line 118: NS_ERROR_UNEXPECTED: Failed to get engine data from Remote Settings +4ms
pw:browser [pid=12764][out] console.error: "Received empty top sites configuration!" +2ms
pw:browser [pid=12764][out] console.error: WebExtensions: +118ms
pw:browser [pid=12764][out] Message: [Exception... "Failed to get engine data from Remote Settings" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: resource://gre/modules/SearchEngineSelectorOld.sys.mjs :: getEngineConfiguration :: line 118" data: no] +0ms
pw:browser [pid=12764][out] Stack: +0ms
pw:browser [pid=12764][out] getEngineConfiguration@resource://gre/modules/SearchEngineSelectorOld.sys.mjs:118:24 +0ms
pw:browser [pid=12764][out] +0ms
pw:browser [pid=12764][err] JavaScript error: , line 0: InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable +538ms
pw:browser [pid=12764][err] JavaScript error: , line 0: TypeError: can't access dead object +8ms
pw:browser [pid=12764][out] console.error: SearchSettings: "_write: Could not write to settings file:" (new Error("cannot write without any engine.", "resource://gre/modules/SearchSettings.sys.mjs", 277)) +154ms
pw:browser [pid=12764] <gracefully close start> +461ms
pw:browser [pid=12764] <process did exit: exitCode=0, signal=null> +730ms
pw:browser [pid=12764] starting temporary directories cleanup +0ms
pw:browser [pid=12764] finished temporary directories cleanup +20ms
pw:browser [pid=12764] <gracefully close end>
from playwright.
Based on previous test with firefox browser, I tried some complementary investigations by launching manually firefox browser window (based on the command appearing at the beginning of the debug trace):
With the command "C:\Users\xxxx\AppData\Local\ms-playwright\firefox-1447\firefox\firefox.exe -no-remote -wait-for-browser -foreground", a Nightly/Firefox window opens correctly.
The name of the directory used for the "-profile" parameter is currently "C:\Users\xxxx\AppData\Local\Temp\playwright_firefoxdev_profile-5EqNMJ", and I noticed that I have also a directory called "C:\Users\xxxx\AppData\Local\Temp\playwright_firefoxdev_profile" created a few days ago.
I thought I could have had a problem when removing those temporary directories, and I tried to remove them manually... and you know what ? now everything is working properly with firefox browser 👍👍👍
My problem seems fixed!!
I leave it to you to close this ticket and remain at your disposal for any further information you may require.
from playwright.
Impressive! I suspect that some anti-virus / policy software on your system didn't like our Firefox browser getting launched by Playwright initially but if you do it manually, it shows them that this is an intentional execution.
Closing by that.
from playwright.
Related Issues (20)
- [Bug]: Locators are in Playwright provided is not Detecting when we run same Scripts again HOT 1
- [Bug]: Tests no longer found in nested Test directory HOT 1
- [Regression]: Forever running state HOT 1
- [Bug]: slowMo option not slowing down commands HOT 2
- [Feature]: I would like waitForResponse to be available on BrowserContext HOT 1
- [Bug]: Expect timeout is not used for locators HOT 1
- [Bug]: localhost replaced with [::1] HOT 2
- [Bug]: Svelte 4 component testing not working HOT 2
- [Feature]: ui mode include Playwright inspector HOT 1
- [Bug]: Plugin VSCode not working with the shared auth
- [Bug]: Unable to capture URL address of a new tab in headless mode HOT 1
- [Bug]: VSCode Extension doesn't list test cases in Test Explorer when configuration file is under sub folder of root of workspace. HOT 3
- [Bug]: VSCode extension cannot start test-server because it always lookup config file from root workspace HOT 2
- [Bug]: Playwright ts/js method isDisabled() doesnot work as expected HOT 1
- [Bug]: Using command "npx playwright test" the dependences and teardown are not run after every test HOT 1
- The browsers don't work in the Docker image HOT 1
- [Bug]: UI seems to lock on Windows making tests time out HOT 7
- [Bug]: Having multiple `Page`s on the same domain, JS coverage is only reported for the one that got `stopJSCoverage` called before others
- [Bug]: VS Code extension ignores `launchOptions.executablePath` HOT 1
- [Feature]: Add the Ability to Prevent Browser Teardown on Failure in --debug Mode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from playwright.