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

GoogleFit.getXXXSamples(options) returns with no data #333

Open
edvardmk opened this issue Dec 26, 2022 · 1 comment
Open

GoogleFit.getXXXSamples(options) returns with no data #333

edvardmk opened this issue Dec 26, 2022 · 1 comment

Comments

@edvardmk
Copy link

edvardmk commented Dec 26, 2022

Hi, as some people reported in earlier issues, there are specific circumstances in which some of the get_XXX_Samples(options) methods return without data. I tested different setups and could narrow down the error to the following in my case:

The method fails silently returning an empty array after a runtime for about 1 minute, if the interval between startDate and endDate of the options object is bigger than ~7,3 years.

In case endDate is not provided, it will be set to now, e.g. new Date() and the same problems occurred. These are the max intervals I could determine for some of the functions:
getActivitySamples 2637 days
getBloodPressureSamples 2672 days
getDailyNutritionSamples 2678 days
getDailyStepCountSamples fails/works inconsistently, but roughly around 2637 days
getWeightSamples 2686 days

getBloodGlucoseSamples and getHeightSamples don't seem to have an issue with huge intervals and I didn't test the other methods.

I hope this helps hunt down the bug and in the meantime helps others working around this issue. Also thanks for the great work so far on this library!

@shmkane
Copy link

shmkane commented Feb 21, 2024

#207 (comment) does this 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

2 participants