Backing up keys makes Element crash
See original GitHub issueDescribe the bug If I restore my backup (doesn’t matter if via QR code or recovery key) the app just keeps crashing all the time. After starting it up again it crashes to fast to send a rageshake, but logcat gives me the following:
10-15 23:01:27.440 4404 4404 V DefaultKeysBackupService: backupKeys: 1 - 64 sessions to back up
10-15 23:01:27.440 4404 4404 V KeysBackupStateManager: KeysBackup: setState: WillBackUp -> BackingUp
10-15 23:01:27.444 4404 4440 V DefaultKeysBackupService$backupKeys: backupKeys: 2 - Encrypting keys
10-15 23:01:27.536 4404 4404 V VectorUncaughtExceptionHandler: Uncaught exception: java.lang.NullPointerException
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: FATAL EXCEPTION Element Build : 206415360
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: Element Version : 1.0.9-dev [206415360] (G-b455)
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: SDK Version : 0.0.1 (7158f49f)
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: Phone : ONEPLUS A6000 (23 10 REL)
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: Memory statuses
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: usedSize 15 MB
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: freeSize 3 MB
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: totalSize 18 MB
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: Thread: main, Exception: java.lang.NullPointerException
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: at org.matrix.android.sdk.internal.crypto.keysbackup.DefaultKeysBackupService.encryptGroupSession(DefaultKeysBackupService.kt:1329)
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: at org.matrix.android.sdk.internal.crypto.keysbackup.DefaultKeysBackupService$backupKeys$1$1.invokeSuspend(DefaultKeysBackupService.kt:1230)
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: at android.os.Handler.handleCallback(Handler.java:883)
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: at android.os.Handler.dispatchMessage(Handler.java:100)
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: at android.os.Looper.loop(Looper.java:214)
10-15 23:01:27.539 4404 4404 E VectorUncaughtExceptionHandler: at android.os.HandlerThread.run(HandlerThread.java:67)
10-15 23:01:27.541 4404 4404 E AndroidRuntime: FATAL EXCEPTION: main
10-15 23:01:27.541 4404 4404 E AndroidRuntime: Process: im.vector.app.debug, PID: 4404
10-15 23:01:27.541 4404 4404 E AndroidRuntime: java.lang.NullPointerException
10-15 23:01:27.541 4404 4404 E AndroidRuntime: at org.matrix.android.sdk.internal.crypto.keysbackup.DefaultKeysBackupService.encryptGroupSession(DefaultKeysBackupService.kt:1329)
10-15 23:01:27.541 4404 4404 E AndroidRuntime: at org.matrix.android.sdk.internal.crypto.keysbackup.DefaultKeysBackupService$backupKeys$1$1.invokeSuspend(DefaultKeysBackupService.kt:1230)
10-15 23:01:27.541 4404 4404 E AndroidRuntime: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
10-15 23:01:27.541 4404 4404 E AndroidRuntime: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
10-15 23:01:27.541 4404 4404 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:883)
10-15 23:01:27.541 4404 4404 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:100)
10-15 23:01:27.541 4404 4404 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
10-15 23:01:27.541 4404 4404 E AndroidRuntime: at android.os.HandlerThread.run(HandlerThread.java:67)
10-15 23:01:27.543 984 4611 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
10-15 23:01:27.543 984 12013 W ActivityTaskManager: Force finishing activity im.vector.app.debug/im.vector.app.features.home.HomeActivity
10-15 23:01:27.561 984 12013 D ActivityTrigger: ActivityTrigger activityPauseTrigger
10-15 23:01:27.572 984 1093 I ActivityManager: Showing crash dialog for package im.vector.app.debug u0
To Reproduce Steps to reproduce the behavior:
- Log into Element Android
- Restore key backup via either QR code or recovery phrase
- Wait for it to crash
Expected behavior No crash
Smartphone (please complete the following information):
- Device: Oneplus 6
- OS: Android 10
Additional context
- App version and store 1.0.9-dev [206415360] GPlay
- Homeserver: Synapse 1.21.1
It might also have something to do with https://github.com/vector-im/element-web/issues/15388
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:5
Top Results From Across the Web
System crash while backing up the database
If the system crashes while you are backing up the database, restart the backup.
Read more >Determining Fault in a Car Crash When Backing Up
According to an NHTSA study, more than 90 percent of car crashes when backing up can be attributed to the driver being unaware...
Read more >Who May Be At Fault for Causing a Backing-Up Crash? - PKSD
Most of the time, the driver backing up will be liable if he or she backs into another vehicle, object or person. However,...
Read more >Frequently asked questions :: Matrix Documentation
Can I manage multiple Matrix-Account on my Element Desktop Client? ... The password that can access the key backup is called the recovery...
Read more >How to Back up and Restore Windows Registry - Netwrix Blog
Check out how to perform Windows registry backup and restore operations using ... The registry contains two basic elements: keys and values.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am having the exactly same issue
Device
App version
The pull request says that it fixes the crash but not the root cause. What is the root cause and is this something we can get rid of ourselves?