seedvault-app / seedvault

A backup application for the Android Open Source Project.
1.19k stars 73 forks source link

WordCountException: Error: 13 is an invalid word count. #697

Open grote opened 1 week ago

grote commented 1 week ago
06-18 22:21:21.729 13022 13022 E AndroidRuntime: java.lang.AssertionError: cash.z.ecc.android.bip39.Mnemonics$WordCountException: Error: 13 is an invalid word count.
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at com.stevesoltys.seedvault.ui.recoverycode.RecoveryCodeViewModel.validateCode(RecoveryCodeViewModel.kt:65)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at com.stevesoltys.seedvault.ui.recoverycode.RecoveryCodeInputFragment.done(RecoveryCodeInputFragment.kt:141)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at com.stevesoltys.seedvault.ui.recoverycode.RecoveryCodeInputFragment.access$done(RecoveryCodeInputFragment.kt:41)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at com.stevesoltys.seedvault.ui.recoverycode.RecoveryCodeInputFragment$onViewCreated$2.onClick(RecoveryCodeInputFragment.kt:122)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at android.view.View.performClick(View.java:7729)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at android.view.View.performClickInternal(View.java:7706)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at android.view.View$PerformClick.run(View.java:30484)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:959)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:100)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:232)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:317)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:8501)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
06-18 22:21:21.729 13022 13022 E AndroidRuntime: Caused by: cash.z.ecc.android.bip39.Mnemonics$WordCountException: Error: 13 is an invalid word count.
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at cash.z.ecc.android.bip39.Mnemonics$MnemonicCode.validate(Mnemonics.kt:108)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    at com.stevesoltys.seedvault.ui.recoverycode.RecoveryCodeViewModel.validateCode(RecoveryCodeViewModel.kt:63)
06-18 22:21:21.729 13022 13022 E AndroidRuntime:    ... 15 more
grote commented 1 week ago

@DDvO from the above log, it looks like you tried to validate your recovery code and made the app crash. somehow it received 13 instead of 12 words. do you have a way to reproduce this crash?

DDvO commented 1 week ago

I just tried reproducing this, manually re-doing backup two times. The two new logs do no more contain "Error: 13 is an invalid word count." And on further tries, where for the third one "Backup my files" was enabled, I immediately just get "Backup failed".

Really weird how a word count other than 12 could came up. In particular since the word count cannot be influenced by the user.