-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep HostId in memory #303
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #303 +/- ##
=======================================
- Coverage 93.3% 93.2% -0.1%
=======================================
Files 1095 1095
Lines 22962 22966 +4
Branches 77 77
=======================================
Hits 21427 21427
- Misses 1521 1525 +4
Partials 14 14
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent job tracking this one down! 👏
This is part of fixing the issue with user seeing Claim Profile prompt on iOS.
The root cause of the issue is that the iOS Wallet fails to resolve the host id and then we do consider that profile needs to be claimed. While this might be wrong assumption, just changing that to true is not the most correct fix.
The iOS wallet will fail to resolve the host id when the app is in background, as the access to the keychain is not allowed while the app is in background. We will try to resolve the host id every 15 minutes, which is the interval we do check for profile claim.
So this bug happens in a very specific scenario - when user moves the app to background somewhere at 13-14 minute - and when at 15 minute mark the wallet tries to resolve the host id, the following error is thrown by the secure storage:
The fix, is to resolve the host id at boot time and then just read it from memory throughout the app lifecycle. Additionally, failing to resolve the host id is not considered a breaking error - even more, it is highly unlikely that the app will fail to perform secure storage operations at boot time.