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

[Health: 10.2.0] 5000: Application needs OAuth consent from the user #1089

Open
tajjacob opened this issue Nov 27, 2024 · 4 comments
Open

[Health: 10.2.0] 5000: Application needs OAuth consent from the user #1089

tajjacob opened this issue Nov 27, 2024 · 4 comments
Labels
bugfix a bug fix

Comments

@tajjacob
Copy link

Plugin Name

health

Plugin Version

10.2.0

Device

OPPO

Operating System

android 12

Describe the bug

the error occured on device: android OPPO Reno4 CPH2113. this issue did not happened in other android device

Steps to Reproduce

use android device OPPO Reno4 CPH2113

Expected Behavior

can read the data from google fit

Actual Behavior

got error as in logs.

Flutter Logs

[ +230 ms] W/FLUTTER_HEALTH::ERROR(22547): There was an error getting the data!
[        ] W/FLUTTER_HEALTH::ERROR(22547): 5000: Application needs OAuth consent from the user
[        ] W/FLUTTER_HEALTH::ERROR(22547): [Ljava.lang.StackTraceElement;@7b1eac6
[ +204 ms] W/FLUTTER_HEALTH::ERROR(22547): There was an error getting the total steps in the interval!
[        ] W/FLUTTER_HEALTH::ERROR(22547): 5000: Application needs OAuth consent from the user
[        ] W/FLUTTER_HEALTH::ERROR(22547): [Ljava.lang.StackTraceElement;@5c7db4
[ +326 ms] W/FLUTTER_HEALTH::ERROR(22547): There was an error getting the data!
[        ] W/FLUTTER_HEALTH::ERROR(22547): 5000: Application needs OAuth consent from the user
[        ] W/FLUTTER_HEALTH::ERROR(22547): [Ljava.lang.StackTraceElement;@151ed52

Screenshots

No response

Flutter Doctor Output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.4, on macOS 15.1.1 24B91 darwin-arm64, locale en-MY)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] VS Code (version 1.95.3)
[✓] VS Code (version 1.96.0-insider)
[✓] Connected device (7 available)
[✓] Network resources

Additional Information

No response

@tajjacob tajjacob added the bugfix a bug fix label Nov 27, 2024
@iarata iarata changed the title [<HEALTH> <10.2.0>] 5000: Application needs OAuth consent from the user [Health: 10.2.0] 5000: Application needs OAuth consent from the user Nov 27, 2024
@iarata
Copy link
Contributor

iarata commented Nov 27, 2024

The steps to reproduce the issue are not clear. How are you using the health? are you just running the example app?
Additionally, try to update to the latest package version and see if it resolves the issue or not (If you're also using Google Fit, we do not support it in the health package anymore.)

@tajjacob
Copy link
Author

@iarata

  1. I'm using my own code to get steps, calories and distance from google fit. it works fine for other android devices. the app already in playstore for almost a year now. I just noticed this issue when I try run it on OPPO reno4 device(android 12). Usually I'm using redmi 12 pro device (android 13) for debugging and it run ok.
  2. I'm planning to upgrade the plugin to latest version but it will takes some times because need to enforce users to install google health connect since not everyone have latest version of android.
  3. does it affected the google OAuth consent screen when migrating to google health connect?

@iarata
Copy link
Contributor

iarata commented Nov 28, 2024

@tajjacob if I remember you would needed to get authenticated (Google OAuth Consent) for Google Fit if you want to read/write health data. However, we have removed the support for Google Fit since v11.0.

@tajjacob
Copy link
Author

tajjacob commented Dec 3, 2024

@iarata I already did the authentication Google OAuth Consent. what I mean is, if we start using google health connect, does we need to get authenticated (Google OAuth Consent)? I already go through the documentation but didn't find any info related to the OAuth consent.

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

No branches or pull requests

2 participants