Coder Social home page Coder Social logo

Comments (12)

alphonse92 avatar alphonse92 commented on May 18, 2024

I have the same issue

from chrome-headless-browser-docker.

yukinying avatar yukinying commented on May 18, 2024

Can you provide more details? Are you having this issue in the chrome version or the selenium version?

from chrome-headless-browser-docker.

pcambra avatar pcambra commented on May 18, 2024

This seems to be a known issue with Chrome 66, but I'm struggling to find how to workaround it, more details:

puppeteer/puppeteer#2242
OnetapInc/chromy#110

from chrome-headless-browser-docker.

adamgotterer avatar adamgotterer commented on May 18, 2024

The only suitable workaround I've found is to pin to the last known version of chrome where this problem didn't exist yukinying/chrome-headless-browser:65.0.3322.3

from chrome-headless-browser-docker.

hbakhtiyor avatar hbakhtiyor commented on May 18, 2024

@yukinying any possible way to use proxy inside the image? proxy catches incoming requests and send to chrome instance, the proxy and chrome instance in the same docker container

from chrome-headless-browser-docker.

wholegroup avatar wholegroup commented on May 18, 2024

@hbakhtiyor Also you can map docker host IP to /etc/hosts and connect to a chrome instance via created host name, this issue about only if you use IP

from chrome-headless-browser-docker.

hbakhtiyor avatar hbakhtiyor commented on May 18, 2024

hi @wholegroup, the issue is that the same ip address uses for many subdomains (which has different instances)

from chrome-headless-browser-docker.

wholegroup avatar wholegroup commented on May 18, 2024

@hbakhtiyor I can't see your configuration, but still I don't see any problems.

before

ws://172.0.0.1:9223/devtools/page/FF3312E555CDEADBC3759BF0DE46B72B

after

ws://host-172-0-0-1:9223/devtools/page/FF3312E555CDEADBC3759BF0DE46B72B

/etc/hosts on a client

172.0.0.1 host-172-0-0-1

It is almost the same.

from chrome-headless-browser-docker.

foxundermoon avatar foxundermoon commented on May 18, 2024

same issue with chromium 72 when a request by domain.

with ip ok,
http://51.145.11.246:9222

http://spider.fox.mn:9222

from chrome-headless-browser-docker.

foxundermoon avatar foxundermoon commented on May 18, 2024
bool RequestIsSafeToServe(const net::HttpServerRequestInfo& info) {
  // For browser-originating requests, serve only those that are coming from
  // pages loaded off localhost or fixed IPs.
  std::string header = info.headers["host"];
  if (header.empty())
    return true;
  GURL url = GURL("http://" + header);
  return url.HostIsIPAddress() || net::IsLocalHostname(url.host(), nullptr);
}
  if (!RequestIsSafeToServe(info)) {
    Send500(connection_id,
            "Host header is specified and is not an IP address or localhost.");
    return;
  }

why domain not safe?

from chrome-headless-browser-docker.

m7shapan avatar m7shapan commented on May 18, 2024

Hello,
I was stuck at this problem as well until I found a workaround for it.
so my workaround was to override the host header and set it to localhost the replace the actual host by localhost on webSocketDebuggerUrl
my implementation on Golang for this workaround:
chromedp/chromedp#505 (comment)

from chrome-headless-browser-docker.

ahsanshah avatar ahsanshah commented on May 18, 2024

I am running into this issue when attempting to load balance NGINX upstream to a set of chrome headless pods. I am invoking the CDP commands externally from a different docker container. @m7shapan can you advise on where exactly the above workaround can be implemented? alternatively, Is there any flag directly that can resolve this in the more recent releases?

from chrome-headless-browser-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.