Giter Club home page Giter Club logo

Comments (12)

vinayak-suryawanshi-persistent avatar vinayak-suryawanshi-persistent commented on September 4, 2024 2

Hello everyone. I am able to identify the issue. Actually, in debug/release mode, I’m able to get the authorization and data from debug/release app google fit device but just when I publish it to the google play console for internal testing that time it won't work. so the reason is app is unreviewed. so Google uses its own signing key for that app. so whatever you added SHA key is removed. so the solution is=> go to internal testing=> app release version details and download the apk file. => go to file location=> hit the command keytool -printcert -jarfile 14.apk and copy the SHA key and replace it to OAuth 2.0 Client IDs credentials SHA key. remember whenever the app publish as beta /production remove the SHA key and use your own release SHA key.

Thank you πŸ™

from react-native-google-fit.

samutoljamo avatar samutoljamo commented on September 4, 2024 1

Did you figure this out? We're running into the same exact issue. I installed both the release and debug(apk) version on my phone using adb and they seem to work, but if I upload the .aab to google play store, the authentication fails for some reason.

from react-native-google-fit.

vinayak-suryawanshi-persistent avatar vinayak-suryawanshi-persistent commented on September 4, 2024 1

@ThibautMT yes

from react-native-google-fit.

samutoljamo avatar samutoljamo commented on September 4, 2024

Solved: I had two keys google play store and I had only added one of them. For some reason, someone added a new key and it was not being used but after added the key which was marked "old", I had no issues in the play store version

from react-native-google-fit.

vinayak-suryawanshi-persistent avatar vinayak-suryawanshi-persistent commented on September 4, 2024

Solved: I had two keys google play store and I had only added one of them. For some reason, someone added a new key and it was not being used but after added the key which was marked "old", I had no issues in the play store version

@samutoljamo can you explain in more detail? which key did you change? I am also facing the same issue.

from react-native-google-fit.

samutoljamo avatar samutoljamo commented on September 4, 2024

Hi! By "key" I meant the SHA-1 signature of your app. Locally, we have two different keystores which produce a different signature(debug,release). Google play store also automatically signs your application for you. You can see the SHA-1 signature of your google play app in the portal where you upload your app to google play. I got confused because we had two SHA-1 signatures in google play and the other one was same as our release version but after adding the other SHA-1 from google play, we haven't had any issues

from react-native-google-fit.

vinayak-suryawanshi-persistent avatar vinayak-suryawanshi-persistent commented on September 4, 2024

@samutoljamo I added both debug and release SHA-1 key it won't impact the app but when publishing on the play store without review it won’t work.

BTW thanks for your time and reply

from react-native-google-fit.

ThibautMT avatar ThibautMT commented on September 4, 2024

Hello everyone. I am able to identify the issue. Actually, in debug/release mode, I’m able to get the authorization and data from debug/release app google fit device but just when I publish it to the google play console for internal testing that time it won't work. so the reason is app is unreviewed. so Google uses its own signing key for that app. so whatever you added SHA key is removed. so the solution is=> go to internal testing=> app release version details and download the apk file. => go to file location=> hit the command keytool -printcert -jarfile 14.apk and copy the SHA key and replace it to OAuth 2.0 Client IDs credentials SHA key. remember whenever the app publish as beta /production remove the SHA key and use your own release SHA key.

Thank you πŸ™

Amazing, it working by adding the SHA1 from the internal test apk.
Did you manage to get approved for Google Fit ?

from react-native-google-fit.

rohit4812 avatar rohit4812 commented on September 4, 2024

So work around is we need to create the APK n upload to the google play console ? or do we have any solution for making the aab work with google fit ?

from react-native-google-fit.

dhruvpvx avatar dhruvpvx commented on September 4, 2024

So work around is we need to create the APK n upload to the google play console ? or do we have any solution for making the aab work with google fit ?

To make the AAB work with Google Fit, follow these steps:

  1. If you are not using Google App Signing, it's crucial to ensure you are signing the AAB with the correct keystore.

  2. If you are using Google's App Signing, when you upload the AAB, it will be signed by Google's keystore when users download it.

  3. Go to your Google Play Console and select your app.

  4. Navigate to App Signing in the console.

  5. Find your signature details generated by Google Play.

  6. Copy the SHA1 key.

  7. Go to the Google Console, select the Fitness API, and update the SHA1 key with the one you copied.

This ensures that the AAB works seamlessly with Google Fit.

from react-native-google-fit.

nestorLanex2 avatar nestorLanex2 commented on September 4, 2024

Hi!

I've encountered the same issue and applied the steps above.

I generated a signed release apk to test the Google Fit functionality and it is working as expected.
Then I created a signed aab and uploaded it to playstore for publishing.

I also created a new Oauth 2.0 Client ID for the same package name with the SHA-1 from playstore
Then I tested the playstore app's Google fit function,

It did not work.
Is there something amiss to what I just did ?

from react-native-google-fit.

nestorLanex2 avatar nestorLanex2 commented on September 4, 2024

@dhruvpvx
on step 7, did you just overwrite the SHA1 Key (which i presume was for the release apk/aab build) directly?
or have you added another Oauth 2 Client ID with the same package name ?

currently i tried both ways but nothing's working for me

from react-native-google-fit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.