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

phantomJS #29

Closed
RouR opened this issue Mar 22, 2017 · 10 comments
Closed

phantomJS #29

RouR opened this issue Mar 22, 2017 · 10 comments
Milestone

Comments

@RouR
Copy link

RouR commented Mar 22, 2017

Please add phantomJS

@aandryashin
Copy link
Member

To use Selenoid with phantomjs use this Dockerfile:

FROM wernight/phantomjs

CMD ["/usr/local/bin/phantomjs", "-w"]

then build container with:

$ docker build -t pantomjs .

and add this section to browsers.json:

    "phantomjs": {
        "default": "latest",
        "versions": {
            "latest": {
                "image": "pantomjs",
                "path": "/wd/hub",
                "port": "8910"
            }
        }
    }

@vania-pooh
Copy link
Member

vania-pooh commented Mar 23, 2017

@RouR did this help? We'll provide working container in our repository soon.

@RouR
Copy link
Author

RouR commented Mar 23, 2017

I will check it on weekend (hobby project)

@vania-pooh
Copy link
Member

@RouR sure.

@vania-pooh
Copy link
Member

@RouR any updates?

@vania-pooh vania-pooh modified the milestone: 1.2.0 Apr 5, 2017
@vania-pooh
Copy link
Member

Fixed. New image name is selenoid/phantomjs:2.1.1(https://hub.docker.com/r/selenoid/phantomjs/).

@vania-pooh vania-pooh modified the milestones: 1.1.0, 1.2.0 Apr 5, 2017
@RouR
Copy link
Author

RouR commented Jun 5, 2017

I checked it.
The image pantomjs is work. A problem with phantomjs inside the image -

System.InvalidOperationException : Post http://172.17.0.4:8910/wd/hub/session: malformed HTTP status code "Command"

Also, I try to use selenoid/phantomjs:2.1.1 It's not work -

System.InvalidOperationException : create container: Error: No such image: selenoid/phantomjs:2.1.1

Part of config file:

"phantomjs": {
        "default": "latest",
        "versions": {
            "latest": {
                "image": "selenoid/phantomjs:2.1.1",
                "path": "/wd/hub",
                "port": "8910"
            }
        }
    },

I read the docs - http://aerokube.com/selenoid/latest/#_browser_image_information and i can`t find phantomjs in the list. Does it supported?

Also, I try to create config file by this command

docker run --rm                                   \
    -v /var/run/docker.sock:/var/run/docker.sock    \
    aerokube/cm:1.0.0 selenoid                      \ 
    --last-versions 2                               \
    --tmpfs 128                                     \
    --pull > /etc/selenoid/browsers.json > 

There are no phantomjs in result file

@vania-pooh
Copy link
Member

@RouR we support PhantomJS but so far as it was deprecated by author in favor to Chrome headless we decided to not include this image in docs \ cm. In order to test selenoid/phantomjs:2.1.1 you need to pull it manually:

# docker pull selenoid/phantomjs:2.1.1

@RouR
Copy link
Author

RouR commented Jun 6, 2017

Same error

Post http://172.17.0.4:4444/wd/hub/session: malformed HTTP status code "Command"

More detailed log:

[NEW_REQUEST]
[NEW_REQUEST_ACCEPTED]
[1] [LOCATING_SERVICE] [phantomjs-]
Using default version: latest
[USING_DOCKER] [phantomjs-latest]
[CREATING_CONTAINER] [selenoid/phantomjs:2.1.1]
[STARTING_CONTAINER] [selenoid/phantomjs:2.1.1] [54052afc10eb337e3e57c72d63cd913ed34a29dba2cbe5322a117cdabba0c775]
[CONTAINER_STARTED] [selenoid/phantomjs:2.1.1] [54052afc10eb337e3e57c72d63cd913ed34a29dba2cbe5322a117cdabba0c775] [263.688304ms]
[SERVICE_STARTED] [selenoid/phantomjs:2.1.1] [54052afc10eb337e3e57c72d63cd913ed34a29dba2cbe5322a117cdabba0c775] [478.628391ms]
[PROXY_TO] [selenoid/phantomjs:2.1.1] [54052afc10eb337e3e57c72d63cd913ed34a29dba2cbe5322a117cdabba0c775] [http://172.17.0.4:4444/wd/hub]
[SESSION_ATTEMPTED] [unknown] [http://172.17.0.4:4444/wd/hub] [1]
Unsolicited response received on idle HTTP channel starting with "Unknown Command - {\"headers\":{\"Host\":\"172.17.0.4:4444\",\"User-Agent\":\"Go-http-client/1.1\"},\"httpVersion\":\"1.1\",\"method\":\"HEAD\",\"url\":\"\",\"urlParsed\":{\"anchor\":\"\",\"query\":\"\",\"file\":\"\",\"directory\":\"\",\"path\":\"\",\"relative\":\"\",\"port\":\"\",\"host\":\"\",\"password\":\"\",\"user\":\"\",\"userInfo\":\"\",\"authority\":\"\",\"protocol\":\"\",\"source\":\"\",\"queryKey\":{},\"chunks\":[\"\"]}}"; err=<nil>
[1] [SESSION_FAILED] [http://172.17.0.4:4444/wd/hub] - [Post http://172.17.0.4:4444/wd/hub/session: malformed HTTP status code "Command"]
[1] [REMOVE_CONTAINER] [54052afc10eb337e3e57c72d63cd913ed34a29dba2cbe5322a117cdabba0c775]
[1] [CONTAINER_REMOVED] [54052afc10eb337e3e57c72d63cd913ed34a29dba2cbe5322a117cdabba0c775]

Chrome headless appeared in 59 version.
For now, the latest version of selenoid/chrome is 58

@vania-pooh
Copy link
Member

vania-pooh commented Jun 6, 2017

@RouR I think this is because of wrong Path value. Works for me with the following config:

{
  "phantomjs": {
    "default": "2.1.1",
    "versions": {
      "2.1.1": {
        "image": "selenoid/phantomjs:2.1.1",
        "port": "4444"
      }
    }
  }
}

Today we are releasing a new version of Selenoid which should automatically avoid this problem.

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