Ioniv-v4 : ionic cordova plugin add cordova-plugin-googleplus

Hello All,

This command is not working with IONIC-v4-BETA, please help on this issue, details mentioned below.

Command

ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=REV_KEY

COMMAND ERROR

PS C:\ROOT\yaflix\Source\DEV\yaflix> ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=com.googleusercontent.apps.****************************************
> cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=com.googleusercontent.apps.********************************** --save
(node:10740) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! syscall read
npm ERR! network read ECONNRESET
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\JACK\AppData\Roaming\npm-cache\_logs\2018-08-08T05_42_29_829Z-debug.log
    at ChildProcess.whenDone (C:\Users\JACK\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:10740) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10740) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
PS C:\ROOT\yaflix\Source\DEV\yaflix>

ERROR LOG


0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'view',
1 verbose cli   'cordova-plugin-googleplus',
1 verbose cli   '--json' ]
2 info using npm@5.6.0
3 info using node@v8.11.3
4 silly mapToRegistry name cordova-plugin-googleplus
5 silly mapToRegistry using default registry
6 silly mapToRegistry registry https://registry.npmjs.org/
7 silly mapToRegistry data { type: 'tag',
7 silly mapToRegistry   registry: true,
7 silly mapToRegistry   where: undefined,
7 silly mapToRegistry   raw: 'cordova-plugin-googleplus',
7 silly mapToRegistry   name: 'cordova-plugin-googleplus',
7 silly mapToRegistry   escapedName: 'cordova-plugin-googleplus',
7 silly mapToRegistry   scope: undefined,
7 silly mapToRegistry   rawSpec: '',
7 silly mapToRegistry   saveSpec: null,
7 silly mapToRegistry   fetchSpec: 'latest',
7 silly mapToRegistry   gitRange: undefined,
7 silly mapToRegistry   gitCommittish: undefined,
7 silly mapToRegistry   hosted: undefined }
8 silly mapToRegistry uri https://registry.npmjs.org/cordova-plugin-googleplus
9 verbose request uri https://registry.npmjs.org/cordova-plugin-googleplus
10 verbose request no auth needed
11 info attempt registry request try #1 at 13:40:52
12 verbose request id 3a2f8f44d2716443
13 http request GET https://registry.npmjs.org/cordova-plugin-googleplus
14 info retry will retry, error on last attempt: Error: connect ETIMEDOUT 104.16.24.35:443
15 info attempt registry request try #2 at 13:41:24
16 http request GET https://registry.npmjs.org/cordova-plugin-googleplus
17 info retry will retry, error on last attempt: Error: read ECONNRESET
18 info attempt registry request try #3 at 13:42:25
19 http request GET https://registry.npmjs.org/cordova-plugin-googleplus
20 verbose stack Error: read ECONNRESET
20 verbose stack     at _errnoException (util.js:992:11)
20 verbose stack     at TLSWrap.onread (net.js:618:25)
21 verbose cwd C:\ROOT\yaflix\Source\DEV\yaflix
22 verbose Windows_NT 10.0.17134
23 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "view" "cordova-plugin-googleplus" "--json"
24 verbose node v8.11.3
25 verbose npm  v5.6.0
26 error code ECONNRESET
27 error errno ECONNRESET
28 error syscall read
29 error network read ECONNRESET
30 error network This is a problem related to network connectivity.
30 error network In most cases you are behind a proxy or have bad network settings.
30 error network
30 error network If you are behind a proxy, please make sure that the
30 error network 'proxy' config is set properly.  See: 'npm help config'
31 verbose exit [ 1, true ]

IONIC INFO


Ionic:

   ionic (Ionic CLI)          : 4.0.3 (C:\Users\JACK\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.0
   @angular-devkit/core       : 0.7.0-rc.3
   @angular-devkit/schematics : 0.7.0-rc.3
   @angular/cli               : 6.0.8
   @ionic/ng-toolkit          : 1.0.0
   @ionic/schematics-angular  : 1.0.1
Cordova:

   cordova (Cordova CLI) : 8.0.0   Cordova Platforms     : none

System:

   NodeJS : v8.11.3 (C:\Program Files\nodejs\node.exe)
   npm    : 5.6.0
   OS     : Windows 10

Environment:

   ANDROID_HOME : not set

cordova plugins ls

cordova-plugin-device 2.0.2 "Device"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.0.2 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"

Very much looks like a problem on your side.

Can you open https://registry.npmjs.org/cordova-plugin-googleplus in the browser?

Issue Resolved!!!

Seems Like Network Problem

Have you changed something with network ? Like DNS or something ? is so please make it to default settings this is network issue it only happen when you have changed some settings or else this https issue can you do one thing ?

Run this command npm config edit
This will open the file in CMD and find the registry it will be something like this registry=https://registry.npmjs.org/
If there is https then make it http and if url for registry is something like github then change it to this registry.npmjs.org/ let me the know result
Hope this work

Thanks