Skip to content

Conversation

@link2xt
Copy link
Collaborator

@link2xt link2xt commented Nov 4, 2025

Closes #7321

Copy link
Collaborator

@iequidoo iequidoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good if such messages could be received later after fixing the problem, i think this will usually happen when an outdated version is used. Are there any ideas about this? Maybe we can at least remember the first failed message UID in the imap_sync table so that we can retry later?

src/imap.rs Outdated
warn!(context, "receive_imf error: {err:#}.");

let text = format!(
"There was an error receiving some message. Please report this bug to developers. The error message is: {err:#}."
Copy link
Collaborator

@Hocuri Hocuri Nov 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"There was an error receiving some message. Please report this bug to developers. The error message is: {err:#}."
"There was an error receiving some message. Please report this bug to delta@merlinux.eu or https://support.delta.chat/. The error message is: {err:#}."

@r10s
Copy link
Contributor

r10s commented Nov 5, 2025

may these errors been triggered when accounts_background_fetch() is terminated by the system?

as that is a quite common case (even if premessage will mitigate things a lot, it can happen on slow network, eg. not sure if core can respect the timeout given in all cases) - so wondering if we retry messages failing in background once in the normal forgroud loop - only if that fails as well, we write a device message

if that makes sense, we should create a separate issue, however. this PR is fine as is to move forward.

goal is that the user does not see the message at all on normal usage (i have seen the old partial download here and then since it was introduces not so long ago)

@link2xt
Copy link
Collaborator Author

link2xt commented Nov 5, 2025

may these errors been triggered when accounts_background_fetch() is terminated by the system?

No, this can only happen if receive_imf returns an error. If receive_imf is cancelled, the message is not written.

@link2xt link2xt force-pushed the link2xt/xlkmqompqlss branch 3 times, most recently from 69d82c5 to ac76ad2 Compare November 5, 2025 13:12
@link2xt link2xt force-pushed the link2xt/xlkmqompqlss branch from ac76ad2 to c725e66 Compare November 5, 2025 13:35
@link2xt link2xt merged commit 81ba2d2 into main Nov 5, 2025
29 checks passed
@link2xt link2xt deleted the link2xt/xlkmqompqlss branch November 5, 2025 14:11
@iequidoo
Copy link
Collaborator

iequidoo commented Nov 5, 2025

The problem is that the user will never see failed messages even after updating Delta Chat if it was a compatibility issue. The stuck IMAP loop may be even better in this sense. Are we going to do smth with this? Compatibility testing is complicated and there always will be users not updating on time.

EDIT: Maybe the device message should be suggesting updating Delta Chat and restoring a recent backup if the user has any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

receive_imf_inner() shouldn't fail for partial downloads

5 participants