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

Host header is specified and is not an IP address or localhost. #110

Open
jawadst opened this issue Mar 21, 2018 · 5 comments
Open

Host header is specified and is not an IP address or localhost. #110

jawadst opened this issue Mar 21, 2018 · 5 comments

Comments

@jawadst
Copy link

jawadst commented Mar 21, 2018

When Chromy is started without a start URL on the latest Chrome unstable, Chrome sends the following error back: "Host header is specified and is not an IP address or localhost."

This seems to be a WIP change that they are introducing: https://groups.google.com/a/chromium.org/forum/#!topic/devtools-reviews/na2b4wQ3v2g

@hbakhtiyor
Copy link

and so what's the workaround of the issue?

@zerefel
Copy link

zerefel commented Apr 21, 2018

This is also an issue if you decide to run headless Chrome within a Docker container and reference it by its service name, which Docker automatically resolves to an IP address.

@jawadst
Copy link
Author

jawadst commented Apr 21, 2018

@hbakhtiyor I haven't found any real workaround so far.
I am running Chrome headless in a Docker container as mentioned by @zerefel and I use the yukinying/chrome-headless-browser image. For now, I have fixed the version to Chrome 65.0.3322.3 (before they introduced the change).
It's not long term but it works for now.

@hbakhtiyor
Copy link

@jawadst how did you specify version of chrome in docker?

@jawadst
Copy link
Author

jawadst commented Apr 22, 2018

@hbakhtiyor
Our docker-compose is the following:

version: '3'

services:
  app:
    container_name: app
    build: .
    working_dir: /app
    volumes:
      - .:/app

  chrome:
    image: yukinying/chrome-headless-browser:65.0.3322.3
    cap_add:
      - SYS_ADMIN
    entrypoint: /usr/bin/dumb-init -- /usr/bin/google-chrome-unstable --disable-gpu --headless --disable-dev-shm-usage --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --user-data-dir=/data --proxy-server=http://app:24000

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

3 participants