Description
Bug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.0.0
node: 6.10.1
os: win32 x64
@angular/common: 4.1.2
@angular/compiler: 4.1.2
@angular/core: 4.1.2
@angular/forms: 4.1.2
@angular/http: 4.1.2
@angular/platform-browser: 4.1.2
@angular/platform-browser-dynamic: 4.1.2
@angular/router: 4.1.2
@angular/cli: 1.0.0
@angular/compiler-cli: 4.1.2
Repro steps.
- Must have an out of date web driver or delete it from
node_modules/protractor/node_modules/webdriver-manager/selenium/
. For example, if using Chrome webdriver, delete allchrome*
files in this selenium folder. - Must be behind a proxy, but without HTTPS_PROXY or https_proxy environment variables set.
- Using the proxy guide described in the cli wiki, create a
proxy.conf.js
file to pass tong e2e
. - Run
ng e2e --proxy-config proxy.conf.js
.
If you are behind a proxy and https_proxy is not set, the command will fail after compiling the app. This is because by default, ng e2e
will run webdriver-manager update
to fetch the right browser drivers, but does not use the proxy config to do so.
The log given by the failure.
$ ng e2e --proxy-config proxy.conf.js
** NG Live Development Server is running on http://localhost:49152 **
Hash: 95e0fe13c75ed4802b8b
Time: 17998ms
chunk {0} 0.chunk.js, 0.chunk.js.map 491 kB {3} [rendered]
chunk {1} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 237 kB {5} [initial] [rendered]
chunk {2} styles.bundle.js, styles.bundle.js.map (styles) 226 kB {5} [initial] [rendered]
chunk {3} main.bundle.js, main.bundle.js.map (main) 8.25 kB {4} [initial] [rendered]
chunk {4} vendor.bundle.js, vendor.bundle.js.map (vendor) 3.12 MB [initial] [rendered]
chunk {5} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
webpack: Compiled successfully.
events.js:160
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 172.217.8.16:443
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
Desired functionality.
ng e2e
should pass along proxy configuration to webdriver-manager when the --webdriver-update
flag is set to true. For webdriver-manager, the flag to use is --proxy
.
Mention any other details that might be useful.
The code that calls webdriver-manager is at Line 65 in e2e.ts.