Uncaught exception trying to get a charset alias + not able to save message
Categories
(Thunderbird :: Mail Window Front End, defect)
Tracking
(thunderbird_esr6870+ fixed, thunderbird70 fixed, thunderbird71 fixed)
People
(Reporter: eyalroz1, Assigned: jorgk-bmo)
Details
Attachments
(2 files)
961 bytes,
text/plain
|
Details | |
1.32 KB,
patch
|
aceman
:
review+
jorgk-bmo
:
approval-comm-beta+
jorgk-bmo
:
approval-comm-esr68+
|
Details | Diff | Splinter Review |
Consider the soon-to-be-attached folder.
When I view this folder, with TB 68.1.1 and no extensions, I get the following in the console:
NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsICharsetConverterManager.getCharsetAlias] jsmime.jsm:49
Also, if I try to save the message as an .eml file - it fails silently, i.e. I select the menu entry, it does nothing, and nothing is added to the log.
This is somewhat related to bug 1555471.
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
Let me correct my earlier message: The no-log-entry is with TB 60.9.0.With TB 68.1.1 I do get an error:
NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsICharsetConverterManager.getCharsetAlias] jsmime.jsm:54
MimeTextDecoder resource:///modules/jsmime.jsm:54
convert8BitHeader resource:///modules/jsmime/jsmime.js:690
parseHeaderField resource:///modules/mimeParser.jsm:238
decodeMimeHeader jar:file:///opt/versions/thunderbird-68.1.1/omni.ja!/components/mimeJSComponents.js:536
SaveAsFile chrome://messenger/content/mailCommands.js:359
MsgSaveAsFile chrome://messenger/content/mailWindowOverlay.js:2258
oncommand chrome://messenger/content/messenger.xul:1
Assignee | ||
Comment 2•5 years ago
•
|
||
Thanks for the report. The charset of the message is invalid, no such thing as iso-8859-I with the uppercase letter I as in Ibiza. I doubt there is an issue when just viewing the message, but I will try when I'm back at my desk. I'll see what can be done about saving the message, it's likely impossible since the charset is invalid and hence unknown. The message looks like UTF-8, so displaying it will likely work since UTF-8 may be assumed or detected. More later.
Reporter | ||
Comment 3•5 years ago
|
||
Yes, I know about the invalid charset header. The message actually looks like cp1255 or ISO-8859-8-I. My BiDiMailUI extension "fixes" it charset for display.
Assignee | ||
Comment 4•5 years ago
|
||
I should stop commenting on bugs from my phone ;-) - the message looked OK on the phone so I assumed UTF-8.
I think what happens is this. The subject header contains raw iso-8859-8-i which is also invalid. TB first tries UTF-8 and then the invalid fallback iso-8859-I. We can fix the console error but I guess the message will look garbled until someone sets the correct charset in the UI or programmatically.
Reporter | ||
Comment 5•5 years ago
|
||
I'm only complaining about the console error here. Fixing the garbling is what my BiDI Mail UI extension is for.
Assignee | ||
Comment 6•5 years ago
|
||
Your complaint is fully justified ;-) - Here's the fix, still garbled, but noiseless. Looks like some part of the system tries to interpret the subject as ANSI/windows-1252 whereas the Mozilla platform assumes UTF-8 for the body. So you get:
Subject: Message 20 - äú÷áìä úâåáä ìðåùà
Body:
But at least the subject is now the same in the tread pane and the header pane, before it was blank in the tread pane.
Assignee | ||
Comment 7•5 years ago
|
||
BTW, saving works, too, only the filename is derived from the ugly subject.
Reporter | ||
Comment 8•5 years ago
|
||
@JorgK: I should have noticed this regression a long while ago - it's not that recent, present already in v38.8.0 . I was a bit careless with the regression tests on my extension.
Comment on attachment 9097224 [details] [diff] [review] 1584822-try-catch.patch Review of attachment 9097224 [details] [diff] [review]: ----------------------------------------------------------------- Thanks, works for me on the attached test message. The error prevented the message subject to display in the thread pane, prevented saving of the message to a file. Also moving the mouse over the subject caused this error to log into the console hundreds of times (we probably re-decode the boxes text content at each redraw). So the error wasn't as harmless as it looked :)
Reporter | ||
Comment 10•5 years ago
|
||
@aceman: In that case, please also try to get this committed this onto the 68.x branch.
Comment 11•5 years ago
|
||
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/1b282633191d
add try/catch around MimeTextDecoder() in convert8BitHeader(). r=aceman
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 12•5 years ago
|
||
TB 68.1.2 or TB 68.2:
https://hg.mozilla.org/releases/comm-esr68/rev/7c12a5f614ca046ba37d90f5cb787bb519b0daa8
Assignee | ||
Comment 13•5 years ago
|
||
TB 70 beta 3:
https://hg.mozilla.org/releases/comm-beta/rev/dee1eda354aa11090ea77ced1d5de6ac27f26ae1
Description
•