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

Issue with importing message #188

Open
7 tasks done
miru299 opened this issue Jul 7, 2024 · 3 comments
Open
7 tasks done

Issue with importing message #188

miru299 opened this issue Jul 7, 2024 · 3 comments
Labels
bug Something is not working device/software specific Issues that only happen on some devices or with some specific hardware/software needs triage Issue is not yet ready for PR authors to take up

Comments

@miru299
Copy link

miru299 commented Jul 7, 2024

Checklist

  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

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

@miru299 miru299 added bug Something is not working needs triage Issue is not yet ready for PR authors to take up labels Jul 7, 2024
@Aga-C Aga-C added the device/software specific Issues that only happen on some devices or with some specific hardware/software label Jul 8, 2024
@tom93
Copy link
Contributor

tom93 commented Jul 12, 2024

Hi, a couple of questions:

  • How large is the backup? Edit: There is currently no progress indication, so for large backups it can be hard to tell whether the import completed. The expected behaviour is that you'll see a message saying "Importing..." at the start, then some time later you'll see another message saying "Importing successful" and the import dialog (which asked you to choose whether to import SMS / MMS) should close. If the dialog doesn't automatically close, it means the import is still running.

  • Just to confirm, did you create it using the Fossify / Simple Mobile Tools app, or some other app?

  • 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 (credit).
    Edit: The value 1 will only work if the new phone's Subscriber ID is also 1. It's better to use -1 ("unknown"), which will work regardless.

  • the previews of every messages appears to be visible

    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?

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
Copy link
Author

miru299 commented Jul 14, 2024

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.

  • In my case using SimpleSms, the behavior started off same by displaying the "imported.." message then instead of showing "Importing successful", it directly goes back to the conversation list. This is only with SimpleSms

  • In terms of the size of the file . it can be little tricky, since I do not know how accurate it maybe. On the other hand, If I change the default SMS app to Fossify SMS,. It reproduces the expected behavior you mentioned.

  • When I comparing the size, its 32mb on Fossify, whereas Simple SMS is displayed as 0,

  • I have used both Fossify / Simple Mobile to export the messages for testing it out and the end result is same

  • have used Simple Mobile SMS tool to do this

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.

  • I followed the steps, I was able to open the json file and reformat the json data using plugin for better viewing, I am seeing mix of "subscriptionId" some are set as 3 , other as 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?

  • Yes that's correct, 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.

@tom93
Copy link
Contributor

tom93 commented Jul 15, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working device/software specific Issues that only happen on some devices or with some specific hardware/software needs triage Issue is not yet ready for PR authors to take up
Projects
None yet
Development

No branches or pull requests

3 participants