-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed Authorization #47
Comments
@dominiquera ensure you've followed all the instructions: https://developers.google.com/fit/android/get-api-key |
@StasDoskalenko thanks for following up. I have created an OAuth client id with my SHA1 debug key (from .android dir but also copied this key in the android/keystore directory that in the react native folder) and put in the package name found in the manifest. Then put the client_secret.json file in android/app folder (do I need to name it differently?). I have also enabled "Fitness API" in the Api services. Do I need to make any additional configuration? Also I ran "react-native link react-native-google-fit" before actually adding the certificate if that could cause the issue... Regards |
@dominiquera actually, you must carefully follow manual installation as well |
@StasDoskalenko Did that. Checked that everything has been set up correct |
@dominiquera |
@StasDoskalenko same error persists unfortunately. I have also tried adding path, password and alias to local.properties file in android dir. Not sure how to debug the error to get a more helpful message |
@dominiquera Your error is definitely about you've missed something from Google FIT API authentication steps. Try to start from the scratch and follow Google Documentation carefully. |
I have finally found the issue. The setup was all correct but I was running react-native run-android with "sudo" because I didn't give full permission. That had several consequences for example the variables I added to the bash_profile were not read and I had to create a properties file pointing to the sdk. So I think by running with sudo something was not read correctly or loaded into the build path. Thanks for your help @StasDoskalenko |
@dominiquera you're welcome. Yeah in general almost all errors are caused by inattention :) |
Hi,
I am getting following error:
RNGoogleFit: Authorization - Failed Authorization Mgr:ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{b70bd65: android.os.BinderProxy@ef1db09}, message=null}`
startResolutionForResult() is being called and I can click on my google account to sign in but onActivityResult() always receives RESULT_CANCELED.
I am still quite new in react native and would really appreciate some help :)
Thank you
The text was updated successfully, but these errors were encountered: