Skip to content

Transferring account to another iPhone leaves missing messages #6104

@sailbird

Description

@sailbird
  • 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

Describe here the issue that you are experiencing.

When you transfer your Signal account from one iPhone to another, it seems like a few photos here and there don't get transferred. And in one case, I found that like the first 10 messages from the history (several months old) were completely missing. Sounds sort of a like a tail sync issue, or more generally optimistic sync, where you just sort of assume that things transferred successfully but don't necessarily verify it completely before the declaring the transfer complete.

Steps to reproduce

  • using hyphens as bullet points
  • list the steps
  • that reproduce the bug

Hard to say because it's not consistent and less than 1% of messages seem to be missing. You might have to use a Bluetooth or wifi connection with lots of lost packets, or different iOS versions, or different iPhones on each end. Sorry I can't be more specific. But you should be able to reproduce this easily if you simply compare the databases. Just make sure that no other messages come in during the transfer itself (which hopefully isn't allowed, or if it is, then you rollback iteratively until fully synced). Ditto for meta stuff like configuration changes, timezone changes, emoticon reactions, etc.

Actual result: Describe here what happens after you run the steps above (i.e. the buggy behaviour)

Missing images. Some can still be downloaded again. (Or are you just decompressing them again from the database?) Missing text messages, particularly at the beginning of the entire history. Probably sometimes things work just fine, which could make this difficult to analyze.

Expected result: Describe here what should happen after you run the steps above (i.e. what would be the correct behaviour)

Ask the user if they want to compare the source and target instances. If not, they're on their own. Otherwise, compare the hashes of the entire databases (spanning object boundaries so it's fast). If not the same then walk through and find the missing blocks or messages and resend them. Use secure hashes salted with a mutually private nonce, not checksums, for obvious reasons. (Hopefully your local phone-to-phone connection is at least encrypted.) Be careful that your transfer algorithm isn't vulnerable to reply attacks which might double-delete messages or whatever.

Device info

Device: 2 different iPhones, years old each, not going to be more specific

iOS version: If not both up-to-date, then very nearly so.

Signal version: One was fresh install. The other was just expired and could not be upgraded, hence the imperative to transfer.

Link to debug log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions