{"action":"created","issue":{"url":"https://api.github.com/repos/zalando/zalenium/issues/695","repository_url":"https://api.github.com/repos/zalando/zalenium","labels_url":"https://api.github.com/repos/zalando/zalenium/issues/695/labels{/name}","comments_url":"https://api.github.com/repos/zalando/zalenium/issues/695/comments","events_url":"https://api.github.com/repos/zalando/zalenium/issues/695/events","html_url":"https://github.com/zalando/zalenium/issues/695","id":350211654,"node_id":"MDU6SXNzdWUzNTAyMTE2NTQ=","number":695,"title":"GridException \"Error forwarding the new session request\" on initiating a test on browserstack ","user":{"login":"MilindThakur","id":5360933,"node_id":"MDQ6VXNlcjUzNjA5MzM=","avatar_url":"https://avatars1.githubusercontent.com/u/5360933?v=4","gravatar_id":"","url":"https://api.github.com/users/MilindThakur","html_url":"https://github.com/MilindThakur","followers_url":"https://api.github.com/users/MilindThakur/followers","following_url":"https://api.github.com/users/MilindThakur/following{/other_user}","gists_url":"https://api.github.com/users/MilindThakur/gists{/gist_id}","starred_url":"https://api.github.com/users/MilindThakur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MilindThakur/subscriptions","organizations_url":"https://api.github.com/users/MilindThakur/orgs","repos_url":"https://api.github.com/users/MilindThakur/repos","events_url":"https://api.github.com/users/MilindThakur/events{/privacy}","received_events_url":"https://api.github.com/users/MilindThakur/received_events","type":"User","site_admin":false},"labels":[{"id":734415929,"node_id":"MDU6TGFiZWw3MzQ0MTU5Mjk=","url":"https://api.github.com/repos/zalando/zalenium/labels/waiting-answer","name":"waiting-answer","color":"5af4be","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-13T22:08:19Z","updated_at":"2018-10-24T09:27:59Z","closed_at":"2018-10-24T09:27:59Z","author_association":"NONE","body":"Zalenium Image Version(s):  \r\n3.13.0b\r\nDocker Version:  \r\n17.09.1-ce\r\nIf using docker-compose, version:  \r\n1.14.0\r\nOS: \r\n16.04.1-Ubuntu\r\nDocker Command to start Zalenium:  \r\n```\r\nversion: '2.1'\r\n\r\nservices:\r\n  #--------------#\r\n      zalenium:\r\n        image: \"dosel/zalenium\"\r\n        container_name: zalenium\r\n        hostname: zalenium\r\n        privileged: true\r\n        tty: true\r\n        volumes:\r\n          - /var/run/docker.sock:/var/run/docker.sock\r\n          - /tmp/videos:/home/seluser/videos\r\n        ports:\r\n          - 4444:4444\r\n        command: >\r\n          start --desiredContainers 1\r\n                --maxDockerSeleniumContainers 10\r\n                --screenWidth 1930 --screenHeight 1090\r\n                --timeZone \"Pacific/Auckland\"\r\n                --videoRecordingEnabled false\r\n                --sauceLabsEnabled false\r\n                --browserStackEnabled true\r\n                --testingBotEnabled false\r\n                --startTunnel true\r\n                --seleniumImageName \"elgalu/selenium\"\r\n                --sendAnonymousUsageInfo false\r\n                --maxTestSessions 5\r\n                --keepOnlyFailedTests true\r\n                --debugEnabled false\r\n        environment:\r\n          - SAUCE_USERNAME\r\n          - SAUCE_ACCESS_KEY\r\n          - BROWSER_STACK_USER\r\n          - BROWSER_STACK_KEY\r\n          - TESTINGBOT_KEY\r\n          - TESTINGBOT_SECRET\r\n```\r\n\r\n## Expected Behavior -\r\nShould initiate tests on browserstack over a local tunnel\r\n\r\n## Actual Behavior -\r\nGet the following grid exception:\r\n```\r\nzalenium    | Docker version 17.09.1-ce, build 19e2cf6\r\nzalenium    | -- LOG 09:36:11:146722401 Ensuring docker works...\r\nzalenium    | -- LOG 09:36:11:183006995 Ensuring no stale Zalenium related containers are still around...\r\nzalenium    | -- LOG 09:36:11:199786910 Ensuring docker-selenium is available...\r\nzalenium    | haveged: haveged starting up\r\nzalenium    | Copying files for Dashboard...\r\nzalenium    | Starting Nginx reverse proxy...\r\nzalenium    | Starting Selenium Hub...\r\n.zalenium    | ...09:36:11.771 [main] INFO  o.o.grid.selenium.GridLauncherV3 - Selenium build info: version: '3.13.0', revision: 'unknown'\r\nzalenium    | 09:36:11.774 [main] INFO  o.o.grid.selenium.GridLauncherV3 - Launching Selenium Grid hub on port 4445\r\n.zalenium    | .09:36:12.011 [AutoStartProxyPoolPoller] INFO  d.z.e.z.proxy.AutoStartProxySet - Starting poller.\r\nzalenium    | 09:36:12.011 [AutoStartProxyPoolPoller] INFO  d.z.e.z.proxy.AutoStartProxySet - Autostarting container, because 0 is less than min 1\r\n.zalenium    | .09:36:12.345 [main] INFO  d.z.ep.zalenium.aspect.HubAspect - Registering custom Zalenium servlets\r\nzalenium    | .09:36:12.407 [main] INFO  org.openqa.grid.web.Hub - Selenium Grid hub is up and running\r\nzalenium    | 09:36:12.407 [main] INFO  org.openqa.grid.web.Hub - Nodes should register to http://172.20.0.2:4445/grid/register/\r\nzalenium    | 09:36:12.407 [main] INFO  org.openqa.grid.web.Hub - Clients should connect to http://172.20.0.2:4445/wd/hub\r\n.zalenium    | Selenium Hub started!\r\nzalenium    | Sauce Labs not enabled...\r\nzalenium    | Starting Browser Stack node...\r\n..zalenium    | ...09:36:13.166 [main] INFO  o.o.grid.selenium.GridLauncherV3 - Selenium build info: version: '3.13.0', revision: 'unknown'\r\nzalenium    | 09:36:13.172 [main] INFO  o.o.grid.selenium.GridLauncherV3 - Launching a Selenium Grid node on port 30002\r\n.zalenium    | 09:36:13.321 [main] INFO  o.o.s.remote.server.SeleniumServer - Selenium Server is up and running on port 30002\r\nzalenium    | 09:36:13.321 [main] INFO  o.o.grid.selenium.GridLauncherV3 - Selenium Grid node is up and ready to register to the hub\r\nzalenium    | 09:36:13.352 [main] INFO  o.o.g.i.utils.SelfRegisteringRemote - Registering the node to the hub: http://localhost:4444/grid/register\r\n.....zalenium    | ......09:36:14.791 [qtp1564698139-15] INFO  d.z.e.z.p.BrowserStackRemoteProxy - [BS] Getting account max. concurrency from https://www.browserstack.com/automate/plan.json\r\nzalenium    | 09:36:14.800 [AutoStartProxyPoolPoller] INFO  d.z.e.z.p.DockeredSeleniumStarter - Created container [zalenium_Q7du15] with dimensions [(1930, 1090)] and tz [sun.util.calendar.ZoneInfo[id=\"Pacific/Auckland\",offset=43200000,dstSavings=3600000,useDaylight=true,transitions=156,lastRule=java.util.SimpleTimeZone[id=Pacific/Auckland,offset=43200000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=8,startDay=-1,startDayOfWeek=1,startTime=7200000,startTimeMode=1,endMode=3,endMonth=3,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=1]]].\r\nzalenium    | 09:36:14.801 [AutoStartProxyPoolPoller] INFO  d.z.e.z.proxy.AutoStartProxySet - Created ContainerCreationStatus [isCreated=true, containerName=zalenium_Q7du15, containerId=7e060ee94ed402659c6beb5b97b9a347a1cf75cbc19865adf5e5ce4fd41a29e7, nodePort=40000].\r\nzalenium    | 09:36:14.802 [Thread-14] INFO  d.z.e.z.registry.ZaleniumRegistry - Registered a node http://hub-cloud.browserstack.com:80\r\nzalenium    | 09:36:14.847 [main] INFO  o.o.g.i.utils.SelfRegisteringRemote - The node is registered to the hub and ready to use\r\n..zalenium    | Browser Stack node started!\r\nzalenium    | Starting BrowserStackLocal...\r\nzalenium    | Waiting for BrowserStack tunnel to start...\r\n........zalenium    | ............09:36:17.542 [Thread-16] INFO  d.z.e.z.registry.ZaleniumRegistry - Registered a node http://172.20.0.3:40000\r\nzalenium    | 09:36:17.543 [Thread-16] INFO  d.z.e.z.proxy.AutoStartProxySet - Registered a container 7e060ee94ed402659c6beb5b97b9a347a1cf75cbc19865adf5e5ce4fd41a29e7 http://172.20.0.3:40000.\r\n..zalenium    | ..09:36:17.903 [AutoStartProxyPoolPoller] INFO  d.z.e.z.proxy.AutoStartProxySet - Container zalenium_Q7du15 started after 3102.\r\n....zalenium    | .....BrowserStack tunnel started! (wait-browserstack.sh)\r\nzalenium    | TestingBot not enabled...\r\nzalenium    | Zalenium is now ready!\r\n+ echo 'Zalenium started! Ready to run some tests!'\r\nZalenium started! Ready to run some tests!\r\nzalenium    | 09:36:32.630 [qtp1564698139-15] INFO  o.o.g.w.s.handler.RequestHandler - Got a request to create a new session: Capabilities {browserName: chrome, highlight: true, name: Can create an account succe..., platform: WINDOWS, version: }\r\nzalenium    | 09:36:32.631 [qtp1564698139-15] INFO  d.z.e.z.registry.ZaleniumRegistry - Adding sessionRequest for {name=Can create an account successfully, browserName=chrome, highlight=true, version=, platform=WINDOWS}\r\nzalenium    | 09:36:32.633 [Matcher thread] INFO  d.z.e.z.p.CloudTestingRemoteProxy - Test will be forwarded to BrowserStack, {name=Can create an account successfully, browserName=chrome, highlight=true, version=, platform=WINDOWS}\r\nzalenium    | 09:36:32.634 [Matcher thread] INFO  org.openqa.grid.internal.TestSlot - Trying to create a new session on test slot {browserName=BrowserStack, maxInstances=5, platformName=ANY}\r\nzalenium    | 09:36:32.635 [Matcher thread] INFO  d.z.e.z.registry.ZaleniumRegistry - Test session with internal key 4a6a64b4-fc8c-4544-a769-d1885bf794da assigned to remote () after 0 seconds (36 ms).\r\nzalenium    | 09:36:32.641 [Forwarding 4a6a64b4-fc8c-4544-a769-d1885bf794da (int. key, remote not contacted yet.) to http://hub-cloud.browserstack.com:80/wd/hub at 9:36:32 AM] INFO  d.z.e.z.p.CloudTestingRemoteProxy - Currently using 1 parallel sessions towards BrowserStack. Attempt to start one more.\r\nzalenium    | 09:36:32.655 [qtp1564698139-15] INFO  o.o.g.w.s.handler.RequestHandler - Error forwarding the new session new session request for webdriver should contain a location header or an 'application/json;charset=UTF-8' response body with the session ID.\r\nzalenium    | org.openqa.grid.common.exception.GridException: new session request for webdriver should contain a location header or an 'application/json;charset=UTF-8' response body with the session ID.\r\nzalenium    | \tat org.openqa.grid.internal.TestSession.updateHubIfNewWebDriverSession(TestSession.java:404)\r\nzalenium    | \tat org.openqa.grid.internal.TestSession.forward(TestSession.java:248)\r\nzalenium    | \tat org.openqa.grid.web.servlet.handler.RequestHandler.forwardNewSessionRequestAndUpdateRegistry(RequestHandler.java:91)\r\nzalenium    | \tat org.openqa.grid.web.servlet.handler.RequestHandler.process(RequestHandler.java:114)\r\nzalenium    | \tat org.openqa.grid.web.servlet.DriverServlet.process(DriverServlet.java:86)\r\nzalenium    | \tat org.openqa.grid.web.servlet.DriverServlet.doPost(DriverServlet.java:70)\r\nzalenium    | \tat javax.servlet.http.HttpServlet.service(HttpServlet.java:707)\r\nzalenium    | \tat javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\r\nzalenium    | \tat org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:860)\r\nzalenium    | \tat org.seleniumhq.jetty9.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)\r\nzalenium    | \tat io.prometheus.client.filter.MetricsFilter.doFilter(MetricsFilter.java:170)\r\nzalenium    | \tat org.seleniumhq.jetty9.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)\r\nzalenium    | \tat org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:533)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\nzalenium    | \tat org.seleniumhq.jetty9.security.SecurityHandler.handle(SecurityHandler.java:548)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.session.SessionHandler.doHandle(SessionHandler.java:1595)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)\r\nzalenium    | \tat org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:473)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.session.SessionHandler.doScope(SessionHandler.java:1564)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1155)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.handler.StatisticsHandler.handle(StatisticsHandler.java:169)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.Server.handle(Server.java:530)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:347)\r\nzalenium    | \tat org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:256)\r\nzalenium    | \tat org.seleniumhq.jetty9.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)\r\nzalenium    | \tat org.seleniumhq.jetty9.io.FillInterest.fillable(FillInterest.java:102)\r\nzalenium    | \tat org.seleniumhq.jetty9.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)\r\nzalenium    | \tat org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)\r\nzalenium    | \tat org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)\r\nzalenium    | \tat org.seleniumhq.jetty9.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)\r\nzalenium    | \tat org.seleniumhq.jetty9.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)\r\nzalenium    | \tat org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)\r\nzalenium    | \tat org.seleniumhq.jetty9.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)\r\nzalenium    | \tat java.lang.Thread.run(Thread.java:748)\r\n\r\n```\r\nThe Zalenium container correctly shows the env variables for browseratck has been set.\r\n\r\nTried running an independent test targeting the browserstack hub url directly with credentials without zalenium and is working fine.\r\n"},"comment":{"url":"https://api.github.com/repos/zalando/zalenium/issues/comments/432583677","html_url":"https://github.com/zalando/zalenium/issues/695#issuecomment-432583677","issue_url":"https://api.github.com/repos/zalando/zalenium/issues/695","id":432583677,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjU4MzY3Nw==","user":{"login":"diemol","id":5992658,"node_id":"MDQ6VXNlcjU5OTI2NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/5992658?v=4","gravatar_id":"","url":"https://api.github.com/users/diemol","html_url":"https://github.com/diemol","followers_url":"https://api.github.com/users/diemol/followers","following_url":"https://api.github.com/users/diemol/following{/other_user}","gists_url":"https://api.github.com/users/diemol/gists{/gist_id}","starred_url":"https://api.github.com/users/diemol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diemol/subscriptions","organizations_url":"https://api.github.com/users/diemol/orgs","repos_url":"https://api.github.com/users/diemol/repos","events_url":"https://api.github.com/users/diemol/events{/privacy}","received_events_url":"https://api.github.com/users/diemol/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T09:27:59Z","updated_at":"2018-10-24T09:27:59Z","author_association":"MEMBER","body":"I tried to reproduce again and I could not, the only thing I found was that if no platform and version is specified for Safari, sometimes it will timeout or produce unexpected results. So I used the following small script and it always work. (Using version 3.14.1 of the Python bindings).\r\n\r\n```\r\nfrom selenium import webdriver\r\ndesired_caps2 = {}\r\ndesired_caps2['version'] = \"ANY\"\r\ndesired_caps2['platform'] = \"ANY\"\r\ndesired_caps2['browserName'] =\"safari\"\r\ndesired_caps2['os_version']=\"High Sierra\"\r\ndesired_caps2['browser_version']=\"11.0\"\r\ndriver = webdriver.Remote('http://localhost:4444/wd/hub', desired_caps2)\r\ndriver.get(\"http://www.python.org\")\r\ndriver.quit()\r\n```\r\n\r\nWhenever you can, please provide detailed instructions on how to reproduce it and reopen the issue. I spent a while and really could not make it fail the way you show it. "}}
{"actor":{"display_login":"diemol"}}