You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
I got browserstack behind a proxy working using browserstack local and setting the webDriverProxy.
The test runs fine and I can see my test on browserstack. After the test run, protractor tries to update the status of the run to browserstack. At this point it hangs and results in a timeout: ETIMEDOUT causing protractor to exit with a uncaught exception.
After some debugging I traced the error to driverProviders/browserStack.js line 48. The request to browserstack hangs and times-out. It seems like the https request does not use the proxy.
According to this site "http://blog.vanamco.com/proxy-requests-in-node-js/" it is not possible to use a proxy with https (security issue). One should use a tunnel via the proxy for the https traffic. There is a dependency, suggested in the blog post, that does this called https-proxy-agent (https://www.npmjs.com/package/https-proxy-agent).
By adding the dependency and this small piece of code in broserStack.js after the options (line 47) : if(_this.config_.webDriverProxy !== undefined){ options.agent = new HttpsProxyAgent(_this.config_.webDriverProxy); }
I got the update working and the test succeed.
Steps to reproduce the bug
Set-up a browserstack test with a proxy and local browserstack.
Use the new protractor browserstack settings (Remove seleniumAddress from your config and use the --browserstackUser and --browserstackKey)
The text was updated successfully, but these errors were encountered:
I would edit /lib/driverProviders/browserStack.ts. If you plan to use https-proxy-agent node_module, add it to the package.json as a dependency.
We will review it. Also, it appears that @types/https-proxy-agent does not exist, you could do one of the following:
create the DefinitelyTyped definition and add @types/https-proxy-agent as a devDependency.
const httpsProxyAgent = require('https-proxy-agent'). If you plan to go through this route, make sure to add a comment with // TODO: fix when @types/https-proxy-agent is published. Since types are not known, you'll have to set many of the definitions to any.
I have exactly the same bug/problem and it would be helpful to have it fixed.
The fix seems good to me.
Is it mandatory to wait for the Type version of https-proxy-agent or is it possible to make the PR with only the actual version of https-proxy-agent ?
I got browserstack behind a proxy working using browserstack local and setting the webDriverProxy.
The test runs fine and I can see my test on browserstack. After the test run, protractor tries to update the status of the run to browserstack. At this point it hangs and results in a timeout: ETIMEDOUT causing protractor to exit with a uncaught exception.
After some debugging I traced the error to driverProviders/browserStack.js line 48. The request to browserstack hangs and times-out. It seems like the https request does not use the proxy.
According to this site "http://blog.vanamco.com/proxy-requests-in-node-js/" it is not possible to use a proxy with https (security issue). One should use a tunnel via the proxy for the https traffic. There is a dependency, suggested in the blog post, that does this called https-proxy-agent (https://www.npmjs.com/package/https-proxy-agent).
By adding the dependency and this small piece of code in broserStack.js after the options (line 47) :
if(_this.config_.webDriverProxy !== undefined){ options.agent = new HttpsProxyAgent(_this.config_.webDriverProxy); }
I got the update working and the test succeed.
The text was updated successfully, but these errors were encountered: