question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android Error: {"message":"Something went wrong"}

See original GitHub issue

Condition: Pop up selection for google account appeared. Returning from pop up selection, error.

Device:

  • Android 7.0

On application load: E/Capacitor/Plugin/Console: Unhandled Promise rejection: Cannot read property 'content' of undefined ; Zone: <root> ; Task: null ; Value: {} TypeError: Cannot read property 'content' of undefined at HTMLScriptElement.<anonymous> (http://localhost/google-sign-in-google-sign-in-module.js:79:84) at Generator.next (<anonymous>) at http://localhost/google-sign-in-google-sign-in-module.js:52:71 at new ZoneAwarePromise (http://localhost/polyfills.js:3272:29) at push../node_modules/@codetrix-studio/capacitor-google-auth/dist/esm/web.js.__awaiter (http://localhost/google-sign-in-google-sign-in-module.js:48:12) at gapi.load (http://localhost/google-sign-in-google-sign-in-module.js:77:34) at https://apis.google.com/js/platform.js:18:214 at Sa (https://apis.google.com/js/platform.js:10:467) at Y (https://apis.google.com/js/platform.js:18:197) at Array.E.(anonymous function) (https://apis.google.com/js/platform.js:18:297)

On google signing in: E/Capacitor/Plugin: Something went wrong com.google.android.gms.common.api.ApiException: 10: at com.google.android.gms.common.internal.ApiExceptionUtil.fromStatus(Unknown Source) at com.google.android.gms.auth.api.signin.GoogleSignIn.getSignedInAccountFromIntent(Unknown Source) at com.codetrixstudio.capacitor.GoogleAuth.GoogleAuth.handleOnActivityResult(GoogleAuth.java:62) at com.getcapacitor.Bridge.onActivityResult(Bridge.java:720) at com.getcapacitor.BridgeActivity.onActivityResult(BridgeActivity.java:209) at android.app.Activity.dispatchActivityResult(Activity.java:6919) at android.app.ActivityThread.deliverResults(ActivityThread.java:4226) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4273) at android.app.ActivityThread.-wrap20(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1597) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:203) at android.app.ActivityThread.main(ActivityThread.java:6324) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1085) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:946) E/Capacitor/Plugin/Console: ERROR Error: Uncaught (in promise): Object: {"message":"Something went wrong"}

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
fullstackduckcommented, Jul 2, 2019

Hi @atmosuwiryo, I would suggest putting a breakpoint in the catch block of GoogleAuth.java & get specifically (at least) the status code returned.

If I am picking it right tho, com.google.android.gms.common.api.ApiException: 10: at seems to yield status code 10, which means your API key is not properly configured to be used in your app.

You will need to authenticate your client. Once you get the SHA-1 you will need to set it in Google Console Credentials for your Android key. Then use the WebClient Key in string.xml as explained in ReadMe.

I will close this issue as it looks like a configuration issue. Feel free to reopen it if you have status code other than 10.

3reactions
atmosuwiryocommented, Sep 30, 2019

I just reused this plugin today. Found same error, but solved.

I was using android key in the strings.xml, it should be “web client id” like in this documentation https://github.com/CodetrixStudio/CapacitorGoogleAuth#android

Thank you for your help @Venryx @parveenkhtkr

I also found that there is different return value on success, between android and iOS. I got “name” on iOS and “displayName” on android.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix 'Something Went Wrong, Try Again' Error in Google ...
On the Google Play Store App info page in the settings app, tap the vertical three dots menu at the top-right corner. Then,...
Read more >
[9 Ways] Fix Google Play Store “Something Went Wrong Try ...
#1 Restart Google Play Store or Your Device; #2 Check Network Connection; #3 Match Date and Time; #4 Sign out and Sign in...
Read more >
7 Best Fixes for Google Play Store Something Went Wrong Try ...
Fix Google Play Store Something Went Wrong Try Again Error ; 1. Open the Settings app on your Android phone. ; 2. Scroll...
Read more >
How to fix the “something went wrong” error in the Google ...
There are a few things you can try if you're seeing the Something went wrong error message in the Google Play Store. ·...
Read more >
How to Fix 'Something Went Wrong, Please Try Again' Error in ...
How To Fix 'Something Went Wrong, Please Try Again' Error in Google Play Store · Method 1: Internet Connection · Method 2: Relaunch...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found