Skip to content

Can't connect to remote Chrome by name #84

Description

@chakathepakuni

Hi! I'm trying to run rspecs via Docker and not able to connect by name as expected.

docker-compose:

services:
 
  -- snip --

  chrome:
    image: alpeware/chrome-headless-stable
    ports:
      - "9222:9222"

spec_helper:

require 'capybara/apparition'

Capybara.register_driver :apparition do |app|
  browser_options = { 'remote-debugging-address' => 'chrome', 'remote-debugging-port' => 9222 }
  Capybara::Apparition::Driver.new(app, remote: true, browser_options: browser_options)
end
Capybara.javascript_driver = :apparition

-- snip --

Error observed:

JSON::ParserError:
            809: unexpected token at 'Host header is specified and is not an IP address or localhost.'

I suspect it's something simple. Any ideas? Many thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions