FossifyOrg / Messages

An easy and quick way of managing SMS and MMS messages without ads.
https://www.fossify.org
GNU General Public License v3.0
516 stars 37 forks source link

Issue with importing message #188

Open miru299 opened 3 months ago

miru299 commented 3 months ago

Checklist

Affected app version

1.0.1

Affected Android/Custom ROM version

Android 14

Affected device model

Samsung S24

How did you install the app?

F-Droid / IzzyOnDroid

Steps to reproduce the bug

  1. open app
  2. gear icon
  3. Scroll down to the "Migrating" Select Import messages
  4. Navigate to directory where file is located ( SMS & MMS)
  5. Select Import SMS+MMS and press OK

Expected behavior

It should import the json correctly and restore all the SMS and MMS.

Actual behavior

All the conversation are empty, it does not have any old messages. Though what I found was that the previews of every messages appears to be visible. Second part of the problem, these collective SMS are not in chronological order.

Screenshots/Screen recordings

No response

Additional information

No response

tom93 commented 3 months ago

Hi, a couple of questions:

If you're willing to do some experiments, it would be interesting to try with a smaller backup. Here is an example: example-backup.json. You can also create a smaller backup by hand from your original backup:

  1. Open the original .json file using a text editor (you might need to temporarily change the file extension to .txt, and use a text editor that supports large files).
  2. Search for some text that you know is in the backup but doesn't appear after import.
  3. Copy the entire message. For SMS, it's everything from previous "{" to the next "}".
  4. Create a new text file, paste the message, and insert "[" at the start and "]" at the end. It should look similar to this (same as the example above):
    [{"subscriptionId":1,"address":"5550100","body":"This is an example message","date":1720795913000,"dateSent":0,"locked":0,"protocol":null,"read":1,"status":-1,"type":2,"serviceCenter":null,"backupType":"sms"}]
  5. Rename to .json and import.

these collective SMS are not in chronological order.

This is probably the same as issue #42. There is a patch for that in the works.

miru299 commented 3 months ago

Hi Tom93,

I appreciate for your help with this issue, I will try to do smaller chucks of the backs up and see what its lead to, as far as the technique, I was able to view quite a few messages from one contact, which is good sign and shows 98,000 lines in the file. The result with original method of backups didn't show most of the conversation.

When you open the backup using a text editor and look for "subscriptionId", do you see "subscriptionId":1 everywhere or do you also see other values (e.g. "subscriptionId":2)? If you see values other than 1, then the issue could be related to multiple SIM cards; the workaround is to change everything to "subscriptionId":1.

This is interesting. To clarify, do you mean that when you are in the main screen (the conversation list) you can see the snippets showing the most recent message in each conversation? And when you open the conversation you can't see any messages at all?

tom93 commented 3 months ago

there are snippets of the the recent messages in the preview line, when I open the conversation, its basically empty except for few verification messages that are okay.

I believe the subscriptionId values are causing this issue on Android 14 (I created #191 to track this). The workaround is to change them to -1, either manually using a text editor or using this debug APK which I built; it also has a bunch of other useful patches. Alternatively, wait until #192 is merged & released.

Let me know if that helps!