REPRODUCIBILITY: 100%
BUILD ID: 4.1.0.48
HARDWARE: Sony Xperia XA2 Ultra
UI LANGUAGE: Finnish
REGRESSION: No
DESCRIPTION:
Signal application can’t sync contacts from phone address book. logcat
indicates that it tries and fails, with sqlite/sqlcipher error messages.
PRECONDITIONS:
Install Android app support and download Signal from https://signal.org/android/apk/ (or from Play Store should you have access to it).
STEPS TO REPRODUCE:
- Have some contacts with phone numbers in address book
- Install and open Signal
- Click the pen to create a new message
- Click the three dots menu
- Select Update
EXPECTED RESULT:
Contacts get updated (or, rather, contacts show up in Signal)
ACTUAL RESULT:
Contacts don’t get updater or pulled from the address book.
ADDITIONAL INFORMATION:
- Signal app version is 5.3.12
- All contacts are synced from a CardDAV account (OwnCloud 10)
- Signal permissions are enabled
- WhatsApp can access device contacts (as long as it works in the first place…)
Logcat output:
Finalizing a Cursor that has not been deactivated or closed. database = /data/user/0/org.thoughtcrime.securesms/databases/signal.db, table = recipient, query = SELECT _id, system_display_name, phone, email, system_phone_label, system_phone_type, registered, ab
net.sqlcipher.database.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
at net.sqlcipher.database.SQLiteCursor.<init>(SQLiteCursor.java:237)
at net.sqlcipher.database.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:71)
at net.sqlcipher.database.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1965)
at net.sqlcipher.database.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1740)
at net.sqlcipher.database.SQLiteDatabase.query(SQLiteDatabase.java:1692)
at net.sqlcipher.database.SQLiteDatabase.query(SQLiteDatabase.java:1781)
at org.thoughtcrime.securesms.database.SQLiteDatabase.lambda$query$2(SQLiteDatabase.java:138)
at org.thoughtcrime.securesms.database.SQLiteDatabase.lambda$query$2$SQLiteDatabase(Unknown Source:0)
at org.thoughtcrime.securesms.database.-$$Lambda$SQLiteDatabase$cvMxOy0u0-aa46LyDnbjGx12KKk.run(Unknown Source:16)
at org.thoughtcrime.securesms.database.SQLiteDatabase.traceSql(SQLiteDatabase.java:92)
at org.thoughtcrime.securesms.database.SQLiteDatabase.query(SQLiteDatabase.java:138)
at org.thoughtcrime.securesms.database.RecipientDatabase.getSignalContacts(RecipientDatabase.java:2300)
at org.thoughtcrime.securesms.contacts.ContactRepository.querySignalContacts(ContactRepository.java:117)
at org.thoughtcrime.securesms.contacts.ContactsCursorLoader.getContactsCursors(ContactsCursorLoader.java:309)
at org.thoughtcrime.securesms.contacts.ContactsCursorLoader.addContactsSection(ContactsCursorLoader.java:162)
at org.thoughtcrime.securesms.contacts.ContactsCursorLoader.getUnfilteredResults(ContactsCursorLoader.java:128)
at org.thoughtcrime.securesms.contacts.ContactsCursorLoader.loadInBackground(ContactsCursorLoader.java:102)
at org.thoughtcrime.securesms.contacts.ContactsCursorLoader.loadInBackground(ContactsCursorLoader.java:54)
at androidx.loader.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:307)
at androidx.loader.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:60)
at androidx.loader.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:48)
at androidx.loader.content.ModernAsyncTask$2.call(ModernAsyncTask.java:141)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
ContactsDatabase: Adding number: +REMOVED ( <-- repeated 29 times )
DatabaseUtils: Writing exception to parcel
DatabaseUtils: android.content.OperationApplicationException: insert failed
DatabaseUtils: at android.content.ContentProviderOperation.apply(ContentProviderOperation.java:292)
DatabaseUtils: at com.android.providers.contacts.AbstractContactsProvider.applyBatch(AbstractContactsProvider.java:286)
DatabaseUtils: at com.android.providers.contacts.ContactsProvider2.applyBatch(ContactsProvider2.java:2405)
DatabaseUtils: at android.content.ContentProvider$Transport.applyBatch(ContentProvider.java:319)
DatabaseUtils: at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:181)
DatabaseUtils: at android.os.Binder.execTransact(Binder.java:731)
DirectoryHelper: Failed to update contacts.
DirectoryHelper: android.content.OperationApplicationException: insert failed
DirectoryHelper: at android.database.DatabaseUtils.readExceptionWithOperationApplicationExceptionFromParcel(DatabaseUtils.java:156)
DirectoryHelper: at android.content.ContentProviderProxy.applyBatch(ContentProviderNative.java:522)
DirectoryHelper: at android.content.ContentProviderClient.applyBatch(ContentProviderClient.java:474)
DirectoryHelper: at android.content.ContentResolver.applyBatch(ContentResolver.java:1626)
DirectoryHelper: at org.thoughtcrime.securesms.contacts.ContactsDatabase.setRegisteredUsers(ContactsDatabase.java:107)
DirectoryHelper: at org.thoughtcrime.securesms.contacts.sync.DirectoryHelper.updateContactsDatabase(DirectoryHelper.java:321)
DirectoryHelper: at org.thoughtcrime.securesms.contacts.sync.DirectoryHelper.refreshNumbers(DirectoryHelper.java:261)
DirectoryHelper: at org.thoughtcrime.securesms.contacts.sync.DirectoryHelper.refreshDirectory(DirectoryHelper.java:101)
DirectoryHelper: at org.thoughtcrime.securesms.ContactSelectionActivity$RefreshDirectoryTask.doInBackground(ContactSelectionActivity.java:144)
DirectoryHelper: at org.thoughtcrime.securesms.ContactSelectionActivity$RefreshDirectoryTask.doInBackground(ContactSelectionActivity.java:133)
DirectoryHelper: at android.os.AsyncTask$2.call(AsyncTask.java:333)
DirectoryHelper: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
DirectoryHelper: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
DirectoryHelper: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
DirectoryHelper: at java.lang.Thread.run(Thread.java:764)
Cursor : Filling cursor window with start position:0 required position:0
DirectoryHelper: [refresh] network: 6697 process-cds: 193 handle-unlisted: 2 update-registered: 29 contacts-db: 1216 total: 8137
JobSchedulerScheduler: JobScheduler enqueue of NETWORK (-1733499378)
Job : [JOB::ff052796-1a8d-472a-8a75-4d58d8e1b134][StorageSyncJob] onSubmit() (Time Since Submission: 83 ms, Lifespan: 86400000 ms, Run Attempt: 1/1)
JobSchedulerScheduler: Waking due to job: -1733499378
JobRunner: [JOB::ff052796-1a8d-472a-8a75-4d58d8e1b134][StorageSyncJob][1] Running job. (Time Since Submission: 165 ms, Lifespan: 86400000 ms, Run Attempt: 1/1)
GoogleInputMethodService: GoogleInputMethodService.onStartInput():1906
SessionManager: SessionManager.beginSession():53 Try to begin an already begun session [INPUT_SESSION], end it first
Cursor : Filling cursor window with start position:0 required position:0
Cursor : Filling cursor window with start position:0 required position:0
Cursor : Filling cursor window with start position:0 required position:0
Cursor : Filling cursor window with start position:0 required position:0
Cursor : Filling cursor window with start position:0 required position:0
Cursor : Filling cursor window with start position:0 required position:0
StorageSyncJob: Our version: 16, their version: 16
Cursor : Filling cursor window with start position:0 required position:0
chatty : uid=10056(org.thoughtcrime.securesms) signal-JobRunne identical 6 lines
Cursor : Filling cursor window with start position:0 required position:0
StorageSyncJob: [Local Changes] No local changes.
JobRunner: [JOB::ff052796-1a8d-472a-8a75-4d58d8e1b134][StorageSyncJob][1] Job finished with result SUCCESS in 363 ms. (Time Since Submission: 528 ms, Lifespan: 86400000 ms, Run Attempt: 1/1)
This suggests a bug either in Signal or Android app support (or sqlcipher).