cordova-plugin-googleplus
cordova-plugin-googleplus copied to clipboard
Error 10, but cert is correct
getting error 10 on login
getSigningCertificateFingerprint returns the same finderprint that in console building with build.phonegap.com
Google console android section (in config.xml set android-packageName="com.thailandpavillion.android")
getSigningCertificateFingerprint screenshot
Google console web section
code screenshot
Does anyone have a fix for this?
I also started thread at Adobe forums - https://forums.adobe.com/thread/2352379
guys, any ideas?
I have the same error. If I see the Android Studio console, I have the error:
You have wrong OAuth2 related configurations, please check. Detailed error: INVALID_AUDIENCE
Can anybody help me?
+1
Same error in ionic 3 app
catch return error 10 only
@EddyVerbruggen please help us
I found the issue for me. Ensure that in firebase console you authorized google login and paste your sha key inside for both dev (unsagnied) and prod apk (signed)
Solution taken from here: https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/243#issuecomment-245908012
For Debug, before signing/to test your app locally
keytool -exportcert -keystore ~/.android/debug.keystore -list -v
password: android
For production you have a different SHA1 code. I had an already published app in the play store, but didnt know what SHA1 code it was using. Solution was to sign with a different keystore and upload it to the releases page. The playstore will tell you exactly what is the correct SHA1 key used to sign the release apk. I know its weird to do it like this, but it worked.
If someone knows how to directly get the SHA1 for the release key, please fill me in.
Once you have any apk (even prod)
You can launch this command
keytool -list -printcert -jarfile <your apk>
I've faced same issue. And fixed it with proper cert signing. SHA-1 fingerprint of this cert should be defined in Google APIs console.
Hint: you may force Cordova (in fact gradle) to build dev apk with same production certificate:
cordova run android --device -- --keystore=./path_to_keysore/keystore.jks --storePassword=****** --password=****** --alias=your_alias
it seems google now resigns the apk's , i fixed it by creating extra credentials with the SHA1 found under: App Signing in the play developer console.
@jeroen79 could you explain a little bit more on how you got things to work? I found the app signing section of android developer console, but haven't figured out how to properly export my key, or if I even have to?
@tbabich were you able to solve your issue?
look at the screenshot, the bottom one is the one i signed my app with, but the top one is the one google signed the app with it published in the store.
@amit777 I've solved this by generating app for Android by cocoon.js
@jeroen79 Thanks! take SHA-1 from app signing - solved my issue
http://cheonbrave.blogspot.kr/2017/10/android-cordova-plugin-googleplus-10.html
@aborovsky Thanks! Signing my APK when running debug - Solved my issue
My Problem 'Error: 10' is solved. @speedfl thanks, dude.
I have been stuck with error 10 (DEVELOPER_ERROR), because I was using the Android client ID, I created in the google developer console. The solution for me was to use the Android credentials in google developer console only to indicate the SHA key of my apk and to use the client ID of the Web application credentials from the google developer console in my cordova application.
config.xml:
<plugin name="cordova-plugin-googleplus" spec="^5.3.0">
<variable name="REVERSED_CLIENT_ID" value="com.googleusercontent.apps.[web-application-client-id]" />
<variable name="WEB_APPLICATION_CLIENT_ID" value="[web-application-client-id].apps.googleusercontent.com" />
</plugin>
code:
window.plugins.googleplus.login( { 'webClientId': '[web-application-client-id].apps.googleusercontent.com' }, ...
I don't use firebase.
Mi problema 'Error: 10' está resuelto. @speedfl gracias, amigo.
Thanks @speedfl ! It worked for me.
I'm facing similar issue, it's working great with our debug key and dev credentials but when I use the prod one I'm facing error 10... SHA1 is set correctly, widget id matchs the package name, WEB_APPLICATION_CLIENT_ID is correct (not the android app one) any thought ?
I'm so dumb... I forgot I hardcoded our DEV client_id so when I used our production app the SHA couldn't match...
Same problem i am facing. My SHA-1 key is correct but it still gives the error 10.
i m also getting the same error.....
Once you have any apk (even prod) You can launch this command
keytool -list -printcert -jarfile <your apk>
thank you
Same problem i am facing. My SHA-1 key is correct but it still gives the error 10.
Validate your WIDGET ID in the config.xml, its the package name of Firebase.
<widget id="xxx.xxxxx.xxxxx" ....
This is how I solved it in my case.
-
Generated APK once by running the following command in my project root directory:
C:\myApp>ionic cordova build android --prod
-
Ran this command in the location of my APK file within my project, at command line:
C:\myApp\platforms\android\app\build\outputs\apk\debug> keytool -list -printcert -jarfile app-debug.apk
The above command gave me bunch of Certificate Fingerprints, out of which I copied the one that said:SHA1: 7B:6B:AD:...
-
Visited: Firebase Console and selected the project.
-
Edited Project Settings. A new page loaded with many tabs. Under the General tab, there is a section called "Your apps". Underneath that, my app was listed as I have already added it previously. For this app, I clicked on the blue hyperlink that says "Add fingerprint". Then pasted the copied Fingerprint that was copied in Step 2 above and saved it.
-
Verified if the Certificate was added correctly by visiting: Cloud Console . It appeared under the heading "OAuth 2.0 Client IDs" as "Android client for com.mydomain.myapp (auto created by Google Service)". Clicked the Edit button and that showed me the complete SHA-1 fingerprint that I added.
-
Ran the build and tested and it worked. It wasn't showing the Error 10 any more and in fact, it was returning back the Profile info as I expected!
Hope it helps!
@juhand777 solution worked for me. Even though I manually changed the widget id in config.xml
ionic overwrote it. So I changed all occurrences of io.ionic.starter
to correct package name over the project and this fixed the Google login.
Other things needed to be done as well, like making sure the correct SHA-1 is added to firebase.