mllrsohn / gulp-protractor

gulp wrapper for protractor tests
MIT License
136 stars 82 forks source link

webdriver_update_specific ignores proxy settings #132

Closed Bisdow closed 7 years ago

Bisdow commented 7 years ago

Hi, i work behind a corporate proxy and it is not possible (at least for me :-) ) to get "webdriver update" working.

My setup is the following: node 6.10.3 I use protractor (5.1.2) and gulp-protractor (4.1.0). Protractor is installed globaly, but also localy in the node_modules of the project directory.

In node the settings for proxy and https_proxy are allready done.

My gulp file uses the protractor version out of the local node_modules, so that other developers do not have to install protractor globaly.

My gulp code:

const webdriver_update = require('gulp-protractor').webdriver_update_specific;

gulp.task('e2eWebdriverUpdate', [], webdriver_update({
    webdriverManagerArgs: [
        '--proxy http://myProxy.myCompany.de:1234',
        '--chrome'
    ]
}));

When i run the task, as long as i am behind the corporate proxy, i get the following error:

[13:22:41] Starting 'e2eWebdriverUpdate'... events.js:160 throw er; // Unhandled 'error' event ^

Error: connect ETIMEDOUT 216.58.207.80:443 at Object.exports._errnoException (util.js:1018:11) at exports._exceptionWithHostPort (util.js:1041:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14) [13:23:03] 'e2eWebdriverUpdate' errored after 22 s [13:23:03] Error: 1 at formatError (C:\Programmieren\Z_Workplace\Protractor_Test\node_modules\gulp\bin\gulp.js:169:10) at Gulp. (C:\Programmieren\Z_Workplace\Protractor_Test\node_modules\gulp\bin\gulp.js:195:15) at emitOne (events.js:96:13) at Gulp.emit (events.js:188:7) at Gulp.Orchestrator._emitTaskDone (C:\Programmieren\Z_Workplace\Protractor_Test\node_modules\orchestrator\index.js:264:8) at C:\Programmieren\Z_Workplace\Protractor_Test\node_modules\orchestrator\index.js:275:23 at finish (C:\Programmieren\Z_Workplace\Protractor_Test\node_modules\orchestrator\lib\runTask.js:21:8) at ChildProcess.cb (C:\Programmieren\Z_Workplace\Protractor_Test\node_modules\orchestrator\lib\runTask.js:29:3) at ChildProcess.g (events.js:292:16) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:191:7) at maybeClose (internal/child_process.js:886:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

Process finished with exit code 1

When i start the same task being not behind the proxy, it works fine.

When i start webdriver-manager update proxy http://myProxy.myCompany.de:1234 directly from the console (then it uses the global protractor version), it also works fine beeing behind the proxy.

Perhaps you could help me with this issue ?

Thank you in advance and warm regards Jan

Bisdow commented 7 years ago

I found a solution:

It has to be

        '--proxy=http://myProxy.myCompany.de:1234',

instead of

        '--proxy http://myProxy.myCompany.de:1234',

even if it works without the equal sign at the command line.