CodetrixStudio / CapacitorGoogleAuth

Capacitor plugin for Google Auth. Lightweight & no dependencies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

something went wrong

GOLHS opened this issue · comments

error Error: Something went wrong
at returnResult (VM3:912:32)
at win.androidBridge.onmessage (VM3:887:21)

Facing the same issue with error code 10
I have tried all the web client id, server client id, android client id and everything, replacing them with each other.
Still the same error.

I also faced the same problem

just now i clear it that issue!

https://velog.io/@agnusdei1207/angular-ionic-capacitor-google-oauth2-plugin-feat.-android-ios

sha-1 key issue..!
only use android studio tool gradle and use gradle signingReport

The sha-1 key continues to change depending on how it is generated.
The most stable method is the above method.

Facing the same issue. Not sure what it is as it was working before. Did anybody find a solution?

image

Same problem here...
Couldn't find any solution yet.

@RobinRosculete

I was struggling with this error for hours!!! But then, while checking the demo and following the readme.md, I realized that I was missing a configuration in a file: android/app/src/main/res/values/strings.xml

In the demo, you can find it at: https://github.com/CodetrixStudio/CapacitorGoogleAuth/blob/master/demo/android/app/src/main/res/values/strings.xml

Once I added the with the Google clientId, everything started to work :)

Good day <3

Finally managed to make it work!!
Ionic - vue

  1. under android/app/build.gradle make sure to change applicationId and have your UNIQUE application ID
  2. run cd android > ./gradlew signInReport
    Scroll all the way up(!!!!) and copy the sha1 key of the debug varient
  3. open your browser with https://console.cloud.google.com/apis/credentials
    create android(!) credentials,
    VERY IMPORTANT:
    use the same applicationId from android/app/build.gradle and use the SHA1.
    save...

WE ARE NOT GOING TO USE THE ANDROID KEY BUT WITHOUT IT CapacitorGoogleAuth WILL NOT WORK.

in your app just use your web credentials (!!!)

Error 10 comes from Google API exception, and it signals that the android package name and sha1 are not valid

Thank you @alon42, this worked for me. To further clarify step 2 for the next person the SHA1 I needed was specifically the one under > Task :app:signingReport.

Thank you so much @alon42, It finally worked !

I have done all of the above and even followed @agnusdei1207 's awesome instructions and still I get Something went wrong Error 10.
Has anyone else found any other solutions?

@kristophbarbour
Error 10 comes from the Google API itself.

I was desperate enough to find its source code when I searched for this problem 3 weeks ago, and it comes from having bad Android credentials. when there is something wrong with your ApplicationId with the SHA1.

make sure you are using:

a. google WEB credentials in the Capacitor config.
b. you created an android credentials WITHOUT using them.
b1. Under Android credentials, you use a unique Application Id (I failed there) from android/app/build.gradle.
b2. you are using the correct SHA from the output of cd android and then ./gradlew signInReport.
b3. you wait enough time to let the cache in Google servers clear itself (they day 5 minutes).

Actually, i am also totally confused about google signing in ionic app but, i got to know solution by several tries, i finally discovered that the debug keystore SHA1 only works in the emulator

Here,

1.debug keystore SHA1 works only in emulator (to get debug keystore SHA1 in terminal enter this commands cd android and then ./gradlew signInReport)

  1. release keystore SHA1 works only in app.release.apk (to get release keystore SHA1 in terminal enter this commands keytool -keystore ./my-release-key.keystore -list -v )
    (In commands this “./my-release-key.keystore” is path of production keystore path)

  2. In live playstore SHA1 works only in live app (Downloaded For playstore) (to get live playstore SHA1 Go to Play store Console and setup >> App signing (inside App signing you have App signing key certificate >>SHA-1 certificate fingerprint )

we should change SHA1 of Android SHA-1 signing certificate fingerprint. accordingly, in https://console.cloud.google.com (APIs & Services>>Credentials>>OAuth 2.0 Client IDs)

Please make sure clear app data and try 2 times while checking login functionality

Screenshot_20240507-155245

I have done all of the above and even followed @agnusdei1207 's awesome instructions and still I get Something went wrong Error 10. Has anyone else found any other solutions?

Please check #332 (comment)

Facing the same issue with error code 10 I have tried all the web client id, server client id, android client id and everything, replacing them with each other. Still the same error.

#332 (comment)

error Error: Something went wrong at returnResult (VM3:912:32) at win.androidBridge.onmessage (VM3:887:21)

#332 (comment)

Facing the same issue with error code 10 I have tried all the web client id, server client id, android client id and everything, replacing them with each other. Still the same error.

#332 (comment)