Skip to content

Wrong URL Path causes Proxy error. #2437

@marcioarend

Description

@marcioarend

Meta - Wrong URL Path causes Proxy error.

OS:

Selenium Version:

Browser:

Browser Version:

Expected Behavior -

I am using selenium with Browserstack with Node to test my angular programm.
I am working in a Company and we are behind a Proxy.
I tested the conection from my computer with Browserstack with Nightwatch and it worked perfect.

But when I tried to use Selenium I faced a Proxy error. I am trying to solve this problem for almost 3 days until today, when I found the problem.

Actual Behavior -

The problem was in the URL path:
in the Node.js BrowserStack example we have this URL
usingServer('http://hub-cloud.browserstack.com/wd/hub').
but my proxy shown only
/wd/hub/session

I think I found the problem by
http/index.js (line 273)
var path = this.options_.path; if (path[path.length - 1] === '/' && httpRequest.path[0] === '/') { path += httpRequest.path.substring(1); } else { path += httpRequest.path; // hier we have only the path, without host }

I have done this
path = "http://" + this.options_.host + path;

and its worked

Steps to reproduce -

Use the example from BrowserStack
https://www.browserstack.com/automate/node

Set the proxy
usingWebDriverProxy("your Proxy 8080").

Error

Der folgende Fehler wurde beim Versuch die URL /wd/hub/session zu holen festgestellt:

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-nodejsJavaScript Bindings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions