Unable to invalidate interval: no data source available error when fetching steps using HKStatisticsCollectionQuery

While attempting to read a user’s daily step history spanning backward to the last 7 days, a small but consistent subset of users encounter Error Code 3 with the underlying error description:

Error Code 3

"Unable to invalidate interval: no data source available."

When this error occurs, we are entirely unable to read their step history. We have received ~10 direct user reports of this within the last couple of weeks.

Thanks for reporting the issue. The error indicates that HealthKit lost the cached data source information, which is an implementation detail inside the framework.

Do you have a feedback report yet? If not, would you mind to file one with a sysdiagnose, and share your report ID here? You can following the instruction here to install the profile and capture a sysdiagnose from a device that reproduces the issue.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Thank you for the follow-up.

We are currently unable to reproduce this issue on our end.

However, we have a user who is able to consistently reproduce it. We have already reached out to them and asked them to share their logs using steps from instructions and are currently waiting to hear back.

In the meantime, is there anything specific we can do to get more detailed logs directly from our app via that user?

In this case, I think the logs from your app probably doesn't help, because the data source thing is internal to the framework...

You can start with filing the feedback report to hopefully get a response from the HealthKit team, and then attach the sysdiagnose later once you get it.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Thanks, That makes sense. I've gone ahead and filed the report; the feedback ID is FB22221658. I'll attach the sysdiagnose to the ticket as soon as it's ready.

Unable to invalidate interval: no data source available error when fetching steps using HKStatisticsCollectionQuery
 
 
Q