[AN/USER] fix: 재설치 크래시 버그 수정(#379) #381
Merged
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.
📌 관련 이슈
✨ PR 세부 내용
오류 발생 과정
로그인 -> EncryptedSharedPreference 에 토큰 저장-> 앱 삭제 -> 재설치 -> 토큰 저장소 접근
Crashlytics 에서 원인 분석
Caused by android.security.KeyStoreException Signature/MAC verification failed
구글링 결과
tink-crypto/tink#535 (comment)
tink-crypto/tink#535 (comment)
공식 문서
https://developer.android.com/guide/topics/data/autobackup#IncludingFiles
문제 인식
sharedPreference 가 default 로 backup 되는데 EncryptedSharedPreference 를 다시 불러올 때 암호화 할 때 사용한 키가 유효하지 않음.
해결 방법
allowBackup = “false” -> 문제는 데이터 백업 안됨 패스
try catch 로 잡고 EncryptedSharedPreference 재설정
EncryptedSharedPreference 가 Auto Backup 되지 않도록 제외