Closed breversa closed 2 years ago
Also : Deleting the Signal account fixes nothing, but I can't add it back. Clearing Signal's data then restoring a save and registering again allowed me to resume using Signal, but of course I lost all messages since the last save (hopefully, it was less than a day ago).
+1 also getting that error. I was planning to move to a new device anyways, sadly I don't seem to have a working passphrase for the most recent backup, rendering it useless :/
I also got this crash since yesterday on Signal 5.3.12
; trace is:
java.lang.NullPointerException: Attempt to get length of null array
at org.signal.zkgroup.internal.ByteArray.cloneArrayOfLength(ByteArray.java:32)
at org.signal.zkgroup.internal.ByteArray.<init>(ByteArray.java:20)
at org.signal.zkgroup.profiles.ProfileKey.<init>(ProfileKey.java:25)
at org.thoughtcrime.securesms.crypto.ProfileKeyUtil.getSelfProfileKey(ProfileKeyUtil.java:39)
at org.thoughtcrime.securesms.crypto.UnidentifiedAccessUtil.getAccessForSync(UnidentifiedAccessUtil.java:114)
at org.thoughtcrime.securesms.jobs.MultiDeviceStorageSyncRequestJob.onRun(MultiDeviceStorageSyncRequestJob.java:55)
at org.thoughtcrime.securesms.jobs.BaseJob.run(BaseJob.java:32)
at org.thoughtcrime.securesms.jobmanager.JobRunner.run(JobRunner.java:86)
at org.thoughtcrime.securesms.jobmanager.JobRunner.run(JobRunner.java:49)
which is exactly the same stack as in https://github.com/signalapp/Signal-Android/issues/9557#issuecomment-727869015.
I have the same problem here with LOS 17.1! Problem also occurs when contact sync is triggered in Android:
02-21 10:43:20.196 2273 2273 D Zygote : Forked child process 13606
02-21 10:43:20.200 2711 2793 I ActivityManager: Start proc 13606:org.thoughtcrime.securesms/u0a98 for service {org.thoughtcrime.securesms/org.thoughtcrime.securesms.service.ContactsSyncAdapterService}
02-21 10:43:20.279 13606 13606 W crime.securesm: Insufficient pre-allocated space to mmap vdex.
02-21 10:43:20.304 13606 13606 I MultiDex: VM with version 2.1.0 has multidex support
02-21 10:43:20.304 13606 13606 I MultiDex: Installing application
02-21 10:43:20.304 13606 13606 I MultiDex: VM has multidex support, MultiDex support library is disabled.
02-21 10:43:20.340 13606 13606 I FirebaseInitProvider: FirebaseApp initialization successful
02-21 10:43:20.344 13606 13606 I PartProvider: onCreate()
02-21 10:43:20.346 13606 13606 I BlobContentProvider: onCreate()
02-21 10:43:20.385 13606 13606 I ApplicationContext: Installed AesGcmProvider: 1
02-21 10:43:20.485 13606 13606 V NativeCrypto: Registering org/conscrypt/NativeCrypto's 284 native methods...
02-21 10:43:20.493 13606 13606 I ApplicationContext: Installed Conscrypt provider: 2
02-21 10:43:20.501 13606 13606 W Java7Support: Unable to load JDK7 types (annotations, java.nio.file.Path): no Java7 support added
02-21 10:43:20.603 471 471 W /vendor/bin/hw/android.hardware.keymaster@3.0-service: Not performing software digesting for symmetric cipher keys
02-21 10:43:20.604 471 471 W /vendor/bin/hw/android.hardware.keymaster@3.0-service: Not performing software digesting for symmetric cipher keys
02-21 10:43:20.656 13606 13606 I ApplicationContext: onCreate()
02-21 10:43:20.707 471 471 W /vendor/bin/hw/android.hardware.keymaster@3.0-service: Not performing software digesting for symmetric cipher keys
02-21 10:43:20.825 471 471 I chatty : uid=9999(nobody) keymaster@3.0-s identical 2 lines
02-21 10:43:20.825 471 471 W /vendor/bin/hw/android.hardware.keymaster@3.0-service: Not performing software digesting for symmetric cipher keys
02-21 10:43:20.948 13606 13606 D ApplicationMigrations: Not an update. Skipping.
02-21 10:43:20.952 13606 13606 D CallManager: Loading ringrtc library
02-21 10:43:20.964 13606 13606 I CallManager: CallManager.initialize(): (release build)
02-21 10:43:20.967 13606 13606 I org.webrtc.Logging: NativeLibrary: Loading native library: jingle_peerconnection_so
02-21 10:43:20.969 13606 13606 I org.webrtc.Logging: PeerConnectionFactory: PeerConnectionFactory was initialized without an injected Loggable. Any existing Loggable will be deleted.
02-21 10:43:20.969 13606 13606 I CallManager: CallManager.initialize() returned
02-21 10:43:20.972 13606 13653 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:20.974 13606 13653 I JobDatabase: onOpen()
02-21 10:43:20.979 13606 13606 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:20.980 13606 13606 I KeyValueDatabase: onOpen()
02-21 10:43:20.985 13606 13653 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:20.988 13606 13606 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:20.989 13606 13653 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:20.991 13606 13653 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:20.991 13606 13606 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:20.993 13606 13653 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:20.998 13606 13653 I chatty : uid=10098(org.thoughtcrime.securesms) signal-JobManag identical 2 lines
02-21 10:43:21.000 13606 13653 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:21.001 13606 13606 I IncomingMessageObserver: Initializing! (266821976)
02-21 10:43:21.002 13606 13654 I IncomingMessageObserver: Waiting for websocket state change....
02-21 10:43:21.005 13606 13606 D DynamicTheme: Setting to follow system expecting: 16
02-21 10:43:21.005 13606 13654 D IncomingMessageObserver: Network: true, Foreground: false, FCM: true, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
02-21 10:43:21.006 13606 13606 D CachedInflater: Clearing view cache.
02-21 10:43:21.009 13606 13606 D AppStartup: [init] security-provider: 111 logging: 163 crash-handling: 0 eat-db: 266 app-dependencies: 4 first-launch: 0 app-migrations: 22 ring-rtc: 20 mark-registration: 26 lifecycle-observer: 1 message-retriever: 8 dynamic-theme: 3 vector-compat: 0 proxy-init: 0 schedule-non-blocking: 2 total: 626
02-21 10:43:21.009 13606 13651 I PersistentAlarmManagerListener: class org.thoughtcrime.securesms.service.RotateSignedPreKeyListener scheduling for: 1614009734545
02-21 10:43:21.013 13606 13651 I PersistentAlarmManagerListener: class org.thoughtcrime.securesms.service.DirectoryRefreshListener scheduling for: 1614071573360
02-21 10:43:21.015 13606 13656 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:21.015 13606 13606 D ApplicationContext: onCreate() took 634 ms
02-21 10:43:21.018 13606 13651 I PersistentAlarmManagerListener: class org.thoughtcrime.securesms.service.RotateSenderCertificateListener scheduling for: 1613917323508
02-21 10:43:21.019 13606 13655 I FeatureFlags: init() {android.animatedStickerMinMemory=193, android.animatedStickerMinTotalMemory=3072, android.automaticSessionReset.2=true, android.automaticSessionResetInterval=3600, android.defaultMaxBackoff=60, android.donate=false, android.groupsV1Migration.job=true, android.groupsV1Migration.manual=true, android.groupsv2.calling.2=true, android.internalUser=false, android.okhttpAutomaticRetry=true, android.usernames=false, cds.syncInterval.seconds=172800, global.groupsv2.groupSizeHardLimit=1001, global.groupsv2.maxGroupSize=151, research.megaphone.1=false}
02-21 10:43:21.021 13606 13655 D StorageSyncHelper: Scheduling a sync. Last sync was 45683017 ms ago.
02-21 10:43:21.021 13606 13651 I JobManager: Waiting for initialization...
02-21 10:43:21.022 13606 13656 I ApplicationContext: Deleted 0 abandoned attachments.
02-21 10:43:21.027 13606 13655 I JobManager: Waiting for initialization...
02-21 10:43:21.031 13606 13654 D IncomingMessageObserver: Network: true, Foreground: false, FCM: true, Censored: false, Registered: true, Websocket Registered: true, Proxy: false
02-21 10:43:21.032 13606 13657 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:21.033 13606 13657 I ViewOnceMessageManager: No messages to schedule.
02-21 10:43:21.039 2711 3346 W ActivityManager: Permission Denial: opening provider com.android.providers.contacts.ContactsProvider2 from ProcessRecord{2d48e76 13606:org.thoughtcrime.securesms/u0a98} (pid=13606, uid=10098) requires android.permission.READ_CONTACTS or android.permission.WRITE_CONTACTS
02-21 10:43:21.059 2711 3168 W SyncManager: failed sync operation JobId=103100 ***/org.thoughtcrime.securesms u0 [com.android.contacts] OTHER ExpectedIn=0s STANDBY-EXEMPTED(TOP) Reason=AutoSync, SyncResult: databaseError: true stats []
02-21 10:43:21.065 2711 3168 E SyncManager: not retrying sync operation because the error is a hard error: JobId=103100 ***/org.thoughtcrime.securesms u0 [com.android.contacts] OTHER ExpectedIn=0s STANDBY-EXEMPTED(TOP) Reason=AutoSync Retries=1
02-21 10:43:21.071 13606 13606 I JobManager: onConstraintMet(ChargingConstraintObserver)
02-21 10:43:21.080 13606 13651 I JobManager: Initialization complete.
02-21 10:43:21.081 13606 13655 I JobManager: Initialization complete.
02-21 10:43:21.084 13606 13606 I JobManager: onConstraintMet(NetworkConstraintObserver)
02-21 10:43:21.245 13606 13655 I JobSchedulerScheduler: JobScheduler enqueue of NETWORK (-1733499378)
02-21 10:43:21.258 13606 13655 I Job : [JOB::44d7b2ab-8f44-4b46-812b-0f85f7217a32][StorageSyncJob] onSubmit() (Time Since Submission: 235 ms, Lifespan: 86400000 ms, Run Attempt: 1/1)
02-21 10:43:21.260 13606 13651 W crime.securesm: Long monitor contention with owner signal-bounded-1 (13655) at java.lang.annotation.Annotation com.fasterxml.jackson.databind.introspect.AnnotationMap.get(java.lang.Class)(AnnotationMap.java:43) waiters=0 in void org.thoughtcrime.securesms.jobmanager.JobController.wakeUp() for 163ms
02-21 10:43:21.266 13606 13606 I JobSchedulerScheduler: Waking due to job: -1733499378
02-21 10:43:21.270 13606 13665 W crime.securesm: Long monitor contention with owner signal-bounded-1 (13655) at java.lang.annotation.Annotation com.fasterxml.jackson.databind.introspect.AnnotationMap.get(java.lang.Class)(AnnotationMap.java:43) waiters=3 in org.thoughtcrime.securesms.jobmanager.Job org.thoughtcrime.securesms.jobmanager.JobController.pullNextEligibleJobForExecution(org.thoughtcrime.securesms.jobmanager.JobPredicate) for 161ms
02-21 10:43:21.272 13606 13663 W crime.securesm: Long monitor contention with owner signal-bounded-1 (13655) at java.lang.annotation.Annotation com.fasterxml.jackson.databind.introspect.AnnotationMap.get(java.lang.Class)(AnnotationMap.java:43) waiters=4 in org.thoughtcrime.securesms.jobmanager.Job org.thoughtcrime.securesms.jobmanager.JobController.pullNextEligibleJobForExecution(org.thoughtcrime.securesms.jobmanager.JobPredicate) for 163ms
02-21 10:43:21.445 13606 13661 W crime.securesm: Long monitor contention with owner signal-bounded-1 (13655) at java.lang.annotation.Annotation com.fasterxml.jackson.databind.introspect.AnnotationMap.get(java.lang.Class)(AnnotationMap.java:43) waiters=6 in org.thoughtcrime.securesms.jobmanager.Job org.thoughtcrime.securesms.jobmanager.JobController.pullNextEligibleJobForExecution(org.thoughtcrime.securesms.jobmanager.JobPredicate) for 335ms
02-21 10:43:21.451 13606 13663 I JobRunner: [JOB::cdb36d5e-28bb-4b56-8c40-8a965d60a09f][StorageSyncJob][3] Running job. (Time Since Submission: 39091 ms, Lifespan: 86400000 ms, Run Attempt: 1/1)
02-21 10:43:21.514 13606 13606 I AppStartup: Assuming the application has started in the background. Running post-render tasks.
02-21 10:43:21.560 13606 13667 D NotificationChannels: ensureCustomChannelConsistency()
02-21 10:43:21.567 13606 13666 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:21.569 13606 13667 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:21.582 13606 13666 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:21.696 2389 13668 E ResolverController: No valid NAT64 prefix (100, <unspecified>/0)
02-21 10:43:22.336 2389 13671 E ResolverController: No valid NAT64 prefix (100, <unspecified>/0)
02-21 10:43:22.585 13606 13663 I StorageSyncJob: Our version: 449, their version: 449
02-21 10:43:22.607 13606 13663 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:22.613 13606 13663 V Cursor : Filling cursor window with start position:0 required position:0
02-21 10:43:22.616 13606 13663 E BaseJob : Encountered a fatal exception. Crash imminent.
02-21 10:43:22.616 13606 13663 E BaseJob : org.thoughtcrime.securesms.database.RecipientDatabase$MissingRecipientException: Failed to find recipient with ID: null
02-21 10:43:22.616 13606 13663 E BaseJob : at org.thoughtcrime.securesms.recipients.LiveRecipientCache.getSelf(LiveRecipientCache.java:128)
02-21 10:43:22.616 13606 13663 E BaseJob : at org.thoughtcrime.securesms.recipients.Recipient.self(Recipient.java:302)
02-21 10:43:22.616 13606 13663 E BaseJob : at org.thoughtcrime.securesms.jobs.StorageSyncJob.performSync(StorageSyncJob.java:216)
02-21 10:43:22.616 13606 13663 E BaseJob : at org.thoughtcrime.securesms.jobs.StorageSyncJob.onRun(StorageSyncJob.java:108)
02-21 10:43:22.616 13606 13663 E BaseJob : at org.thoughtcrime.securesms.jobs.BaseJob.run(BaseJob.java:32)
02-21 10:43:22.616 13606 13663 E BaseJob : at org.thoughtcrime.securesms.jobmanager.JobRunner.run(JobRunner.java:86)
02-21 10:43:22.616 13606 13663 E BaseJob : at org.thoughtcrime.securesms.jobmanager.JobRunner.run(JobRunner.java:49)
02-21 10:43:22.620 13606 13663 E JobRunner: [JOB::cdb36d5e-28bb-4b56-8c40-8a965d60a09f][StorageSyncJob][3] Job failed with a fatal exception. Crash imminent. (Time Since Submission: 40261 ms, Lifespan: 86400000 ms, Run Attempt: 1/1)
02-21 10:43:22.660 13606 13663 E AndroidRuntime: FATAL EXCEPTION: signal-JobRunner-3
02-21 10:43:22.660 13606 13663 E AndroidRuntime: Process: org.thoughtcrime.securesms, PID: 13606
02-21 10:43:22.660 13606 13663 E AndroidRuntime: org.thoughtcrime.securesms.database.RecipientDatabase$MissingRecipientException: Failed to find recipient with ID: null
02-21 10:43:22.660 13606 13663 E AndroidRuntime: at org.thoughtcrime.securesms.recipients.LiveRecipientCache.getSelf(LiveRecipientCache.java:128)
02-21 10:43:22.660 13606 13663 E AndroidRuntime: at org.thoughtcrime.securesms.recipients.Recipient.self(Recipient.java:302)
02-21 10:43:22.660 13606 13663 E AndroidRuntime: at org.thoughtcrime.securesms.jobs.StorageSyncJob.performSync(StorageSyncJob.java:216)
02-21 10:43:22.660 13606 13663 E AndroidRuntime: at org.thoughtcrime.securesms.jobs.StorageSyncJob.onRun(StorageSyncJob.java:108)
02-21 10:43:22.660 13606 13663 E AndroidRuntime: at org.thoughtcrime.securesms.jobs.BaseJob.run(BaseJob.java:32)
02-21 10:43:22.660 13606 13663 E AndroidRuntime: at org.thoughtcrime.securesms.jobmanager.JobRunner.run(JobRunner.java:86)
02-21 10:43:22.660 13606 13663 E AndroidRuntime: at org.thoughtcrime.securesms.jobmanager.JobRunner.run(JobRunner.java:49)
02-21 10:43:22.661 13606 13663 E SignalUncaughtExceptionHandler:
02-21 10:43:22.661 13606 13663 E SignalUncaughtExceptionHandler: org.thoughtcrime.securesms.database.RecipientDatabase$MissingRecipientException: Failed to find recipient with ID: null
02-21 10:43:22.661 13606 13663 E SignalUncaughtExceptionHandler: at org.thoughtcrime.securesms.recipients.LiveRecipientCache.getSelf(LiveRecipientCache.java:128)
02-21 10:43:22.661 13606 13663 E SignalUncaughtExceptionHandler: at org.thoughtcrime.securesms.recipients.Recipient.self(Recipient.java:302)
02-21 10:43:22.661 13606 13663 E SignalUncaughtExceptionHandler: at org.thoughtcrime.securesms.jobs.StorageSyncJob.performSync(StorageSyncJob.java:216)
02-21 10:43:22.661 13606 13663 E SignalUncaughtExceptionHandler: at org.thoughtcrime.securesms.jobs.StorageSyncJob.onRun(StorageSyncJob.java:108)
02-21 10:43:22.661 13606 13663 E SignalUncaughtExceptionHandler: at org.thoughtcrime.securesms.jobs.BaseJob.run(BaseJob.java:32)
02-21 10:43:22.661 13606 13663 E SignalUncaughtExceptionHandler: at org.thoughtcrime.securesms.jobmanager.JobRunner.run(JobRunner.java:86)
02-21 10:43:22.661 13606 13663 E SignalUncaughtExceptionHandler: at org.thoughtcrime.securesms.jobmanager.JobRunner.run(JobRunner.java:49)
02-21 10:43:22.676 13606 13663 I JobManager: Successfully flushed.
02-21 10:43:22.683 2711 13673 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
02-21 10:43:22.693 2711 2775 I ActivityManager: Showing crash dialog for package org.thoughtcrime.securesms u0
02-21 10:43:22.696 2711 13673 W DropBoxManagerService: Dropping: data_app_crash (909 > 0 bytes)
02-21 10:43:22.702 2711 2792 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.stats.service.DropBoxEntryAddedReceiver
02-21 10:43:22.702 2711 2792 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.DROPBOX_ENTRY_ADDED flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$PersistentTrustedReceiver```
Taking a short look at the code from my stack trace, I see:
The ProfileKey
constructor is in
public ProfileKey(byte[] contents) throws InvalidInputException {
super(contents, SIZE);
}
immediately calling the superclass's ByteArray
constructor at
which does not permit null
arrays.
The array passed comes from Recipient.self().getProfileKey()
, and the type annotation in
says that this can be nullable
.
So the most straightforward conclusion from this is that getSelfProfileKey()
should probably not call new ProfileKey()
on Recipient.self().getProfileKey()
without checking whether it returned null
.
Upon the sight of
MultiDeviceStorageSyncRequestJob.java
I decided to remove my linked devices from the app (which I could do after a couple of force closes).
After that, the exception changed to:
java.lang.NullPointerException: Attempt to get length of null array
at org.signal.zkgroup.internal.ByteArray.cloneArrayOfLength(ByteArray.java:32)
at org.signal.zkgroup.internal.ByteArray.<init>(ByteArray.java:20)
at org.signal.zkgroup.profiles.ProfileKey.<init>(ProfileKey.java:25)
at org.thoughtcrime.securesms.crypto.ProfileKeyUtil.getSelfProfileKey(ProfileKeyUtil.java:39)
at org.thoughtcrime.securesms.crypto.UnidentifiedAccessUtil.getAccessFor(UnidentifiedAccessUtil.java:68)
at org.thoughtcrime.securesms.crypto.UnidentifiedAccessUtil.getAccessFor(UnidentifiedAccessUtil.java:58)
at org.thoughtcrime.securesms.crypto.UnidentifiedAccessUtil.getAccessFor(UnidentifiedAccessUtil.java:53)
at org.thoughtcrime.securesms.jobs.SendReadReceiptJob.onRun(SendReadReceiptJob.java:140)
at org.thoughtcrime.securesms.jobs.BaseJob.run(BaseJob.java:32)
at org.thoughtcrime.securesms.jobmanager.JobRunner.run(JobRunner.java:86)
at org.thoughtcrime.securesms.jobmanager.JobRunner.run(JobRunner.java:49)
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Bugs don't fix themselves, so yes.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This issue has been closed due to inactivity.
Bug description
Signal crashes everytime I start it, after upgrading to 5.3.7.1
Steps to reproduce
Actual result: Signal crashes as soon as I start it. Log shows "
E SignalUncaughtExceptionHandler: org.thoughtcrime.securesms.database.RecipientDatabase$MissingRecipientException: Failed to find recipient with ID: null
"Downgrading to 5.2.3 (with Titanium Backup) produces the same result.
Going to Settings > Accounts > Signal and re-synchronizing contacts improves the situation a bit : now Signal starts, but every Signal contact gets either a single "[Contact] is on Signal" or multiple "Online chat session has been updated" (translated from french) unread messages.
(If I send/receive messages via a linked Signal Desktop, each message sent/received generates (at least) one extra "Online chat session has been updated" message on the smartphone.)
Contacts display their contact list's picture, not their Signal avatar.
Tapping on any conversation crashes the application with "
E SignalUncaughtExceptionHandler: java.lang.NullPointerException: Attempt to get length of null array
"Tapping "New message" then selecting a Signal contact crashes the application.
SMS conversations have disappeared, but sending and receiving new SMSs work.
Might be related to https://github.com/signalapp/Signal-Android/issues/9557
Expected result: Signal doesn't crash
Screenshots
N/A
Device info
Device: LG G4 H815 Android version: 9 - LineageOS 16 Signal version: 5.3.7.1
Link to debug log
https://debuglogs.org/945c55d2d1c3b3270ca2e27284d2eaebca4d3e3ab80a94f1ad223905aa484f3a