Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The First Script cannot launch browsers #5796

Closed
SBalac opened this issue Mar 11, 2021 · 8 comments
Closed

[BUG] The First Script cannot launch browsers #5796

SBalac opened this issue Mar 11, 2021 · 8 comments

Comments

@SBalac
Copy link

SBalac commented Mar 11, 2021

Context:

  • Playwright Version: 1.9.2
  • Operating System: Windows 10 Pro, version 2004, OS build 19041.804
  • Node.js version: 14.15.1
  • Browser: [chromium, firefox, webkit]
  • Extra:
    System:
    OS: Windows 10 10.0.19041
    Memory: 5.14 GB / 15.96 GB
    Binaries:
    Node: 14.15.1 - C:\Program Files\nodejs\node.EXE
    npm: 6.14.9 - C:\Program Files\nodejs\npm.CMD
    Languages:
    Bash: 4.4.20 - C:\WINDOWS\system32\bash.EXE

Code Snippet
const playwright = require('playwright');
(async () => {
try {
for (const browserType of ['chromium', 'firefox', 'webkit']) {
const browser = await playwright[browserType].launch({headless: false, slowMo: 50, dumpio: true});
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('http://whatsmyuseragent.org/');
await page.screenshot({ path: example-${browserType}.png });
await browser.close();
}
}
catch(e) {
console.log('Caught an error: ', e)
}
})();

Describe the bug
Caught an error: browserType.launch: Timeout 30000ms exceeded.Error
at Object.captureStackTrace (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\utils\stackTrace.js:48:19)
at Connection.sendMessageToServer (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\connection.js:69:48)
at Proxy. (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\channelOwner.js:64:61)
at C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\browserType.js:64:67
at BrowserType._wrapApiCall (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\channelOwner.js:77:34)
at BrowserType.launch (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\browserType.js:55:21)
at C:\Users\Ani\Documents\Customate\Playwright\BasicTest.js:6:53
at Object. (C:\Users\Ani\Documents\Customate\Playwright\BasicTest.js:17:3)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) {
name: 'TimeoutError'
}
ERROR: The process "38104" not found.

@yury-s
Copy link
Member

yury-s commented Mar 11, 2021

One of the browsers fails to launch for some reason, could you run your script with the following environment variable to collect more logs:

set DEBUG=pw:api,pw:browser

@SBalac
Copy link
Author

SBalac commented Mar 12, 2021

Hi Yuri, here is the output:

C:\Users\Ani\Documents\Customate\Playwright>node BasicTest.js
pw:api => browserType.launch started +0ms
pw:api <= browserType.launch failed +34s
Caught an error: browserType.launch: Timeout 30000ms exceeded.Error
at Object.captureStackTrace (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\utils\stackTrace.js:48:19)
at Connection.sendMessageToServer (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\connection.js:69:48)
at Proxy. (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\channelOwner.js:64:61)
at C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\browserType.js:64:67
at BrowserType._wrapApiCall (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\channelOwner.js:77:34)
at BrowserType.launch (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\browserType.js:55:21)
at C:\Users\Ani\Documents\Customate\Playwright\BasicTest.js:6:53
at Object. (C:\Users\Ani\Documents\Customate\Playwright\BasicTest.js:17:3)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) {
name: 'TimeoutError'
}
pw:browser C:\Users\Ani\AppData\Local\ms-playwright\chromium-854489\chrome-win\chrome.exe --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies,LazyFrameLoading --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --user-data-dir=C:\Users\Ani\AppData\Local\Temp\playwright_chromiumdev_profile-N8Scry --remote-debugging-pipe --no-sandbox --no-startup-window +0ms
pw:browser pid=24200 +0ms
pw:browser +540ms
pw:browser +1ms
ERROR: The process "24200" not found.
pw:browser +362ms
pw:browser +3ms
pw:browser

@SBalac
Copy link
Author

SBalac commented Mar 12, 2021

Removing chrome from the list, so that line 5 becomes: for (const browserType of ['firefox', 'webkit']) {

Gives a similar error:

C:\Users\Ani\Documents\Customate\Playwright>node BasicTest.js
pw:api => browserType.launch started +0ms
pw:api <= browserType.launch failed +50s
Caught an error: browserType.launch: Timeout 30000ms exceeded.Error
at Object.captureStackTrace (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\utils\stackTrace.js:48:19)
at Connection.sendMessageToServer (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\connection.js:69:48)
at Proxy. (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\channelOwner.js:64:61)
at C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\browserType.js:64:67
at BrowserType._wrapApiCall (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\channelOwner.js:77:34)
at BrowserType.launch (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\browserType.js:55:21)
at C:\Users\Ani\Documents\Customate\Playwright\BasicTest.js:6:53
at Object. (C:\Users\Ani\Documents\Customate\Playwright\BasicTest.js:17:3)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) {
name: 'TimeoutError'
}
pw:browser C:\Users\Ani\AppData\Local\ms-playwright\firefox-1234\firefox\firefox.exe -no-remote -wait-for-browser -foreground -profile C:\Users\Ani\AppData\Local\Temp\playwright_firefoxdev_profile-rAoW74 -juggler-pipe -silent +0ms
pw:browser pid=1764 +1ms
pw:browser +458ms
pw:browser +0ms
ERROR: The process "1764" not found.
pw:browser +483ms
pw:browser +10ms
pw:browser

Also, with just webkit: for (const browserType of ['webkit']) {

C:\Users\Ani\Documents\Customate\Playwright>node BasicTest.js
pw:api => browserType.launch started +0ms
pw:api <= browserType.launch failed +1m
Caught an error: browserType.launch: Timeout 30000ms exceeded.Error
at Object.captureStackTrace (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\utils\stackTrace.js:48:19)
at Connection.sendMessageToServer (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\connection.js:69:48)
at Proxy. (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\channelOwner.js:64:61)
at C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\browserType.js:64:67
at BrowserType._wrapApiCall (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\channelOwner.js:77:34)
at BrowserType.launch (C:\Users\Ani\Documents\Customate\node_modules\playwright\lib\client\browserType.js:55:21)
at C:\Users\Ani\Documents\Customate\Playwright\BasicTest.js:6:53
at Object. (C:\Users\Ani\Documents\Customate\Playwright\BasicTest.js:17:3)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) {
name: 'TimeoutError'
}
pw:browser C:\Users\Ani\AppData\Local\ms-playwright\webkit-1438\Playwright.exe --inspector-pipe --no-startup-window +0ms
pw:browser pid=3088 +3ms
pw:browser +573ms
pw:browser +1ms
ERROR: The process "3088" not found.
pw:browser +661ms
pw:browser +14ms
pw:browser

@yury-s
Copy link
Member

yury-s commented Mar 12, 2021

The browser processes die early on start, can you try and launch them without playwright, e.g. this one

C:\Users\Ani\AppData\Local\ms-playwright\chromium-854489\chrome-win\chrome.exe 

@SBalac
Copy link
Author

SBalac commented Mar 15, 2021

I can launch all three browsers from \AppData\Local\ms-playwright

@aslushnikov
Copy link
Collaborator

@SBalac can you please try running the full command line:

C:\Users\Ani\AppData\Local\ms-playwright\chromium-854489\chrome-win\chrome.exe --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies,LazyFrameLoading --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --user-data-dir=C:\Users\Ani\AppData\Local\Temp\playwright_chromiumdev_profile-N8Scry --remote-debugging-pipe --no-sandbox

@SBalac
Copy link
Author

SBalac commented Mar 18, 2021 via email

@pavelfeldman
Copy link
Member

We are lacking information to address your issue. The logs look normal, the script looks normal, the system looks Ok, yet it won't start the browser. This is the only report of this kind, so I would suspect an anti-virus software or something to do with unusual setup. Sorry I am closing this one without solving it for you, but we need to keep our bug database actionable and there is no action we can perform on this one. Please feel free to file a new issue with any additional details you can provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants