deltachat / deltachat-core-rust

Delta Chat Rust Core library, used by Android/iOS/desktop apps, bindings and bots 📧
https://delta.chat/en/contribute
Other
659 stars 85 forks source link

failure to send read receipt if message is deleted after markseen is called #5710

Closed adbenitez closed 3 months ago

adbenitez commented 3 months ago

I am calling markseen_msgs JSON-RPC API to mark incoming messages as seen, soon after, the incoming messages are deleted, sometimes it seems there are some race in core and the markseen fails even if the delete_messages is being called after the markseen_msgs call returns (see logs below)

Context: I have some bots that handle sensitive information, like web gateways, they should forget/delete message requests with URLs as soon as they finish processing/replying to the user

Log:

Jun 20 15:01:17 bomba python[508379]: WARNING  src/smtp.rs:835: Error sending MDN for Msg#16597186, removing it:
Jun 20 15:01:17 bomba python[508379]:          Message Msg#16597186 does not exist.
Jun 20 15:01:17 bomba python[508379]: WARNING  src/scheduler.rs:770: send_smtp_messages failed: Failed to send MDNs:
Jun 20 15:01:17 bomba python[508379]:          Message Msg#16597186 does not exist.
Jun 20 15:01:18 bomba python[508379]: WARNING  src/quota.rs:141: cannot get highest quota usage: no quota_resource
Jun 20 15:01:18 bomba python[508379]:          found, this is unexpected
Jun 20 15:01:21 bomba python[508379]: WARNING  src/quota.rs:141: cannot get highest quota usage: no quota_resource
Jun 20 15:01:21 bomba python[508379]:          found, this is unexpected
Jun 20 15:01:21 bomba python[508379]: WARNING  src/smtp.rs:835: Error sending MDN for Msg#16597187, removing it:
Jun 20 15:01:21 bomba python[508379]:          Message Msg#16597187 does not exist.
Jun 20 15:01:21 bomba python[508379]: WARNING  src/scheduler.rs:770: send_smtp_messages failed: Failed to send MDNs:
Jun 20 15:01:21 bomba python[508379]:          Message Msg#16597187 does not exist.