Skip to content
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

Installation Steps Incomplete (Expo installation) #110

Closed
patrick1011 opened this issue Jun 25, 2019 · 9 comments
Closed

Installation Steps Incomplete (Expo installation) #110

patrick1011 opened this issue Jun 25, 2019 · 9 comments

Comments

@patrick1011
Copy link

patrick1011 commented Jun 25, 2019

Hi,

Thanks for your work on the library. I'm trying to get it working on my expokit (ejected expo application) but am having some difficulties. GoogleFit.authorize() is rejected with message...

{
  "message": "Authorization cancelled",
  "success": false,
}

when I tap my e-mail address in the auth flow.

I've read through issues in the repo, one of which (#90) mentions that

the client_secrets.json file generated after the https://developers.google.com/fit/android/get-api-key process should be store exactly at this location

The installation steps make no mention of this fact however. And neither does https://developers.google.com/fit/android/get-api-key as of June 25th 2019. There is also a discussion in (#47) about the location of a client_secrets.json file.

Any ideas what we may have missed? If there is something I'm happy to add to the README with the complete steps necessary.

@thowthoww
Copy link

Same issue here.

@wuodland
Copy link

Go here and setup your correct sha1 key. Follow steps as mentioned on Stack Overflow: https://stackoverflow.com/questions/15727912/sha-1-fingerprint-of-keystore-certificate

@jguix
Copy link
Contributor

jguix commented Jul 28, 2019

I had to perform some additional steps:

  1. select Android as application type.
  2. enter your SHA-1 certificate's fingerprint. To get the SHA1 execute in a shell terminal:
    keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
  3. enter your app package name.
  • Install the Google Fit app on the device / emulator.
  • Synchronize data in the Google Fit application (eg see all activities of the last month). Even if your data is in the cloud, you installed Google Fit and logged in, this step is necessary for the data to come through the library.

@fega
Copy link

fega commented Jul 29, 2019

Same Issue Here :/

@fega
Copy link

fega commented Jul 29, 2019

Hello again!, after some hours looking for a solution I got the problem.

Expo Ejected Apps have their own debug.keystore located in the root of the generated android folder.

so you can use this command to get the SHA1 key:

keytool -list -v -keystore ./debug.keystore -alias androiddebugkey -storepass android -keypass android

@StasDoskalenko I think this info worth it to add it in the install instructions and maybe renaming this thread as "Expo Installation" also could make easier for anyone looking for help :)

@StasDoskalenko StasDoskalenko changed the title Installation Steps Incomplete Installation Steps Incomplete (Expo installation) Jul 29, 2019
@JoelOnGithub
Copy link

JoelOnGithub commented Sep 18, 2019

Hi,

I am also getting { success: false, message: 'Authorization cancelled' } as a response, after I sign in with my google account in the android app. I have followed all the necessary steps to create a client id. However, I did not do anything with the client id. Is that supposed to be the case?

Thanks for the help

Schermafbeelding 2019-09-18 om 15 16 31

@akiladevinda
Copy link

@JoelOnGithub I have still facing the same issue. If any solutions ?

@antoinedelp
Copy link

Hi, I was experiencing the same issue. In my case, everything was working fine in development, but I could not make it work in production. The problem was that I was using Signed Bundle, which made my SHA different from the one in my keystore.

If you are also using app signing, make sure to add the correct signing to your Google API Credentials!
Find more info about this issue here

@ibrag474
Copy link

ibrag474 commented Sep 6, 2022

I have the same problem, adding SHA-1 to credentials at Google Cloud console does not help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants