HealthKit error: Domain error = Code = 100 "Failed to open database" UserInfo = {NSLocalizedDescription = Failed to open database}

When trying to authorize using the HealthKit API, we get an error on some devices. The call to [HKHealthStore requestAuthorizationToShareTypes:] fails with the following error, and the system code "Allow health access" will never be presented:

Domain Error = Code = 100 "Failed to open database" UserInfo = {NSLocalizedDescription = Failed to open database}

We have a device capable of playing it consistently, even after the force has stopped running applications and restarted the OS. The phone doesn't seem to be able to connect to HealthKit from any 3rd party apps, so it looks like a bug in HealthKit and not on our side. This seems to only happen on some devices, but there doesn't seem to be anything special about devices (all iPhones 4s and up run iOS 9, 9.0.1, 9.0.2, or 9.1)

My question is, has anyone else seen this error, and if so, what did you do to fix or mitigate the problem?


source to share

2 answers

This was an iOS bug and was fixed in iOS 9.3 beta 2. Developers can download the beta from or wait for the 9.3 update available to everyone.



I have an answer from Apple on my bug report ticket (for the case where restarting the device fixes the problem):

The workaround is to reboot the device. The developer cannot directly solve the problem.



All Articles