~sircmpwn/aerc2#251:
panic when fetching message headers

aerc crashes if I try to view messages with the following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x439af75]

goroutine 1 [running]:
git.sr.ht/~sircmpwn/aerc/widgets.HeaderLayout.forMessage(0xc0000ba1e0, 0x4, 0x4, 0xc0000c2b40, 0x0, 0x0, 0x203000)
    /Users/matthias/.local/share/aerc/widgets/headerlayout.go:18 +0x125
git.sr.ht/~sircmpwn/aerc/widgets.NewMessageViewer(0xc0000c2460, 0xc0000b41a0, 0xc00018c000, 0xc0000c2b40, 0xc0000d5c28)
    /Users/matthias/.local/share/aerc/widgets/msgviewer.go:50 +0x61
git.sr.ht/~sircmpwn/aerc/commands/account.ViewMessage.Execute(0xc0000ec3f0, 0xc0004a12f0, 0x1, 0x1, 0x0, 0xc000166e90)
    /Users/matthias/.local/share/aerc/commands/account/view.go:36 +0x16c
git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand(0xc0000bc180, 0xc0000ec3f0, 0xc0004a12f0, 0x1, 0x1, 0xc00009e050, 0x453d701)
    /Users/matthias/.local/share/aerc/commands/commands.go:65 +0xfe
main.execCommand(0xc0000ec3f0, 0xc00019c0f0, 0xc0004a12f0, 0x1, 0x1, 0xc0004a12f0, 0xc0002a8000)
    /Users/matthias/.local/share/aerc/aerc.go:58 +0xc5

This happens for every message in my Inbox. Two weeks ago when I tried aerc the first time with the same mailbox on a different computer, I could view messages just fine.

aerc was built from the latest master (version tag 0.2.1)

Status
REPORTED
Submitter
~mbger
Assigned to
No-one
Submitted
2 months ago
Updated
a month ago
Labels
No labels applied.

~mbger 2 months ago

Seems to be related to the official ProtonMail Bridge. It certainly worked in the past, but not anymore. Using hydroxide did fix this issue for me.

~pmolloy 2 months ago

I just ran into the same issue using protonmail-bridge v1.1.6

~pmolloy a month ago

msg.RFC822Header is nil when passed to forMessage(). I was able to grep around and in worker/imap/fetch.go within handleFetchMessage() perhaps unsurprisingly header is also nil. It looks like textproto.Reader() is returning an error and header is only assigned something if there is no error. Basically the error is not handled.

~pmolloy a month ago

It looks like this was introduced by b83e7c9fa6a0d187a0f20d98d522cff792053cdd on Fri Jun 7 13:56:14 2019. Note the error returned by textproto.ReaderHeader() is EOF.

Register here or Log in to comment, or comment via email.