-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
support unsupported message types #96
Comments
Are we talking about the import from desktop, or the html export here? I believe HTML export should now output most (but not all) status messages (I think it outputs profile name changes, does it not?). On the import from desktop: The main problem here is that I do not have these message types in my own database. A second problem is some status messages are simply complicated, though I don't think the profile name change is (but certainly all group updates are going to be a pain, don't expect them soon). Anyway, I'm in need of some new SIM cards for my dev-phones, when I get them I will work on some of these message types. When I run
Maybe you have a longer list of message types for me to work on? |
Just scrolling through my log I see these:
Note I edited this message to add any others I have ran into I think things like group v1 migration are a low priority, but things like change number, profile change, delivery issue, verified change, key change and timer notification are all relevant when reviewing an exported chat, these impact security and or the conversation itself. |
Attempt to support keychange and verified-change type messages in desktop db (progress on #96). Small fix in decodeStatusMessage()
Just a quick update on these message types:
These should all be supported now (timer-notifications only in non-group threads, for groups these are
I plan on doing these later. But the change-number one will be a while, I don't want to mess with my testing setup as it is now so it will be whenever all the other importfromdesktop stuff is mostly finished (though I may need a reminder). The delivery-issue could happen anytime as soon as I figure out how to get force one to happen. If you have this message (not just in Desktop, but in your Android backup as well) you could help me out with it.
Well, I won't say it'll never happen, but... well.... Problem is, each of these messages contain not only the actual change, but also both the previous and the current group-state (which is a big structure). All this info is not available in the Desktop message. I would need to piece this this together by tracking all the group changes in both desktop and android backup to try and figure out what the previous and current state were at the time of that message. Honestly I don't know if it's even possible, but it would be incredibly hard in any case. As for exporting to HTML: that function only cares about the actual 'change' part of the group-v2-change message, which shouldn't be to hard (though it translates to dozens of actual messages (changing group title/description/avatar, adding/removing members, inviting, accepting/declining invites, changing member roles, changing timers, and many more), so I do plan to add these, one by one, to |
Is it necessary to diffferentiate between complete html and incomplete html? After all, complete html without these messages is per defenition incomplete as well. You could just ignore them when compiling from html back into an backup file (leading to an incomplete back up file which is unavoidable anyway when building from a html export, right?) Not sure if I am making sense, just thinking out loud questioning if the destinction incompletehtml makes sense. |
I'm not exactly sure what you mean, so I'm not sure this response will be satisfactory, but: There is no 'complete' or 'incomplete' HTML. The
|
|
Both the incoming message errors I have looked at and the story messages show the following classes: type-10485780 msg msg-incoming I assuming this means these failed incoming messages are also story messages. |
Well this to me indicates that the For the "incomingError", I think I found the data in the Desktop database (though I'm not sure), but I don't know what to translate it to for the Android backup yet. On a somewhat related note, maybe you can run |
How exactly? If I run it right now it tells me the table messages does not exist I have no clue what we are looking at here but were you looking for this?
I might be able to find back an older android backup with much more messages in it |
Yeah thanks! My mistake, in the dekstop database the table is called 'messages', on Android it's 'message'. You can imagine how many times a day I make that mistake 😭 Anyway, nothing in there I don't have myself, I was sort of hoping for 5 or 6, which I suspect I would need for the "incomingError" desktop message |
How can I run this same test on an older backup which does not have a message table? |
That depends on the database version. You will at least need to replace 'message' with 'mms'. If 'type' does not yet exist in the 'mms' table, it was still called 'msg_box'. Then, if still present, you would need to run the same query on 'sms' (and using 'type' again, no 'msg_box'). |
Thanks, I was already on it but had not yet posted here. My older Android backup does have more types:
|
type 14 = Bob changed their phone number Stickers are currently also shown as empty messages without a distinct type. |
These are the types of the messages in Android right? Does the type 13 show up on Android? Also, I would be interested in the full type as well ( There on my to-do-list, it'll be a while, and I might need more info. Right! I hadn't even noticed! I will fix that, that should be doable since I have those messages in my Desktop database. Not sure when I'll have time, but it will be done. |
Don't know, would have to re-import the old backup file in which I have it. Wasn't planning on re importing but maybe soon.
I noticed that "you have verified from another device" and the opposite you have removed verification on another device" (not exact quotes but whatever) are being omitted in the export. In cases where this is included in Desktop but not present in the Android backup it might still be useful to just turn it into a status message "You have removed the verified status for this Bob on one of your devices which was not Signal Desktop". That way the info is still kept in the export. |
Right, thanks, but not necessary, I think I can figure it out. The output is useful, thank you. Not sure I fully get what you're saying, but I'll look at this when I have time later. |
I've attempted to now import these from the desktop db. It has had limited testing, I hope it works. |
|
Thanks, I guess the sticker data doesn't always look like it does in my database. I've had it print out some info on the sticker data (I'd like to see that) when this error is about to occur, and then skip it. i don't think the sticker will get imported correctly, but it might still work. At least it will hopefully not crash anymore. |
Still crashing, but a little later on
Also you might want to look at rare stickerpacks with a custom number of emoji. Some people manually edited sticker packs to show suggestions for more or fewer emoji: |
I noticed you made another change yesterday after I tested, here is the new result, again an error unfortunately
But this is to be expected right, we'll just have to try a few times and it pays off if the tool ends up supporting all kinds of variations and old backup files. |
I had another go at this, hope it works now. If you get more output ( |
Stickers now seem to work well, thanks again for your work on this tool. The export tool still shows them in a message bubble when exported to html but that's just a html style thing. |
Hm, that's a weird one, I can't explain. Stickers should not have a bubble, and in my exports they don't (neither imported ones or original ones). Do all stickers have a bubble? If you look at the source of the html of one with a bubble, there should be a message id in a comment above it, could you tell me this? Then I'll use that to try to print some info during import to try and find out why the sticker isn't being recognized as such. |
So far yes, all the ones I have seen while looking at a few random chats I also keep wondering why those checkmarks show "sent" rather than "read" like they should in this case (they are read in Signal Desktop, and the chat i looked at does not exist anymore in the Android backup). That's on all messages though not just sticker ones. Edit: |
|
Thanks, there was nothing before that? I was also hoping for (more relevant) info during the desktop-import-part... Could you confirm the _id is still 27523? (I just realized maybe I'm reordering the id's between the import and export... That complicates things, I'll need to have a think about it). (Maybe you've noticed I made more adjustments btw, I don't always have time to respond to all messages, but feel free to keep it coming, I just add everything to the list to fix or consider fixing, and respond when I have time). |
I did not expect you needed me to compare one export with the other so that test group I have already deleted. I can't compare the id. There is nothing else in the output related to stickers I have compared the sticker message of another chat to the sticker message in a much older backup before stickers were even being exported properly, and the id has remained unchanged. I will keep this chat and this message around so you can take its ID for the next test.
|
Well the old _id was 27523, you posted it just e few messages ago. But it was for nothing, my fault, I forgot the message id's get reordered after the desktop import is complete, so I apologize, we have to do this again. If you now run it (with |
Noting about stickers in the output. Here is a sticker
|
Thanks, now if you run it again, there should hopefully be some output during importing of that particular message. |
|
I had another go at this yesterday before work, maybe it's fixed? |
The background is now fixed. I ran more tests and I think if a chat contains only one or more sticker messages and nothing else the chat will not get shown on index.html while of course it should |
Good to hear
Hm, that sounds weird. I have created a new group between my devphones, only exchanged two stickers (and even deleted the 'created new group' message), but I can't reproduce. This is only a problem on the index? The actual conversation html is created? Can I assume these are threads that are imported from the desktop, and don't exist on backup? |
Will test again later but this was desktop import not in android backup |
Unable to reproduce myself. Might have been some mistake on my previous test. Let's disregard and assume it all works. I did notice index.html does not yet show (sticker) as last send message preview for a chat where a sticker was the last message. That's all. Everything else about stickers works as expected as far as I tested. Edit: |
👍
I should have this done locally, but it was much more involved than I thought, I should test it some more before I push it. Not at home right now, but hopefully tomorrow. |
Ok, done I think. |
Attempt to support keychange and verified-change type messages in desktop db (progress on #96). Small fix in decodeStatusMessage()
Still encountering a few, but I guess these are expected. Not sure yet if they occur only on Desktop or also in my android backup but I could maybe have a look at the info you need? [Warning]: Unsupported message type 'timer-notification (fromSync=true)'. Skipping... And this one but who cares: |
These are indeed expected. The first one is too difficult (maybe even impossible) to correctly translate, the second one is definitely impossible.
This one is simply unknown. I don't know if it can be supported or not, because I have never seen one. I've now changed the warning message for types that may be possible to support to |
You mean there is nothing in the actual source code? Every message the exporter writes to the file should be prepended with a comment: The type would be interesting information. Probably also interesting would be the output of As the screenshot shows, I thought I was already supporting these invitation messages though there may be variants, so I'm curious what's going on. Lastly, in case this is an imported (from Desktop) message, it should probably fall under the unsupported 'group v2 update' types and the bug would simply be that it isn't skipped like it should be.
Lol, well I'm not in Leiden very often, but I'll keep it in mind. I can not imagine what could lead to a doubling like this. Is it possible this is simply a message duplicated by importing from Desktop? There is of course a little deviation in the timestamps, but that is not uncommon at all. If it's not, I assume you can confirm the message does not appear twice in the app? And if you look at the HTML comments for these two messages and take the Thanks! |
Note, if the messages are imported from a desktop database, it's probably even more important to get the message details from there, since it is likely that something went wrong during translation from Desktop to Android. There is now a way to actually track messages from the desktop database to the exported HTML. It is a bit of a complicated procedure, but it's better than nothing. To do this, add both the
For each message it has imported, the tool will have printed lines like the following:
Here we see that the created message — the one that has Now that we know the
There may be private info in this last commands' output, so censor as needed. |
Just for clean up, and due to little activity, I'm going to close this. For specific unsupported message types, new issues can be opened (I think that last one probably still exists, but these unknown message types do require feedback). Thanks! |
There are a few unsupported message types.
I guess these are work in progress? Things like profile name changes can be important to include in exports.
The text was updated successfully, but these errors were encountered: