Closed hagen00 closed 1 month ago
We will implement a fix for this ASAP.
Could you please test my draft PR in #1048 to see if it resolves the issue? If so, I will release it after updating the documentation to say we throw an exception in this situation.
With Health 9.0.1, I am able to do the following:
I'm not sure that throwing an error and "forcing" the user to install HC is the solution. Flutter code will run on devices such as Huawei, where installing HC is not possible. Also, for some apps, having HC integration is not vital, i.e it's totally fine if the user does not install HC.
This is to reopen this issue: https://github.com/cph-cachet/flutter-plugins/issues/1032
My comment there is: I recently upgraded from 9 to 11 and now it crashes on my emulator, API 33 as well with the same error:
E/AndroidRuntime(21677): kotlin.UninitializedPropertyAccessException: lateinit property healthConnectClient has not been initialized
Surely this needs fixing? If Health Connect not installed it shouldn't crash the entire app? I'm not sure at this stage if this will happen in production as well, but my most recent update to Huawei was rejected due to a crash and it may be related to this. The update to Google Play is not live yet; I'm hoping that the app doesn't crash on production, if a user doesn't have Health Connect installed.
Seems like a P1 issue to me?
I'm reverting back to using Health 9.0.1. It's been stable and seemingly working well. Things working fine on emulator again and I suspect this will fix the Huawei crash as well.