[Bug]: `device.launchBrowser()` stops on `about:blank` when changing the page URL
See original GitHub issuePlaywright version
1.12.2
Operating system
Linux
What browsers are you seeing the problem on?
Chromium
Other information
- NodeJS
v12.21.0 Linux thonkpad 5.10.0-kali9-amd64 #1 SMP Debian 5.10.46-1kali1 (2021-06-25) x86_64 GNU/Linux
What happened? / Describe the bug
Using physical devices and ADB I want to use Playwright’s NodeJS API for browser automation.
I can get an AndroidDevice object and launch its browser using my script. But it stops here on a new page about:blank.
I use experimental Android API functions in my code, so maybe this is why I get this bug.
Code snippet to reproduce your bug
const { _android: android, chromium } = require("playwright");
(async () => {
// get the list of all connected devices
const devices = await android.devices();
for(device of devices) {
// in real example I start chromium remote debugging with the flag `--remote-debugging-port=${port}`, but for reading purposes I simplified the thing
device.shell(`am start -n com.android.chrome/com.google.android.apps.chrome.Main`);
// launch the browser to automate it afterwards
const browser = await device.launchBrowser(); // from here, no more logging output, even using `console.log`
const page = await browser.newPage(); // launches a new page stuck on `about:blank`
await page.goto("https://google.com"); // not working
await browser.close();
}
})();
Relevant log output
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
What About:Blank in a Browser Means and How to Resolve It
The about:blank address directs a browser to open a blank or empty page ... Users can, however, change it to another page of...
Read more >466422 - Replace about:blank URLs with the URL of the opener
Perhaps showing the opener again in the reloaded about:blank is acceptable (instead of the home page of the origin). Or can we navigate...
Read more >What Is the about:blank Page? - AVG
The about:blank page, also called About Blank, is an empty page on your ... Entering about:blank as the homepage URL in Google Chrome....
Read more >What Is about:blank and How Do You Remove It?
If you've had a new tab open in your browser with the URL address ... The good news is that the about:blank page...
Read more >Microsoft Visual Studio Failed to launch debug adapter ...
Note: if I change launchBrowser to false I can successfully start the project, and then open the browser and navigate to the url...
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
You should go to chrome://flags on your mobile device and enable “Enable command line on non-rooted devices” experiment. See https://playwright.dev/docs/mobile/ - somehow that page is lost from our docs index.
Yeah, but you don’t need any of that if you just go to
chrome://inspect. It’ll discover your device and connect to that remote.