Ionic cordova platform add android - Unsupported proxy protocol : "xxx.xx.xx.xxx"


#1
ionic cordova platform add android
> cordova platform add android --save
√ Running command - done!
> ionic cordova resources android --force
√ Collecting resource configuration and source images - done!
√ Filtering out image resources that do not need regeneration - done!
× Uploading source images to prepare for transformations - failed!
TypeError: unsupported proxy protocol: "xxx.xx.xx.xxx"
    at new ProxyAgent (C:\Users\estagiario2\AppData\Roaming\npm\node_modules\@ionic\cli-plugin-proxy\node_modules\proxy-agent\index.js:109:11)
    at ProxyAgent (C:\Users\estagiario2\AppData\Roaming\npm\node_modules\@ionic\cli-plugin-proxy\node_modules\proxy-agent\index.js:81:45)
    at Request.proxy (C:\Users\estagiario2\AppData\Roaming\npm\node_modules\@ionic\cli-plugin-proxy\node_modules\superagent-proxy\index.js:71:15)
    at Object.<anonymous> (C:\Users\estagiario2\AppData\Roaming\npm\node_modules\ionic\node_modules\@ionic\cli-utils\lib\http.js:31:17)
    at next (native)
    at fulfilled (C:\Users\estagiario2\AppData\Roaming\npm\node_modules\ionic\node_modules\tslib\tslib.js:100:62)
    at process._tickCallback (internal/process/next_tick.js:109:7)

Any help?


#2

Could it be that you have set a proxy ENV variable to “xxx.xx.xx.xxx”?


#3

Yes. I erased the env variables and now I have a new error (bah!) when I start a new project:

 Installing dependencies may take several minutes!
> npm i
× Running command - failed!
[ERROR] An error occurred while running npm i (exit code 1):


        npm ERR! code EPROTO
        npm ERR! errno EPROTO
        npm ERR! request to http://xxx.xx.xx.xxx:8080/@angular%2fcommon failed, reason: write EPROTO
        101057795:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:openssl\ssl\s23_clnt.c:797:
        npm ERR!

        npm ERR! A complete log of this run can be found in:
        npm ERR!     C:\Users\estagiario2\AppData\Roaming\npm-cache\_logs\2017-10-23T08_13_49_329Z-debug.log

Any clue?


#4

Still something with the request, I would guess maybe something left in the proxy configuration?


#5

Yap! That’s correct! But I uninstalled node and npm. Started from the beginning and it’s working fine now! :slight_smile: Thanks :blush: