cph-cachet / flutter-plugins

A collection of Flutter plugins developed by CACHET
527 stars 625 forks source link

[health: ^10.2.0] Error: There was an error getting the total steps in the interval! #976

Open aruns2896 opened 3 weeks ago

aruns2896 commented 3 weeks ago

Health

Device

Please complete the following information for each phone and/or emulator you're experiencing this bug on:

Describe the bug

I was able to fetch the data for the first time through Health Connect and after that, when I closed my app and reopened the error came

W/FLUTTER_HEALTH::ERROR( 8417): There was an error getting the total steps in the interval! W/FLUTTER_HEALTH::ERROR( 8417): 4: The user must be signed in to make this API call. W/FLUTTER_HEALTH::ERROR( 8417): [Ljava.lang.StackTraceElement;@562665d

int? steps = await healthFactory.getTotalStepsInInterval(currentDate, currentDate.add(Duration(hours: 23, minutes: 59, seconds: 59)));

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.19.0, on Microsoft Windows [Version 10.0.22631.3593], locale en-IN) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [√] Chrome - develop for the web [X] Visual Studio - develop Windows apps [√] Android Studio (version 2023.3) [√] VS Code (version 1.89.1) [√] Connected device (4 available) ! Device emulator-5554 is offline. [√] Network resources

! Doctor found issues in 1 category.