Problem installing Google Plus plugin


#1

Hello Everyone,
When i try to install the plugin with this command

ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=myid..

i get this error message

Failed to install 'cordova-plugin-googleplus': Error: Variable(s) missing: WEB_APPLICATION_CLIENT_ID
at Object.mergeVariables (C:\Users\Hamza\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\variable-merge.js:58:15)
    at C:\Users\Hamza\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\plugman\install.js:315:44
    at _fulfilled (C:\Users\Hamza\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
    at self.promiseDispatch.done (C:\Users\Hamza\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
    at Promise.promise.promiseDispatch (C:\Users\Hamza\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
    at C:\Users\Hamza\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44
    at flush (C:\Users\Hamza\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
(node:6032) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Variable(s) missing: WEB_APPLICATION_CLIENT_ID
(node:6032) [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.

#2

According to the docs (https://github.com/EddyVerbruggen/cordova-plugin-googleplus/blob/master/README.md#4-installation-phonegap-cli--cordova-cli ) you need to supply a WEB_APPLICATION_CLIENT_ID variable.


#3

How can i find the value ?


#4

It looks like from here: https://github.com/EddyVerbruggen/cordova-plugin-googleplus/blob/master/README.md#browser

That you generate it using the google dev console.


#5

I understood that its the same as REVERSED_CLIENT_ID and i just have to add my url adress … am i right ?


#6

Nope create an app in google developer console
Use this link

https://pointdeveloper.com/add-ionic-login-google-apps/


#7

After you have found it, install the plugin like this

ionic cordova plugin add cordova-plugin-googleplus --variable REVERSED_CLIENT_ID=com.googleusercontent.apps.RaNdOmVaLuEs --variable WEB_APPLICATION_CLIENT_ID=RaNdoMvAlUeS.apps.googleusercontent.com

:slight_smile: