Repository navigation
fix(app): stop PathAccessException from blocking startup - #224
Draft
shroominic wants to merge 3 commits into
Draft
shroominic wants to merge 3 commits into
shroominic wants to merge 3 commits into
Conversation
iOS HealthDatabase prepare had applied FileProtectionType.complete to intermediate OpenGlucose directories, so restricted-state launch could fail closed before first unlock. Use until-first-auth protection, repair the shared product directory on startup, pin path_provider off the FFI/JNI rewrites, and surface identifier-free OS error text on the splash. Co-authored-by: shroominic <shroominic@users.noreply.github.com>
The public Object? field could not be promoted for bootstrapFailureLabel, which broke analyze and every native/web build that compiles main.dart. Co-authored-by: shroominic <shroominic@users.noreply.github.com>
Pinning path_provider_foundation back to the method-channel 2.5.1 build reintroduces the Darwin CocoaPod; commit the CI-resolved lockfiles so iOS and macOS builds stay reproducible. Co-authored-by: shroominic <shroominic@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Startup could die on the splash with
Failed to start: PathAccessExceptionafter restricted storage tried to open under a sharedOpenGlucoseapplication-support directory that an older HealthDatabase prepare had created with iOSFileProtectionType.complete(FileManager applies that attribute to intermediate directories too). A cold start before/around first unlock then fails closed.Changes
PrivacyStorageChannel: usecompleteUntilFirstUserAuthentication, create ancestors without a protection attribute, and repair protection whenever backup exclusion runs.FileHealthStateStore: create/repair/exclude the sharedOpenGlucoseproduct directory before restricted files; mapPathAccessExceptionto an identifier-freeStateError.path_provider_foundationto2.5.1andpath_provider_androidto2.2.23(method-channel impls) until the FFI/JNI rewrites are re-verified on launch.Verification
health_store_teststill needslibsqlite3.soon this agent image (pre-existing env gap; not caused by this change).Risk
R2 (health/device persistence + iOS file protection). Existing installs with a complete-protected
OpenGlucoseparent are repaired on the next successful launch path throughexcludeFromBackup.