Aerc was working great for me until I sent myself a certain email that it doesn't like. As long as this email is in my inbox, loading displays this error message and the row where the email should appear remains loading.
The first time I saw this, aerc panicked a few seconds later: https://paste.sr.ht/~yujiri/f25a261c6532c86ad0db7283b0b99fea99eeb632
Every time since then, however, it never crashes and I'm still able to open other emails in my inbox.
I'm running Artix Linux and the error occurs with the packaged aerc 0.5.2-2, and also with a from-source build using master (1687e558).
I've pasted the exact content of the email as downloaded from Gmail's "Show original": https://paste.sr.ht/~yujiri/d5bdab5dd9b84035cb8cb3154988d89f4f4b3988