element-android icon indicating copy to clipboard operation
element-android copied to clipboard

[SSSS] User password is asked multiple times then the app crashes when trying to reset the recovery key.

Open yostyle opened this issue 1 year ago • 3 comments

Steps to reproduce

case 1:

  1. Go to Settings > Security & Privacy
  2. In Secure Backup section tap on "Set up on this device".
  3. Choose "Reset everything"
  4. Tap on "Proceed to resest"
  5. Select "Use a Security Key"
  6. Enter your password

https://github.com/element-hq/element-android/assets/1191674/c1927459-a64c-4f03-8701-2f3dc43148e4

case 2:

  1. secure_backup_required is enabled in wellknown configuration
  2. Log in to Element Android
  3. Choose "Reset everything"
  4. Tap on "Proceed to resest"
  5. Select "Use a Security Key"
  6. Enter your password

https://github.com/element-hq/element-android/assets/1191674/8914c624-80eb-40f3-a174-2af753594af2

Outcome

What did you expect?

Get a recovery key

What happened instead?

User password is asked multiple times and the app crashes.

bootstrapTask invoked from startInitializeFlow method is called multiple times :

  • https://github.com/element-hq/element-android/blob/e3a878155b3808207e0fee8a5da89bc2b62e5ce2/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSharedViewModel.kt#L225
  • https://github.com/element-hq/element-android/blob/e3a878155b3808207e0fee8a5da89bc2b62e5ce2/vector/src/main/java/im/vector/app/features/crypto/recover/BootstrapSharedViewModel.kt#L297

Your phone model

Pixel 8 Pro

Operating system version

Android 14

Application version and app store

Element 1.6.16

Homeserver

matrix.org

Will you send logs?

No

Are you willing to provide a PR?

No

yostyle avatar Jul 08 '24 11:07 yostyle