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
Export Plaintext Backup sometimes creates invalid XML #342
Comments
|
@hoozey can you provide an example body which causes this? I see a catch for |
|
One malformed message I ran into was Although I have some perfectly fine ones like this: Not sure if there was a trailing space in the original message. I also have a lot of blank ones: |
|
Hi there, I'm not able to export plaintext at all. Anyone know why that might be? I hit the export button, phone (Galaxy Nexus) works for about 20 seconds and then says "success!" I would expect my phone to take at least several minutes creating a backup. Is there a way that I can fix the issue without losing my archive? |
Make an import dry run after exporting to check for corrupted xml. This does not yet fix the root cause of signalapp#342, but at least lets the user know about the faulty export.
|
Just got bitten by this: Only one entry was actually corrupted amongst 2300 good ones. Not sure yet what exactly the problem is, so pull request #929 only makes sure the user gets notified about the problem when exporting and not only when importing, because this might be too late... |
Fixes signalapp#342 by replacing invalid unicode characters in the message body with spaces.
|
So, I think I have found the problem. I've added a commit to #929 to replace these chars by spaces before export. |
Fixes #342 - using regex pattern/matcher to escape chars below 0x0020 and above 0xd7ff - using String.Replace to escape XML entities - changed XmlPullParser from Xml.newPullParser() to XmlPullParserFactory parser to fix import on GB
|
I had the probelm with TexSecure 2.1 and this new 2.3.3 still has the problem. and its not fun, my job requires i sometimes have to back up comminications of a he-said/she-said . |
|
Youwser, lots of manual fixing for me to do.. this XML is 4966 messages. one of the bad messages also was like this |
|
@MacaGovani can you post a sample message that leads to a wrong XML file? |
|
Hi, sorry for the delay, the original file is 4966 messages the phone is Samsung galazyII this website had a sample sms-xml file (also attached) go to the ends of the lines (one line per sms message) and note that and this zip file, from teh same web site, if it may be of use, has some excel does work for the sample xml file. when i trim my textsecure .xml file down to just a hundred sms messages, but i have not gotten the style sheets to work for me yet, I have never There is also a free JAR program that can view sms-xml files (its very so then I looked at the last 3 varaibles per sms line (per message, at in theory, i suppose, one mmore thing for me to try, once i get all the and possibly use notepad.exe to find and replace command to add the bu clearly a long term fix is needed for the body=' it seems to be trigged whenever a message has used double-quote marks. Scott On 12/12/2014 02:08 PM, McLoo wrote:
|
|
I can provide examples as well. My Emacs nXML mode notifies on malformed XML: I get "Invalid Code" on the first "5" in following message which might indicate some kind escaping issue with Emoticons I used in this message: In TextSecure, this message was basically only a single emoji. Don't know what the second number stands for. With my current TextSecure, the issue with missing closing quotation marks seems to be gone. Sorry, could not find out my version number in the App. But it's not 2.3.3 since I got the update suggestion right now :-) |
|
@MacaGovani thanks for your explanation. I'm pretty sure excel complains about an invalid Unicode character with error number -1072896737. (Details of XML-Error) This is because the escaping of Unicode characters. sth like what is more of concern to me: the |
|
@novoid We have to do this kind of charter escaping to keep XML Backup & Restore compatibility (see #1379 (comment)) |
|
OK I see. My own read-in-XML-backup-and-convert-it-to-Emacs-Orgmode works with the current format. Thanks for fixing the missing quotation marks! |
|
sample of actual text-secure output, with some of the message lines, with appears to have root cause of message with quotes in the message. |
|
sample of 3 messages (the bad xml) all the personal info has been faked to non-real persons & phone numbs |
|
No description provided. |
|
@MacaGovani thanks for your reply. And please also post the text of the such a message, not the only the bad XML file. Or maybe a screenshot of the text. And by the way: what version of TextSecure are you using? All attributes in the XML file should be in double quotes, not single quotes. |
For some messages, the 'body' attribute in the xml file doesn't get closed. This causes "Error importing backup!" when trying to import.
Example of bad XML:
The text was updated successfully, but these errors were encountered: