Open kiil opened 4 days ago
Same behavior here. And I believe it's a bug.
First run with --trace
himalaya message read 29300 --debug
2024-11-10T05:52:21.455544Z INFO himalaya::email::message::command::read: executing read message(s) command
2024-11-10T05:52:21.455613Z DEBUG email::imap: building 1 IMAP clients
2024-11-10T05:52:21.456584Z DEBUG client::build: rustls::client::hs: No cached session for DnsName("imap.gmail.com")
2024-11-10T05:52:21.456677Z DEBUG client::build: rustls::client::hs: Not resuming any session
2024-11-10T05:52:21.460621Z DEBUG client::build: rustls::webpki::anchors: add_parsable_certificates processed 133 valid and 0 invalid certs
2024-11-10T05:52:21.460632Z DEBUG client::build: rustls_platform_verifier::verification::others: Loaded 133 CA certificates from the system
2024-11-10T05:52:22.580797Z DEBUG client::build: rustls::client::hs: Using ciphersuite TLS13_AES_256_GCM_SHA384
2024-11-10T05:52:22.580834Z DEBUG client::build: rustls::client::tls13: Not resuming
2024-11-10T05:52:22.580950Z DEBUG client::build: rustls::client::tls13: TLS1.3 encrypted extensions: []
2024-11-10T05:52:22.580962Z DEBUG client::build: rustls::client::hs: ALPN protocol is None
2024-11-10T05:52:23.025565Z DEBUG client::build: email::imap: using password authentication
2024-11-10T05:52:23.025584Z DEBUG client::build: email::imap: supported auth mechanisms mechanisms=[XOAuth2, Plain, Other(AuthMechanismOther(Atom("PLAIN-CLIENTTOKEN"))), OAuthBearer]
2024-11-10T05:52:23.025608Z DEBUG client::build: email::imap: trying auth mechanism… mechanism=XOAuth2
2024-11-10T05:52:23.025613Z DEBUG client::build: email::imap: trying auth mechanism… mechanism=Plain
2024-11-10T05:52:24.074516Z DEBUG client::build: email::imap: authentication succeeded! mechanism=Plain
2024-11-10T05:52:24.074649Z INFO email::email::message::get::imap: getting messages 29300 from folder INBOX
2024-11-10T05:52:24.074664Z DEBUG email::imap: client 1/1 is free, locking it
2024-11-10T05:52:24.074680Z DEBUG email::email::message::get::imap: utf7 encoded folder: INBOX
2024-11-10T05:52:24.465198Z WARN select_mailbox{client=1}: imap_codec::response: Rectified missing `text` to "..."
2024-11-10T05:52:24.465217Z WARN select_mailbox{client=1}: imap_client::tasks::resolver: received unsolicited unsolicited=Status(Untagged(StatusBody { kind: Ok, code: Some(Other(CodeOther(b"HIGHESTMODSEQ 2865203"))), text: Text("...") }))
2024-11-10T05:52:24.465243Z WARN select_mailbox{client=1}: imap_client::tasks::tasks::select: missing required UNSEEN OK untagged response
2024-11-10T05:52:24.989799Z WARN fetch_messages{client=1}: imap_client::tasks::tasks::fetch: received duplicate items seq=28974 items=[Uid(29300), Flags([Flag(Seen)]), BodyExt { section: None, origin: None, data: NString(Some(Literal(Literal { data: b"Delivered-To: ayanamists@gmail.com\r\nReceived: by 2002:adf:e604:0:b0:37c:cc5d:583 with SMTP id p4csp4373631wrm;\r\n Sat, 9 Nov 2024 21:47:00 -0800 (PST)\r\nX-Forwarded-Encrypted: i=2; AJvYcCUGN+NhV6C6jl8kF9/vzEilD0YyZmQnEA62sFRwaB1tobB6o8YpU643Sdf74jW39awK7Lg8r8hHzleh@gmail.com\r\nX-Google-Smtp-Source: AGHT+IHuXHdKfj1h7/2gf3Xqqtp6/fsBv2eXDKPrxj/vcNwwR3jw3SXBUs9o/NeoSE1BQtlgpd6R\r\nX-Received: by 2002:a05:620a:3725:b0:7b1:560d:1a39 with SMTP id af79cd13be357-7b331e7560fmr1174099585a.62.1731217620068;\r\n Sat, 09 Nov 2024 21:47:00 -0800 (PST)\r\nARC-Seal: i=1; a=rsa-sha256; t=1731217620; cv=none;\r\n d=google.com; s=arc-20240605;\r\n b=ZQJZN3T+hE3Fi1NlfAewclK+bTB5SR9MR7KJycId9OC8U1w2Dqp52acyyVWBtmKpem\r\n rE9UKKzNn8J7Do1ocI4MiEm4HuC5tGzQ5LBR5oBZZ4LTpJAxdkd4BY6SqbWr6SN3Nzi+\r\n q75IzRNOwbs7EYw5TX1paLDjmvALej20aus4bnU77qJCVDZKvOG0l2KfZEdPIzZWkraS\r\n JYKWp217x1IJvqS1/diBpQnQgcialJ/0wI1IClQ89S9PsiQ1x75V8HKcds2THAiNrUMP\r\n SSfS605TphXg2eED5gPrms4iwjGy/653deVB0vEIE0OCb0t2yjac+uvju+7RdeVrUv2I\r\n fa4Q==\r\nARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;\r\n h=sender:errors-to:list-subscribe:list-help:list-post:list-archive\r\n :list-unsubscribe:list-id:precedence:references:subject:in-reply-to\r\n :cc:to:from:message-id:date:dkim-signature;\r\n bh=nB1+dNQ9hcIxl/9kL1m/X+dzc/FHODvYe+nQU2jaHec=;\r\n fh=W41RsiLgmnf9k/Cf3kTtuMRI0MnSgvJUJloMQNw7I7M=;\r\n b=gn72SxEjCU+qX9mxC0k4ihRBVwuYoVVo5COVZatnz6a3f1SfFFUfzqiIolZ1c51FYV\r\n OAay7G3d9QVCsWOP9Tb9hiDXXNsNfqr2H6pyQzWQDN1Pq1XwxFTcEcIXypWQ7XcwTpwl\r\n Er3bW9wYZEMexlA2ZYSjntfIzub3i9Jbr37NYyWFwMCmMvPZHPm9Ja7S1UGif5+w3BT8\r\n xx9bOS7CvRzTehVnU62awQJzLrjlyXSICeWp8bDLyBjmXSX4/WLUWArA8FKj8wc/eB+R\r\n yMPbO9VLLmKpjnK01EFdl5gU+TL1fF7DJiMTzkh8Hr4Z+qMCfc2esgn7jZw3iTh3TvuF\r\n 2FlQ==;\r\n dara=google.com\r\nARC-Authentication-Results: i=1; mx.google.com;\r\n dkim=pass header.i=@gnu.org header.s=fencepost-gnu-org header.b=S7eMbph6;\r\n spf=pass (google.com: domain of emacs-devel-bounces+ayanamists=gmail.com@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=\"emacs-devel-bounces+ayanamists=gmail.com@gnu.org\";\r\n dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org\r\nReturn-Path: <emacs-devel-bounces+ayanamists=gmail.com@gnu.org>\r\nReceived: from lists.gnu.org (lists.gnu.org. [209.51.188.17])\r\n by mx.google.com with ESMTPS id d75a77b69052e-462ff675b9fsi74811031cf.571.2024.11.09.21.46.59\r\n for <ayanamists@gmail.com>\r\n (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256);\r\n Sat, 09 Nov 2024 21:47:00 -0800 (PST)\r\nReceived-SPF: pass (google.com: domain of emacs-devel-bounces+ayanamists=gmail.com@gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17;\r\nAuthentication-Results: mx.google.com;\r\n dkim=pass header.i=@gnu.org header.s=fencepost-gnu-org header.b=S7eMbph6;\r\n spf=pass (google.com: domain of emacs-devel-bounces+ayanamists=gmail.com@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=\"emacs-devel-bounces+ayanamists=gmail.com@gnu.org\";\r\n dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org\r\nReceived: from localhost ([::1] helo=lists1p.gnu.org)\r\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\r\n\t(envelope-from <emacs-devel-bounces@gnu.org>)\r\n\tid 1tA0m7-0008Lp-8p; Sun, 10 Nov 2024 00:46:15 -0500\r\nReceived: from eggs.gnu.org ([2001:470:142:3::10])\r\n by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\r\n (Exim 4.90_1) (envelope-from <eliz@gnu.org>) id 1tA0m0-0008LV-Hl\r\n for emacs-devel@gnu.org; Sun, 10 Nov 2024 00:46:09 -0500\r\nReceived: from fencepost.gnu.org ([2001:470:142:3::e])\r\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\r\n (Exim 4.90_1) (envelope-from <eliz@gnu.org>)\r\n id 1tA0lz-0004vA-08; Sun, 10 Nov 2024 00:46:07 -0500\r\nDKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;\r\n s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:\r\n mime-version; bh=nB1+dNQ9hcIxl/9kL1m/X+dzc/FHODvYe+nQU2jaHec=; b=S7eMbph62prd\r\n q8rvwOqaNbz5b1kIUEDPNFKXvJaHLyt8FP+d5ABOywEHdzZKjjS06cyiXUyedLWuXW0bSVjsg4GcR\r\n FE74/mcIGZKRkkHjZUIYK5FmaxCPMHCxJv019bb81IGf04XAcnYHgctMd1/4MX0DVIoOi3xxs2EyP\r\n Yc/pfpLeMee1n2lqmoL2uCx8oMWa/oV0SR60KYAaBrh5/6fSalDYXw7C/OFswyayYdzqq2oWyB7K8\r\n 9ohmDwPWkjL8AAysFSJCy6TluLXB9tqO38eH8JqZq6sJhO9Fs3vLKiuOn5XQcDyhhokEq3MKjkCr4\r\n cuwDSM2Y+mirXOOZDjwRig==;\r\nDate: Sun, 10 Nov 2024 07:46:04 +0200\r\nMessage-Id: <86pln3ljz7.fsf@gnu.org>\r\nFrom: Eli Zaretskii <eliz@gnu.org>\r\nTo: Stephen Berman <stephen.berman@gmx.net>\r\nCc: joseph@breatheoutbreathe.in, emacs-devel@gnu.org\r\nIn-Reply-To: <87fro0t6sj.fsf@gmx.net> (message from Stephen Berman on Sat, 09\r\n Nov 2024 22:51:24 +0100)\r\nSubject: Re: Unexpected behavior of format-number with format-prompt\r\nReferences: <875xp0b00l.fsf@breatheoutbreathe.in> <86h68jqyut.fsf@gnu.org>\r\n <87jzdfp2zg.fsf@gmx.net> <86ses3p0c3.fsf@gnu.org>\r\n <87fro3ox37.fsf@gmx.net> <87v7ww6xi5.fsf@breatheoutbreathe.in>\r\n <87fro0t6sj.fsf@gmx.net>\r\nX-BeenThere: emacs-devel@gnu.org\r\nX-Mailman-Version: 2.1.29\r\nPrecedence: list\r\nList-Id: \"Emacs development discussions.\" <emacs-devel.gnu.org>\r\nList-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,\r\n <mailto:emacs-devel-request@gnu.org?subject=unsubscribe>\r\nList-Archive: <https://lists.gnu.org/archive/html/emacs-devel>\r\nList-Post: <mailto:emacs-devel@gnu.org>\r\nList-Help: <mailto:emacs-devel-request@gnu.org?subject=help>\r\nList-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,\r\n <mailto:emacs-devel-request@gnu.org?subject=subscribe>\r\nErrors-To: emacs-devel-bounces+ayanamists=gmail.com@gnu.org\r\nSender: emacs-devel-bounces+ayanamists=gmail.com@gnu.org\r\n\r\n> From: Stephen Berman <stephen.berman@gmx.net>\r\n> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org\r\n> Date: Sat, 09 Nov 2024 22:51:24 +0100\r\n> \r\n> > I think we're better off documenting the idiosyncrasy in the\r\n> > `read-number' docstring as Eli suggested.\r\n> \r\n> That's certainly the path of least risk, though I can't think of a\r\n> plausible use where my patch would result in duplication in the prompt\r\n> string.\r\n\r\nMaybe so, but it's just too kludgey to my palate, sorry.\r\n\r\n", mode: Sync }))) }]+
2024-11-10T05:52:24.990828Z DEBUG fetch_messages{client=1}: email::email::message: cannot build imap message err=ParseEmailEmptyRawError
It seems that the himalaya exit with some error (ParseEmailEmptyRawError
), but with exit code 0 (why?).
The second run will display the email body
himalaya message read 29300 --debug
2024-11-10T05:54:02.024954Z INFO himalaya::email::message::command::read: executing read message(s) command
2024-11-10T05:54:02.025011Z DEBUG email::imap: building 1 IMAP clients
2024-11-10T05:54:02.025928Z DEBUG client::build: rustls::client::hs: No cached session for DnsName("imap.gmail.com")
2024-11-10T05:54:02.026017Z DEBUG client::build: rustls::client::hs: Not resuming any session
2024-11-10T05:54:02.030045Z DEBUG client::build: rustls::webpki::anchors: add_parsable_certificates processed 133 valid and 0 invalid certs
2024-11-10T05:54:02.030054Z DEBUG client::build: rustls_platform_verifier::verification::others: Loaded 133 CA certificates from the system
2024-11-10T05:54:02.141692Z DEBUG client::build: rustls::client::hs: Using ciphersuite TLS13_AES_256_GCM_SHA384
2024-11-10T05:54:02.141739Z DEBUG client::build: rustls::client::tls13: Not resuming
2024-11-10T05:54:02.141917Z DEBUG client::build: rustls::client::tls13: TLS1.3 encrypted extensions: []
2024-11-10T05:54:02.141928Z DEBUG client::build: rustls::client::hs: ALPN protocol is None
2024-11-10T05:54:02.570686Z DEBUG client::build: email::imap: using password authentication
2024-11-10T05:54:02.570711Z DEBUG client::build: email::imap: supported auth mechanisms mechanisms=[XOAuth2, Plain, Other(AuthMechanismOther(Atom("PLAIN-CLIENTTOKEN"))), OAuthBearer]
2024-11-10T05:54:02.570736Z DEBUG client::build: email::imap: trying auth mechanism… mechanism=XOAuth2
2024-11-10T05:54:02.570742Z DEBUG client::build: email::imap: trying auth mechanism… mechanism=Plain
2024-11-10T05:54:03.061869Z DEBUG client::build: email::imap: authentication succeeded! mechanism=Plain
2024-11-10T05:54:03.062011Z INFO email::email::message::get::imap: getting messages 29300 from folder INBOX
2024-11-10T05:54:03.062042Z DEBUG email::imap: client 1/1 is free, locking it
2024-11-10T05:54:03.062054Z DEBUG email::email::message::get::imap: utf7 encoded folder: INBOX
2024-11-10T05:54:03.449709Z WARN select_mailbox{client=1}: imap_codec::response: Rectified missing `text` to "..."
2024-11-10T05:54:03.449729Z WARN select_mailbox{client=1}: imap_client::tasks::resolver: received unsolicited unsolicited=Status(Untagged(StatusBody { kind: Ok, code: Some(Other(CodeOther(b"HIGHESTMODSEQ 2865255"))), text: Text("...") }))
2024-11-10T05:54:03.449757Z WARN select_mailbox{client=1}: imap_client::tasks::tasks::select: missing required UNSEEN OK untagged response
... (body here)
And also, himalaya-emacs
could not work properly dues to this problem.
I can confirm the debug info from @ayanamists
This issue tells me sth, I must check archives. If I remember well, Gmail sends twice the envelope, but only one contains the body. I will check back tomorrow morning and let you know. Thank you!
Hi - I am using
Himalaya
with gmail through oauth. Works fine :)But there is a curious detail, and I am not sure if it is a feature or a bug:
Any unseen message, whether unread from Himalaya or Gmail web app, I must access twice with the
himalaya message read <id>
command to see the actual content. First time the unread flag is removed, and only on the second run - the message is actually shown.