[BUG] Getting chromium as undefined with playwright-core
See original GitHub issueContext:
- Playwright Version: [playwright-core -v1.2.0]
- Operating System: [Windows (Pro 10 - 1809) & Linux (Ubuntu 20.04)]
- Node version: [v14.4.0 on Windows, v12.18.0 on Linux (Ubuntu 20.04)]
- Browser: [Chromium]
Code Snippet
const { chromium } = require('playwright-core');
(async () => {
try {
const browser = await chromium.launch({
headless: false,
executablePath: 'c:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe'
});
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('http://whatsmyuseragent.org/');
// await browser.close();
} catch (err) {
console.log(err);
}
})();
Describe the bug Getting chromium as undefined
TypeError: Cannot read property 'launch' of undefined
at C:\Users\Sudhakar_r_r\Desktop\test-playwright\index.js:5:40
at Object.<anonymous> (C:\Users\Sudhakar_r_r\Desktop\test-playwright\index.js:16:3)
at Module._compile (internal/modules/cjs/loader.js:1200:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
at Module.load (internal/modules/cjs/loader.js:1049:32)
at Function.Module._load (internal/modules/cjs/loader.js:937:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
56211 - chrome.cookies fails for localhost domains - Monorail
Some companies as the one I am working for do not have dns servers for security reasons. So some internal web based applications...
Read more >chrome-aws-lambda - npm
The Chromium binary is compressed using the Brotli algorithm. This allows us to get the best compression ratio and faster decompression times.
Read more >Playwright changelog - Awesome Node.js - LibHunt
It allows testing Chromium, Firefox and WebKit with a single API. All Versions ... #2905 - [BUG] Getting chromium as undefined with playwright-core...
Read more >playwright-core - UNPKG
The CDN for playwright-core. ... [upstream issue](https://bugs.chromium.org/p/chromium/issues/detail?id=761295). ... searchParams.get('foo2') === 'bar2');.
Read more >Chrome Extension NativeMessaging 'connectNative' undefined
To get the sample code for both the Chrome extension and native ... you'll need to fix some bugs in nativeMessaging/host/install_host.sh and ...
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 Free
Top 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

We are developing (and running) a “desktop application” (think of something akin to the carlo architecture) using
puppeteer. For various reasons we have made the decision to use the system-wide installation of chromium.Controlling whether
playwrightdownloads chromium with an environment variable is not very ergonomic: we have to set the variable in every dev box and in every box where we deploy our app; developers have to remember to doPLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm installinstead ofnpm install(and similarly fornpm update).In general, the reason why
package.jsonandpackage-lock.jsonare great is because you can record in them various decisions you have made (e.g. about your dependencies) without having to communicate them to other developers verbally or through documentation. These decisions then propagate to all boxes automatically. They are even versioned! Git remembers when you made changes to them. This lessens the cognitive load of working with the system.In our current implementation, we have solved the issue of how to signify that we don’t want to use the bundled browser by specifying
puppeter-coreas a dependency instead ofpuppeter. It would be great ifplaywrightprovided a similar solution. I don’t know if this is the right issue to discuss this, if not, I can open a new one.This is fixed now.