question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Backing up keys makes Element crash

See original GitHub issue

Describe 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:

  1. Log into Element Android
  2. Restore key backup via either QR code or recovery phrase
  3. 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:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:5

github_iconTop GitHub Comments

2reactions
v411ecommented, Oct 25, 2020

I am having the exactly same issue

10-25 08:01:07.259 31889 31889 E AndroidRuntime: FATAL EXCEPTION: main
10-25 08:01:07.259 31889 31889 E AndroidRuntime: Process: im.vector.app, PID: 31889
10-25 08:01:07.259 31889 31889 E AndroidRuntime: java.lang.NullPointerException
10-25 08:01:07.259 31889 31889 E AndroidRuntime: 	at org.matrix.android.sdk.internal.crypto.keysbackup.DefaultKeysBackupService$backupKeys$1$1.invokeSuspend(DefaultKeysBackupService.kt:11)
10-25 08:01:07.259 31889 31889 E AndroidRuntime: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
10-25 08:01:07.259 31889 31889 E AndroidRuntime: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:15)
10-25 08:01:07.259 31889 31889 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:873)
10-25 08:01:07.259 31889 31889 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
10-25 08:01:07.259 31889 31889 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:193)
10-25 08:01:07.259 31889 31889 E AndroidRuntime: 	at android.os.HandlerThread.run(HandlerThread.java:65)
10-25 08:01:14.557 32041 32041 E AndroidRuntime: FATAL EXCEPTION: main
10-25 08:01:14.557 32041 32041 E AndroidRuntime: Process: im.vector.app, PID: 32041
10-25 08:01:14.557 32041 32041 E AndroidRuntime: java.lang.NullPointerException
10-25 08:01:14.557 32041 32041 E AndroidRuntime: 	at org.matrix.android.sdk.internal.crypto.keysbackup.DefaultKeysBackupService$backupKeys$1$1.invokeSuspend(DefaultKeysBackupService.kt:11)
10-25 08:01:14.557 32041 32041 E AndroidRuntime: 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
10-25 08:01:14.557 32041 32041 E AndroidRuntime: 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:15)
10-25 08:01:14.557 32041 32041 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:873)
10-25 08:01:14.557 32041 32041 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
10-25 08:01:14.557 32041 32041 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:193)
10-25 08:01:14.557 32041 32041 E AndroidRuntime: 	at android.os.HandlerThread.run(HandlerThread.java:65)
10-25 08:01:14.561 32041 32051 I im.vector.app: Background concurrent copying GC freed 64433(3MB) AllocSpace objects, 8(544KB) LOS objects, 50% free, 8MB/17MB, paused 108us total 134.468ms

Device

  • Oneplus A3003 (Android 9.0.4)

App version

  • GPlay 1.0.9
1reaction
witchentcommented, Nov 2, 2020

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found