signalapp / signalapp/Signal-iOS

"problem retrieving data" due to a unique key constraints: SearchableName.threadId, SearchableName.signalAccountId, SearchableName.userProfileId, and SearchableName.signalRecipientId

Open
#6,036 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Acknowledged
Dominant language
Swift
Stars
12.2k
Forks
3.5k
PR merge metrics
No merged PRs in 30d

Description

  • I have searched open and closed issues for duplicates
  • I am submitting a bug report for existing functionality that does not work as intended
  • This isn't a feature request or a discussion topic

Bug description

After running out of space on an iphone, signal crashes with the "problem retrieving data" screen, after clicking continue the app crashes. This is similar to https://github.com/signalapp/Signal-iOS/issues/5811, however, in #5811 the app logs show database disk image is malformed - while executing COMMIT TRANSACTION`` whereas here the logs show the aforementioned unique key constraint errors.

Steps to reproduce

alas I cannot reliably reproduce this without experimenting with several dozen iphones. but here are my best guesses

  • use up all iphone storage
  • try to open signal after receiving new messages
  • allow signal to crash
  • delete dozens of GB of space
  • update signal (from ??? to 7.55.0.733)
  • open signal again
  • see "problem retrieving data" screen.

Actual result: application pauses at 33% for roughly 150 seconds and then crashes with 8 threadId unique constraint failures, 5 signalAccountId unique constraint failures, and several dozen of the userProfileId and signalRecipientId unique constraint failures each.

Expected result: application downloads latest messages

Device info

Device: iPhone SE 2020

iOS version: 17.1.1 (21B91)

Signal version: 7.55.0.733

Link to debug log

https://debuglogs.org/ios/7.55.0/2293a7075c0fd2d91c45182b958bd5457a9d211a4ceaba1f254811a520d061ab.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked Signal iOS debug log and comparing its unique-key constraint failures with issue #5811's database corruption symptoms. Investigate the recovery path after storage exhaustion and verify that the app can retrieve the latest messages without pausing at 33% or crashing.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
database, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.