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

[AN] 재설치 시 저장소 접근 크래시 발생 #379

Closed
SeongHoonC opened this issue Aug 17, 2023 · 0 comments · Fixed by #381
Closed

[AN] 재설치 시 저장소 접근 크래시 발생 #379

SeongHoonC opened this issue Aug 17, 2023 · 0 comments · Fixed by #381
Assignees
Labels
AN 안드로이드에 관련된 작업 USER 🐛 버그 버그에 관련된 작업

Comments

@SeongHoonC
Copy link
Member

✨ 세부 내용

오류 발생 과정
로그인 -> 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 되지 않도록 제외

⏰ 예상 소요 시간

2시간

@SeongHoonC SeongHoonC added AN 안드로이드에 관련된 작업 USER 🐛 버그 버그에 관련된 작업 labels Aug 17, 2023
@SeongHoonC SeongHoonC linked a pull request Aug 17, 2023 that will close this issue
SeongHoonC added a commit that referenced this issue Aug 17, 2023
* feat: 12 이상 AutoBackup 제외

* feat: 11 이하 AutoBackup 제외
@SeongHoonC SeongHoonC self-assigned this Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AN 안드로이드에 관련된 작업 USER 🐛 버그 버그에 관련된 작업
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant