{"action":"created","issue":{"url":"https://api.github.com/repos/signalapp/Signal-Android/issues/7390","repository_url":"https://api.github.com/repos/signalapp/Signal-Android","labels_url":"https://api.github.com/repos/signalapp/Signal-Android/issues/7390/labels{/name}","comments_url":"https://api.github.com/repos/signalapp/Signal-Android/issues/7390/comments","events_url":"https://api.github.com/repos/signalapp/Signal-Android/issues/7390/events","html_url":"https://github.com/signalapp/Signal-Android/issues/7390","id":294147724,"number":7390,"title":"Messages from contact going to wrong thread after DB update; All Media is missing media","user":{"login":"TheCraiggers","id":1479099,"avatar_url":"https://avatars2.githubusercontent.com/u/1479099?v=4","gravatar_id":"","url":"https://api.github.com/users/TheCraiggers","html_url":"https://github.com/TheCraiggers","followers_url":"https://api.github.com/users/TheCraiggers/followers","following_url":"https://api.github.com/users/TheCraiggers/following{/other_user}","gists_url":"https://api.github.com/users/TheCraiggers/gists{/gist_id}","starred_url":"https://api.github.com/users/TheCraiggers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheCraiggers/subscriptions","organizations_url":"https://api.github.com/users/TheCraiggers/orgs","repos_url":"https://api.github.com/users/TheCraiggers/repos","events_url":"https://api.github.com/users/TheCraiggers/events{/privacy}","received_events_url":"https://api.github.com/users/TheCraiggers/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2018-02-03T21:46:01Z","updated_at":"2018-02-26T17:57:30Z","closed_at":"2018-02-04T19:35:31Z","author_association":"NONE","body":"<!-- This is a bug report template. By following the instructions below and filling out the sections with your information, you will help the developers to get all the necessary data to fix your issue.\r\nYou can also preview your report before submitting it. You may remove sections that aren't relevant to your particular case.\r\n\r\nBefore we begin, please note that this tracker is only for issues, not questions or comments.\r\n\r\nIf you are looking for support, please see our support center instead:\r\nhttps://support.whispersystems.org/\r\nor email support@whispersystems.org\r\n\r\nLet's begin with a checklist: replace the empty checkboxes [ ] below with checked ones [x] accordingly -->\r\n\r\nI have:\r\n- [x] searched open and closed issues for duplicates\r\n- [x] read https://github.com/WhisperSystems/Signal-Android/wiki/Submitting-useful-bug-reports\r\n\r\n----------------------------------------\r\n\r\n### Bug description\r\nMessages from contact are showing in the incorrect thread. I'm guessing, from the timeline of events, that this is due to the database migration. Here's what happened, near as I can tell.\r\n\r\n1. Sometime during the night, Signal updated to the new beta 4.16.3\r\n1. Later, a contact messaged me in Signal twice. The first was just text, the second was an image.\r\n1. Even later, when I woke up in the morning, I saw I had a message and opened Signal. It performed a database migration first thing.\r\n1. I now have two threads for this contact (before, I only had one). The thread that contained the new message was incorrect (this thread was to a different person and not a group chat), and was a really old, archived SMS thread with another contact many months ago. (You can also tell this via the colors in the screenshot.)\r\n\r\n#### Other things I've noticed after this bug occurred\r\n- Viewing \"All Media\" in either thread now only displays the new image I received last night. Scrolling through the correct thread, there are still plenty of images that should be displaying. Yet again, this bug seems to be regulated to just the one contact; other threads display All Media correctly.\r\n- I responded to the contact in the correct thread, and the reply came in the *incorrect* thread. It is not displayed at all in the correct thread.\r\n- Other contacts seem to be working fine so far. The only one that is broken is the one that messaged me after the upgrade, but before the DB migration. \r\n\r\n**Actual result:** Contact's messages appearing in wrong thread, media in correct thread now longer showing in All Media\r\n**Expected result:** Contact's messages appear in the correct thread, and all media displays the correct amount of media.\r\n\r\n### Screenshots\r\n![screenshot_20180203-070911](https://user-images.githubusercontent.com/1479099/35771792-746149fc-0900-11e8-8975-2f57aba3b026.png)\r\n\r\n\r\n\r\n### Device info\r\n<!-- replace the examples with your info -->\r\n**Device:** Pixel XL (Marlin)\r\n**Android version:** 8.1.0\r\n**Signal version:** 4.16.3\r\n\r\n### Link to debug log\r\nhttps://gist.github.com/5a29ff88469a898ab617445659067a76\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/signalapp/Signal-Android/issues/comments/368590423","html_url":"https://github.com/signalapp/Signal-Android/issues/7390#issuecomment-368590423","issue_url":"https://api.github.com/repos/signalapp/Signal-Android/issues/7390","id":368590423,"user":{"login":"zejn","id":40347,"avatar_url":"https://avatars1.githubusercontent.com/u/40347?v=4","gravatar_id":"","url":"https://api.github.com/users/zejn","html_url":"https://github.com/zejn","followers_url":"https://api.github.com/users/zejn/followers","following_url":"https://api.github.com/users/zejn/following{/other_user}","gists_url":"https://api.github.com/users/zejn/gists{/gist_id}","starred_url":"https://api.github.com/users/zejn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zejn/subscriptions","organizations_url":"https://api.github.com/users/zejn/orgs","repos_url":"https://api.github.com/users/zejn/repos","events_url":"https://api.github.com/users/zejn/events{/privacy}","received_events_url":"https://api.github.com/users/zejn/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T17:57:30Z","updated_at":"2018-02-26T17:57:30Z","author_association":"NONE","body":"I received two messages at about the same time, one was SMS from contact A, the other was signal message from contact B. The SMS from contact A was merged with conversation with contact C, which was definitely not the last contact who I messaged with ... but it might actually be the first one, now that I think. If I remember correctly there was an \"okay do it\" button that database needs to be upgraded, but that was in the app, I don't remember seeing a notification with that.\r\n\r\nI don't know how migration is made, but from what I experienced I'd imagine you create a new database file and go about inserting records from previous database, and the SMS somehow squeezed in between and got the first conversation id, which coincided with another already existing conversation.\r\n"}}
{"actor":{"display_login":"zejn"}}