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
The default page chromium opens is invalid #5737
Comments
happens to me as well on Linux Centos 7 with chrome version Chromium 85.0.4183.121 Fedora Project |
We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days. |
This issue likely causes this in my application:
When I change
To
Issue goes away. |
We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days. |
#botsdontlikebugs |
As for the original issue: providing the "" as an argument causes Chromium to treat as an URL and you probably should not do it (looks like a issue to be reported upstream at crbug.com). I think other commenters are likely to have a different issue. |
These errors only happen because of the argument
""
passed to chromium and if chrome is launched withheadless: true
. Ifheadless: false
or we do not pass""
as an argument to chroming, then, no errors happen when using the default page.When I begin testings, I was directly trying to use the default page (
let [page] = await browser.pages()
) instead of creating a new page withlet page = await browser.newPage()
.Trying to use the default page, caused awkward errors in the first tests trying to use the default page:
TimeoutError: Timed out after 30000 ms while trying to connect to Chrome, Protocol error (Runtime.callFunctionOn): Execution context was destroyed, Error details for UnhandledPromiseRejectionWarning
(#1591, #4253, #4651). These tests would hang forever (https://github.com/evandroforks/anki/runs/610551447?check_suite_focus=true#step:27:1649). The problem was fixed after creating a new pagelet page = await browser.newPage()
instead of trying to use the default pagelet [page] = await browser.pages()
.If I try to print the page contents with
document.body.innerHTML
nothing is output. But if I do aawait page.reload()
right before, then, the page contents are printed. These problems only happen withheadless: true
.Perhaps add to the documentation to never use the default page? Or warn about the problems an empty string (
""
) can cause when passed as an argument to chromium?I was accidentally passing
""
as an argument to chromium because I was reading arguments from an environment variable in the wrong way:This way I ended up adding an empty arg
""
when the environment variable was undefined. The correct way would be this:What steps will reproduce the problem?
Just run: node file.js
Running it on Windows results in:
Running it on Linux results in:
Tell us about your environment:
After tracking down these prints, I found they located on the chromium
directory_listing.cc
: https://chromium.googlesource.com/chromium/src/net/+/master/base/directory_listing.cc, https://chromium.googlesource.com/chromium/src/gpu/+/master/ipc/client/command_buffer_proxy_impl.cc, https://bugs.chromium.org/p/chromium/issues/detail?id=737678, https://gist.github.com/morganrallen/f955cc0312ae2cdbe9a5, #1610 - HTML render with headless chrome + GPU hangs, #1665 - async function inside evaluate fails.The text was updated successfully, but these errors were encountered: