Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some groups crash on signal-android after restoring message history with --importfromdesktop #263

Open
missytake opened this issue Dec 2, 2024 · 2 comments
Labels
awaiting response Further information is requested

Comments

@missytake
Copy link

missytake commented Dec 2, 2024

  • signal-android version: 7.26.1
  • signal-desktop version: 7.34.0
  • signalbackup-tools version: the windows executable which was the latest one on November 22

Thanks a lot for your effort on fixing the mess that is Signal's architecture! <3

What we did:

  • in November, I accidentally wiped the phone of my partner while trying to de-google it. Then we realized we didn't have a backup of their signal-android message history. We still had a running signal-desktop client though.
  • we re-register signal-android, thereby decoupling the signal-desktop client.
  • we used the new signal-android app to export a more or less empty backup.
  • we used signalbackup-tools to extract the database from the signal-desktop client and merge it with the new signal-android backup. I was following the discussion in --importfromdesktop doesn't seem to recognize contacts present in android backup file #250 (comment) meanwhile, it was shortly after you fixed a crash by inventing contact ids or something ;)
  • we also deleted many older videos and audio files.
  • we tried importing it into signal-android, but it claimed the passphrase was wrong. We changed it with --opassphrase.
  • we imported the backup to signal-android, thereby re-registering it. With the new passphrase it worked.

What we tried then and what bugs we encountered:

  • our 1:1 chat worked.
  • then we tried messaging an existing group with 2 other friends - it had no messages, except a disappearance timer and some "X added Y". Opening the chat in signal-android made the app crash though.
  • we re-coupled signal-desktop (but kept the old database around).
  • we opened the crashing chat on signal-desktop - that works. it has even less message history of course.
  • we opened a new chat with the same 2 friends, it doesn't crash on signal-android, even though it has the same members.
  • many other groups also crash on signal-android, but not all.

We also have a signal-android log file and traceback, send me an email to missytake@systemli.org, then I can mail it to you :)

Priorities

My partner has a strong priority on having the message history on the phone, because it contains information important for daily life. Being reachable over signal follows directly after that. We are still hoping that we can save the message history though^^ And we also hope that once they get a phone with enough storage space we are able to restore all of the message history, including the old attachments.

@bepaald
Copy link
Owner

bepaald commented Dec 2, 2024

Hi!

There was an issue where the tool would import disappearing-timer-messages in groups incorrectly, causing crashes when opening these group chats (assuming you used the --importdesktopcontacts-option). This has been fixed in the meantime, but you probably performed the import before that fix. I strongly suspect you are running into this problem. To check, you could look at your crash log and check if it crashes with a message like: android.database.sqlite.SQLiteException: unknown error (code 0 SQLITE_OK): Unable to convert BLOB to string.

If you were to redo the process with the current version of the tool, this problem would probably not happen. Alternatively, it may be simpler to take the crashing Android backup (or export a new one) and run:
signalbackup-tools [backup] [passphrase] --runsqlquery "DELETE FROM message WHERE TYPEOF(body) IS 'blob'" -o [output], which should delete the faulty messages and prevent any more crashes.

If you are seeing a different crash, or this doesn't fix it, please send me the crash log and I'll take a look if I can do anything. My email address is in the README (search for 'mail').

Let me know how it goes. Thanks!

@bepaald
Copy link
Owner

bepaald commented Dec 8, 2024

Recently a new bug in the desktop-import was discovered. You might want to also check for, and fix that as well. For instructions see this comment.

In your initial report, I think I see only one bug which my previous message hopefully fixes. But in regards to the Priorities section, I'd like to point out the existence of this project: https://github.com/cycneuramus/signal-backup-shrink. It shrinks a backup size by resizing and compressing image and video attachments. It is probably not optimal for your situation, but maybe the smaller attachments are still better than nothing. One could keep the output of this tools --exporthtml option somewhere outside of the phone as a full-resolution companion to the shrunk phone data.

@bepaald bepaald added the awaiting response Further information is requested label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants