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.

Hi Ziqiao,

We are still working with the user to capture the sysdiagnose and will attach it to FB22221658 as soon as we have it.

I'm just following up on this issue and the feedback report (FB22221658). Has the HealthKit engineering team had a chance to review the ticket yet? Let me know if you need any additional information from our end.

I also get same error only for certain users.

@rohitkowadkar: Thanks for following up. The issue is still under the investigation of the HealthKit team, and there is nothing we can share for now. For folks (@ affle) who are seeing the same issue, I'd suggest that you file your own feedback report to voice the impact. Thanks.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

I found one more clue, it only happens over 26.3.

Customer inquiries keep coming in. We don't even have a proper guide, so please solve it quickly.

Hi Ziqiao,

Thanks again for the previous update.

I wanted to follow up on this as it has been a couple of weeks. Has the HealthKit team been able to isolate the cause or provide a rough timeline for a fix?

Thanks for your continued help.

Best regards, Rohit Kowadkar

Hello We have attached the system diagnostic report from the clients device to feedback report thread FB22221658 please escalate the investigation for this error.

I have the same phenomenon. I wonder if there is anything confirmed about it

Hi Ziqiao, checking in on this issue. The requested sysdiagnose has been uploaded to the associated Feedback ticket. Looking forward to your insights whenever you have a chance to review it.

@DTS Engineer

In my iOS app, I query HealthKit step count using HKStatisticsCollectionQueryDescriptor with .cumulativeSum. I’m seeing a reproducible issue where daily aggregation returns an empty HKStatisticsCollection for recent step-count data, while hourly aggregation for the same date range can return valid data, and HKSampleQuery can also retrieve the underlying step samples.

This does not appear to be an authorization issue, because other HealthKit data types are available and step samples can be read. It also does not appear to be a time zone boundary issue: the device time zone is Asia/Shanghai (UTC+8), and the queried date ranges are local-day ranges such as 2026-06-14 00:00:00 to 2026-06-14 23:59:59.

Observed behavior:

  • HKStatisticsCollectionQueryDescriptor for stepCount, intervalComponents = DateComponents(day: 1), returns 0 buckets / 0 total steps.
  • HKStatisticsCollectionQueryDescriptor for stepCount, intervalComponents = DateComponents(hour: 1), can return valid hourly buckets for some dates in the same period.
  • HKSampleQuery for stepCount can retrieve raw step samples for dates where the daily statistics query returns empty.
  • No error is thrown by descriptor.result(for:). The query succeeds but returns an empty statistics collection.

Expected behavior: Daily cumulative step-count statistics should include buckets for days that contain step samples, or at least be consistent with the hourly aggregation and raw samples for the same date range.

Example logs: [HealthKitSteps] daily statistics result range=2026-06-14 00:00:00...2026-06-14 23:59:59 interval=1d buckets=0 valuedBuckets=0 total=0 [HealthKitSteps] daily statistics result range=2026-06-13 00:00:00...2026-06-13 23:59:59 interval=1d buckets=0 valuedBuckets=0 total=0 [HealthKitSteps] hourly statistics result range=2026-06-09 00:00:00...2026-06-09 23:59:59 interval=1h buckets=9 valuedBuckets=9 total=3379 [HealthKitSteps] hourly statistics result range=2026-06-08 00:00:00...2026-06-08 23:59:59 interval=1h buckets=3 valuedBuckets=3 total=6216

Query details:

  • Quantity type: HKQuantityTypeIdentifier.stepCount
  • Statistics option: .cumulativeSum
  • Daily query interval: DateComponents(day: 1)
  • Hourly query interval: DateComponents(hour: 1)
  • Predicate: HKQuery.predicateForSamples(withStart: startOfLocalDay, end: endOfLocalDay, options: .strictStartDate)
  • Anchor date: startOfLocalDay
  • Device time zone: Asia/Shanghai (UTC+8)
Unable to invalidate interval: no data source available error when fetching steps using HKStatisticsCollectionQuery
 
 
Q