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

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

Closed
grote opened this issue Jun 19, 2024 · 4 comments · Fixed by #764
Closed

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

grote opened this issue Jun 19, 2024 · 4 comments · Fixed by #764
Assignees
Labels
Milestone

Comments

@grote
Copy link
Collaborator

grote commented Jun 19, 2024

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 grote added bug needs info Requires more information from reporter labels Jun 19, 2024
@grote grote added this to the 3.x milestone Jun 19, 2024
@grote
Copy link
Collaborator Author

grote commented Jun 19, 2024

@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
Copy link

DDvO commented Jun 23, 2024

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.

@UjuiUjuMandan
Copy link

@grote To reproduce, just add one more space after any word then Verify.

This is very easy to happen, especially if you use Gboard, tapping any candidate word automatically adds one more space.

@grote
Copy link
Collaborator Author

grote commented Oct 3, 2024

Thanks so much @UjuiUjuMandan, that's really helpful!

@grote grote removed the needs info Requires more information from reporter label Oct 3, 2024
@grote grote self-assigned this Oct 3, 2024
@grote grote closed this as completed in #764 Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants