Could not authenticate document's contents when syncing old emails with the new streaming Soledad feature
While testing the updated Soledad version that contains streaming branch improvements in Pixelated, we were unable to sync old emails. In other words, all emails that were sent with the new version were received and synced without a problem. However, the emails that the user already had were now not showing up.
We get the following error: "Could not authenticate document's contents"
In debug mode, we printed out the contents of the email that was being synched and eventually the error that we got.
2017-01-06 13:10:54 [stdout] INFO > /home/vagrant/user-agent-venv/src/leap.soledad.client/client/src/leap/soledad/client/http_target/fetch.py(118)__atomic_doc_parse()
2017-01-06 13:10:54 [stdout] INFO -> if is_symmetrically_encrypted(content):
l
2017-01-06 13:10:58 [stdout] INFO (Pdb) 113
2017-01-06 13:10:58 [stdout] INFO 114 @defer.inlineCallbacks
2017-01-06 13:10:58 [stdout] INFO 115 def __atomic_doc_parse(self, doc_info, content, total):
2017-01-06 13:10:58 [stdout] INFO 116 doc = SoledadDocument(doc_info['id'], doc_info['rev'], content)
2017-01-06 13:10:58 [stdout] INFO 117 import pdb; pdb.set_trace()
2017-01-06 13:10:58 [stdout] INFO 118 -> if is_symmetrically_encrypted(content):
2017-01-06 13:10:58 [stdout] INFO 119 content = yield self._crypto.decrypt_doc(doc)
2017-01-06 13:10:58 [stdout] INFO 120 elif old_crypto.is_symmetrically_encrypted(doc):
2017-01-06 13:10:58 [stdout] INFO 121 content = self._deprecated_crypto.decrypt_doc(doc)
2017-01-06 13:10:58 [stdout] INFO 122 doc.set_json(content)
2017-01-06 13:10:58 [stdout] INFO 123
content
2017-01-06 13:11:05 [stdout] INFO (Pdb) '{"_mac_method": "hmac", "_enc_scheme": "symkey", "_enc_json": "6c75c0c7e59be9b11c4460803bcd4bc1650fd68cdd4a980d2e458317a07bf47937b721b423b3c950ac0aea64c6111ff017749b18ae72a8d332b7af9aab21bde6c745653d03f8b05fae9bae467e3d5127890824e b1fdfa68bbaee4838d9f2dedf1130296cad9e929d4ba96ddb680df89415510e6a6fab3c9bcdd6ca1f4d79096d59be4d2dd443d8298c3ca0556204ede8a3d28e6ca57c89a766054c37f62a7ac651a13791be05421a5b276c6f82b68fd65fbdda3d5dbbbd07aefea770d5d20f6502d59895086ad2f6ee16370096a9f9cc132c121b197d39c4d63023 5cb4795d0270d48ed9196d39dade116a1d1ca7a849d76f5440a8eb14894a8245488145fba0c70d6d8b05a58cec3ed99d41ee0124d6daefab88cd469b89325946a63311277f", "_mac": "d08f9581675f670369e429eb0829327f8fe486bafc66892223df1e4cbc293961", "_enc_iv": "SUZldZ2G3xHHh6LBADK0vg==\\n", "_enc_method ": "aes-256-ctr"}'
c
2017-01-06 13:11:58 [leap.soledad.client.crypto] WARN wrong MAC while decrypting doc...
2017-01-06 13:11:58 [twisted.internet.defer] CRITICAL Unhandled error in Deferred:
2017-01-06 13:11:58 [stdout] INFO (Pdb) > /home/vagrant/user-agent-venv/local/lib/python2.7/site-packages/twisted/internet/defer.py(700)__del__()
2017-01-06 13:11:58 [stdout] INFO -> debugInfo = self._getDebugTracebacks()
l
2017-01-06 13:12:05 [stdout] INFO (Pdb) 695 # earlier tests; arguably it should be a single error message.
2017-01-06 13:12:05 [stdout] INFO 696 log.critical("Unhandled error in Deferred:",
2017-01-06 13:12:05 [stdout] INFO 697 isError=True)
2017-01-06 13:12:05 [stdout] INFO 698
2017-01-06 13:12:05 [stdout] INFO 699 import pdb; pdb.set_trace()
2017-01-06 13:12:05 [stdout] INFO 700 -> debugInfo = self._getDebugTracebacks()
2017-01-06 13:12:05 [stdout] INFO 701 if debugInfo:
2017-01-06 13:12:05 [stdout] INFO 702 format = "(debug: {debugInfo})"
2017-01-06 13:12:05 [stdout] INFO 703 else:
2017-01-06 13:12:05 [stdout] INFO 704 format = None
2017-01-06 13:12:05 [stdout] INFO 705
self.failResult
2017-01-06 13:12:13 [stdout] INFO (Pdb)
Versions:
- Soledad: leap/develop branch, commit 2997fe41
- Pixelated User Agent: pixelated/soledad-merge branch, commit 3097e7b16db204c4359a27b63d1a493a89e29b14 (but, locally, we changed the services/requirements.txt to use the leap/develop branch)
- Pixelated provider: dev.pixelated-project.org (which temporarily contains the soledad streaming feature)
(from redmine: created on 2017-01-06)