CapacitorGoogleAuth icon indicating copy to clipboard operation
CapacitorGoogleAuth copied to clipboard

Getting error Something went wrong, code: 10 - ISSUE HAPPENING AGAIN - SHA1 KEY ADDED ALREADY - STILL ISSUE PERSISTS - #291 RE-HAPPENING

Open aoneahsan opened this issue 1 year ago • 12 comments

just for record

i have added the "SHA1" key of android studio "the debug key", the SHA1 key of released apk

i used these commands to get the SHA1 keys

to get the android studio debug SHA1 key keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android

to get the bundled apk SHA1 key keytool -printcert -jarfile app-release.apk

and yes i know about the play store signing key as well.

right now, i'm trying to make this package work on android emulator, and i'm getting this "code:10, message: 'something went wrong'" error

this is the package version i'm using "@codetrix-studio/capacitor-google-auth": "^3.3.6",

and these are the capacitor packages versions "@capacitor/android": "^6.1.0", "@capacitor/app": "6.0.0", "@capacitor/clipboard": "^6.0.0", "@capacitor/core": "6.1.0",

aoneahsan avatar Jul 16 '24 17:07 aoneahsan

exactly the same issue here :/

theophane-girard avatar Aug 20 '24 19:08 theophane-girard

I thought it was just me not being able to figure it out.

hobobemo avatar Aug 23 '24 16:08 hobobemo

Same issue here, I'll share my versions:

  • "@capacitor/android": "6.1.2",
  • "@capacitor/app": "6.0.1",
  • "@capacitor/core": "6.1.2",
  • "@codetrix-studio/capacitor-google-auth": "^3.4.0-rc.4",

If anyone solves this please share your solution. I'm working with an OAuth2 certificate generated on a Google Cloud Console project. I'm not using firebase.

To get the SHA-1 I did a different approach. I generated a key store with android studio, and I have a .jks file. Don't know if that changes something, but either way here is the command I used to get the SHA-1:

keytool -keystore <filename>.jks -list -v

I first tested with the SHA-1 fingerprint of the App signing key certificate generated by Google Play, but that didn't work. I suspect that it doesn't work because I am not using that certificate anywhere in my app so far. The only thing linking my app and the Google Play App should be the appId which I assume is not enough.

The OAuth client was first generated with the SHA-1 from Google Play. It did not work, I got the same error code 10. I then changed the SHA-1 to the one of my key store, but it is still failing

almiavicas avatar Sep 11 '24 06:09 almiavicas

did you find a solution?

veneliniliev avatar Sep 24 '24 15:09 veneliniliev

I did find a solution, published in another ticket. I'm not in my computer right now so I can't provide you a link

almiavicas avatar Sep 25 '24 02:09 almiavicas

i had this, only solution i found was to use debug key because it's not possible to override it i think

goemul39 avatar Sep 25 '24 12:09 goemul39

@almiavicas are you talking about this one ? issue 332

theophane-girard avatar Sep 25 '24 15:09 theophane-girard

That's the one!

almiavicas avatar Sep 25 '24 15:09 almiavicas

worked for me by following this: https://github.com/CodetrixStudio/CapacitorGoogleAuth/issues/332#issuecomment-2027415202

theophane-girard avatar Sep 30 '24 18:09 theophane-girard

I have the same problem. Keys are in sync but still no clue what is wrong.

selcukbeyhan avatar Nov 18 '24 13:11 selcukbeyhan

I have the same problem. Keys are in sync but still no clue what is wrong.

I found the issue is with the usage of consistent client IDs. the documentation is not clear which client ID to use where for which platform. For login on Android, I used web client ID everywhere: capacitor.config.ts, app.component.ts and strings.xml For login on iOS, I used the iOS client ID in the app.component.ts and in the info.plist but my capacitor.config.ts has the web client ID as it is same as in Android. Then the login seems to be working.

selcukbeyhan avatar Nov 19 '24 08:11 selcukbeyhan

this issue can be solved in a very easy way be it any stack, React Native or Android Native so basically when you use the google console you have to create the client on every kind of certiification that you use in the project How to get those client with the SHA-1's use this

cd android ./gradlew signingReport

then you will get the debug SHA-1 Release SHA-1 so you need to create client/credentials for these 2 SHA-1's in the GC Now the problem that after downloading its not working ? so go to Google Play Console --> Project--> Test and Release --> App integrity

scroll down to Play app signing Go to Settings

now add a new client/credentials with a third Key certificate SHA-1 in Google Console it will start working Thanks

Utkarshsingh001 avatar Oct 31 '25 09:10 Utkarshsingh001