ionic-team / ionic-app-lib

The library used for using ionic apps - consumed by the CLI and the GUI
44 stars 79 forks source link

Fix for 'package download' failing with proxy #100

Open errant01 opened 8 years ago

errant01 commented 8 years ago

The call to requestProgess which handles the actual file download is missing the proxy parameter that allows it to work from behind proxies. This PR adds the parameter. It has been tested in my proxy environment and resolves the problem.

Error received before fix: 16:12:47 + ionic package download 5 16:12:49 16:12:49 Error: tunneling socket could not be established, cause=write EPROTO 140355477145408:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794: 16:12:49 16:12:49 at ClientRequest.onError (/var/lib/jenkins/.nvm/versions/node/v4.4.3/lib/node_modules/ionic/node_modules/tunnel-agent/index.js:176:17) 16:12:49 at ClientRequest.g (events.js:260:16) 16:12:49 at emitOne (events.js:77:13) 16:12:49 at ClientRequest.emit (events.js:169:7) 16:12:49 at TLSSocket.socketErrorListener (_http_client.js:256:9) 16:12:49 at emitOne (events.js:77:13) 16:12:49 at TLSSocket.emit (events.js:169:7) 16:12:49 at onwriteError (_stream_writable.js:313:10) 16:12:49 at onwrite (_stream_writable.js:331:5) 16:12:49 at WritableState.onwrite (_stream_writable.js:89:5) 16:12:49 16:12:49 tunneling socket could not be established, cause=write EPROTO 140355477145408:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:794: 16:12:49 (CLI v1.7.14)