Skip to content
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

fix: forward error instead of generating an 'Fatal error' on KeychainError.couldNotAccessKeychain #21

Merged

Conversation

comawill
Copy link
Contributor

This PR changes the error handling in decrypt to forward the error instead of generating an 'Fatal error' on KeychainError.couldNotAccessKeychain.

In certain conditions I noticed that my raivo macos app stopped working/was terminated.

Crash reports revealed:

Raivo_OTP/CryptographyHelper.swift:40: Fatal error: 'try!' expression unexpectedly raised an error: KeychainError.couldNotAccessKeychain

From looking at the time of the crash report, this seems to be very likely related to situations where the system was in sleep mode and the keychain was locked at that point of time.

@tijme tijme merged commit 1ff3e06 into raivo-otp:master Dec 11, 2022
@tijme
Copy link
Contributor

tijme commented Dec 11, 2022

Thank you for taking the time to create a pull request @comawill! 🚀

@comawill comawill deleted the KeychainError.couldNotAccessKeychain branch December 13, 2022 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants