Cleanup incoming mailstore with corrupt documents #981
Comments
Please remember to remove the ignore pattern when this issue is done. |
A few couch queries that might help starting the work:
|
Created a merge request - https://0xacab.org/leap/bitmask-dev/merge_requests/85 for logging doc_id's which fail to decrypt. |
The fix that we have put in seems to be working, which is handle 'ValueError' in case of NODATA in the After fixing this problem, we are seeing a new error that seems to be the result of returning an empty array from this function instead of a string or a deferred as in other return statements in the same function. This is leading to the error in decrypting document as it is expecting a string or a buffer and not a list. Below are the logs for this error -
We need to speak with Leap folks about this error as this piece of code has a lot of comments which we don't know about. |
As the above error is not related to the original error in this card, we are moving this to 'pr in other project'. We have created a pull-request - https://0xacab.org/leap/bitmask-dev/merge_requests/87 for this. |
In addition to the UnicodeError exception in _process_decrypted_doc function, we have added ValueError to the exception list so that we can catch any error in JSON parsing, specially a 'NODATA' error that we were getting with some of the emails. This is in reference to issues - pixelated/pixelated-user-agent#908 & pixelated/pixelated-user-agent#981 - to ignore documents that have this problem and not have Soledad try to sync them again and again. with @deniscostadsc
When recieving mails for an account with an expired key, documents in the incoming mailstore end up being corrupt and the useragent logs erors for those (see #908).
We need to clean them on wazokazi.
The text was updated successfully, but these errors were encountered: