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

Import doesn't include all messages on Android 14 due to subscriptionId issue #191

Open
7 tasks done
tom93 opened this issue Jul 15, 2024 · 0 comments · May be fixed by #192
Open
7 tasks done

Import doesn't include all messages on Android 14 due to subscriptionId issue #191

tom93 opened this issue Jul 15, 2024 · 0 comments · May be fixed by #192
Labels
bug Something is not working

Comments

@tom93
Copy link
Contributor

tom93 commented Jul 15, 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 (does not happen on Android 13)

Affected device model

Emulator

How did you install the app?

GitHub releases

Steps to reproduce the bug

  1. Import the following backup: subscriptionId-test.json
  2. Switch to the conversation list.
  3. Observe the conversation snippet.
  4. Open the conversation and observe the messages.
  5. Return to the conversation list and observe the snippet.
  6. Try to delete the conversation.

(The backup was specially crafted to contain messages with subscriptionId values -1 to 4, but this issue can also happen with real backups on phones that have been used with more than one SIM card.)

Expected behavior

There should be 6 messages:

Test subscriptionId -1
Test subscriptionId 0
Test subscriptionId 1
Test subscriptionId 2
Test subscriptionId 3
Test subscriptionId 4

The snippet should be "Test subscriptionId 4".

Actual behavior

The conversation snippet is initially "Test subscriptionId 4" (which is correct).
The messages in the conversation are only "Test subscriptionId -1" and "Test subscriptionId 1" (depending on the SIM card).
When returning to the conversation list, the snippet is now "Test subscriptionId 1".
When deleting the conversation, the messages are removed from the conversation but the conversation remains in the conversation list (and the snippet becomes "Test subscriptionId 4").

Screenshots/Screen recordings

screenrecord.mp4

Additional information

Equivalent bug in the "SMS Import / Export" app, with some analysis: tmo1/sms-ie#128
They decided to work around Android's behaviour by setting the subscription ID to -1 (unknown) during import. I suggest we do the same: #192.

Credit: SMS Import / Export, @BlastboomStrice (#88 (comment)), @miru299 (#188), @gusr (#6 (comment)).

@tom93 tom93 added bug Something is not working needs triage Issue is not yet ready for PR authors to take up labels Jul 15, 2024
tom93 added a commit to tom93/FossifyOrg-Messages that referenced this issue Jul 15, 2024
On Android 14, imported messages are not visible if their
subscriptionId[1] does not correspond to one of the SIMs in the
device. As a workaround, we set subscriptionId to -1 ("unknown") on
all messages during import.

This does mean that when exporting then importing on the same device,
the SIM associations will be lost. But that doesn't seem noticeable.

Credit: SMS Import / Export app,
https://www.github.com/tmo1/sms-ie/issues/128

Fixes FossifyOrg#191.

[1] https://developer.android.com/identity/user-data-ids#mobile-subscription-status
@Aga-C Aga-C removed the needs triage Issue is not yet ready for PR authors to take up label Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants