8000 DC with pgp-contacts doesn't see outgoing messages from the first device · Issue #6856 · chatmail/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DC with pgp-contacts doesn't see outgoing messages from the first device #6856

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

Open
iequidoo opened this issue May 16, 2025 · 3 comments
Open
Assignees
Labels
bug Something is not working

Comments

@iequidoo
Copy link
Collaborator
iequidoo commented May 16, 2025
  • Take the existing DC profile (i used release DC Desktop with Gmail for that).
  • Install DC Android+pgp-contacts and add it as a second device to that profile.
  • Send your invite QR code (copying it on Android+pgp-contacts) to a new chatmail contact and make it scan it. Securejoin completes successfully and the chat has green checkmark on both devices.
  • Send a message from the first device.
  • You won't see it on Android+pgp-contacts. NOTE: Incoming messages are all visible on both devices.
  • Rename the contact on the first device.
  • You'll still see the old name on Android+pgp-contacts.

Used versions: DC Desktop 1.58.2 (core 1.159.4) (w/o sign_unencrypted), DC Android + pgp-contacts from deltachat/deltachat-android#3734 (comment)

@iequidoo iequidoo added the bug Something is not working label May 16, 2025
@hpk42
Copy link
Contributor
hpk42 commented May 16, 2025 via email

@iequidoo
Copy link
Collaborator Author

You are adding the sqltables from pgpgbranch to a non-pgpbranch?

No, i did vice versa. Edited the description to make it more clear.

Probably need to retest this with chatmail, maybe there's smth wrong with handling multiple folders, moreover Gmail copies sent messages to Sent.

@iequidoo
Copy link
Collaborator Author
iequidoo commented May 18, 2025

Reproduced this with a chatmail profile (instead of Gmail). Also this reproduces with two Android setups, i.e. the bug isn't specific to Desktop.
EDIT: Self-assigning, feel free to steal if you have ideas about the reason and a possible fix.

Log with receipt of the problem message:

05-18 07:59:49.117 14173 14214 🔵 DeltaChat: [accId=1] src/imap.rs:1323: Starting a full FETCH of message set "38".
05-18 07:59:49.293 14173 14214 🔵 DeltaChat: [accId=1] src/imap.rs:1434: Passing message UID 38 to receive_imf().
05-18 07:59:49.304 14173 14214 🔵 DeltaChat: [accId=1] src/receive_imf.rs:203: Receiving message "fdd3946f-9915-44b3-b066-5f7e12a47522@localhost", seen=false...
05-18 07:59:49.306 14173 14214 🟠 DeltaChat: [accId=1] src/imap.rs:1456: receive_imf error: Non-PGP contact Contact#18 cannot be verified.
05-18 07:59:49.307 14173 14214 🔵 DeltaChat: [accId=1] src/imap.rs:1475: Successfully received 1 UIDs.
05-18 07:59:49.307 14173 14214 🔵 DeltaChat: [accId=1] src/imap.rs:749: 1 mails read from "INBOX".

So for some reason it thinks that the contact from "To" is a non-PGP contact. Btw, if send a message from the pgp-contacts device, it heals.

It seems that lookup_pgp_contacts_by_address_list() isn't called here:

        } else if let Some(chat_id) = chat_id {
            to_ids = lookup_pgp_contacts_by_address_list(
                context,
                &mime_parser.recipients,
                to_member_fingerprints,
                chat_id,
            )
            .await?;

because it's the first outgoing message and get_parent_message() probably returns None, so chat_id is also None, but i just looked at the code, didn't really try to debug.

If so, a possible fix is to let lookup_pgp_contact_by_address() accept chat_id = None and return Ok as long as we have the only such contact with nonempty fingerprint. If we have multiple such contacts, i think it's not worth fixing this, it's only a compatibility bug and even if the current non-pgp-contacts Core adds, say, vc-contact-confirm's rfc724_mid to References, there are anyway many reasons why referenced messages may be absent on another device.

@iequidoo iequidoo self-assigned this May 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working
Projects
None yet
Development

No branches or pull requests

2 participants
0