Bug: TB 102.0.2 Problems fetching, displaying new mail, especially in local folders, after upgrade to 102; many errors in console log
Status: RESOLVED
Priority: --
Resolution: DUPLICATE
Created: 2022-08-02 12:20:06+00:00
Resolved: 2022-08-03 10:48:40+00:00

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0

Steps to reproduce:

Continued to use Thunderbird after the (automatic through the Gnome Software application manager) upgrade to 102.0.2

No change on my part from the way i have used Thunderbird from the past month, year, decade.


Actual results:

On Sunday, i did not see an

Yesterday, there were conspicuously no messages received after 12:32pm.

To quote myself giving the heads up to my coworkers:

> seems about a day into using the new Thunderbird it is no longer getting e-mail. If i press "Get Messages" it does nothing. If i tell it to get a specific accounts e-mail, it tells me to wait for it to be done processing. Oh, now it says host contacted, sending login information… but it must be failing silently in the background, maybe some certificate or password it needs that it is not asking me for. Unless May First e-mail is down.
>
> And the search is still picking a handful of results out of the much larger amount it should give, but that seemed to start a few days before the update.
>
> is my fear that they focused on the UI and broke everything come true?
>
> or can it just not handle several hundred thousand e-mails? I don't think i'm even at a million,
>
> Disabled google-connected calendars because why not, they were always slow and they are even slower in the new TBird 102
>
> 23rd try to get e-mail just for the main Agaric account and it claims to be "Downloading message 2 of 37" but it's been saying that for a while now. Still, progress, i guess.
>
> … still there …
>
> oh no now it switched to saying "ask@agaric.com is up to date" presumably because half an hour passed and it was time to automatically check other mailboxes while still stuck.
>
> yep if i try it again: "The account ben is being processed. Please wait until processing is complete to get messages."

Today, i captured all the problems alongside the console log:

```
Successfully loaded OpenPGP library librnp.so.0 version 0.16.0-1 from system's standard library locations RNPLib.jsm:100:15
Found 21 public keys and 4 secret keys (4 protected, 0 unprotected) RNPLib.jsm:301:15
Trying to load /usr/lib/thunderbird/libotr.so OTRLib.jsm:64:11
Trying to load libotr.so from system's standard library locations OTRLib.jsm:64:11
Trying to load libotr.so.5 from system's standard library locations OTRLib.jsm:64:11
Trying to load libotr.so from system's standard library locations OTRLib.jsm:64:11
Error: Cannot load required OTR library
    loadExternalOTRLib resource:///modules/OTRLib.jsm:109
    init resource:///modules/OTRLib.jsm:115
    once resource:///modules/OTR.jsm:117
    init resource:///modules/OTR.jsm:138
    init resource:///modules/OTRUI.jsm:255
OTR.jsm:126:15
services.settings: Failed to load last_modified.json: TypeError: NetworkError when attempting to fetch resource. Utils.jsm:330
Calendar: 
Exception { name: "NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS", message: "[JavaScript Error: \"zone is null\" {file: \"resource:///modules/calendar/Ical.jsm\" line: 5520}]'[JavaScript Error: \"zone is null\" {file: \"resource:///modules/calendar/Ical.jsm\" line: 5520}]' when calling method: [calIDateTime::getInTimezone]", result: 2153185313, filename: "resource:///modules/calendar/calStorageHelpers.jsm", lineNumber: 189, columnNumber: 0, data: XPCWrappedNative_NoHelper, stack: "newDateTime@resource:///modules/calendar/calStorageHelpers.jsm:189:19\ngetEventFromRow@resource:///modules/calendar/CalStorageItemModel.jsm:653:24\ngetEventFromRow@resource:///modules/calendar/CalStorageCachedItemModel.jsm:148:24\ngetEvents/start/<@resource:///modules/calendar/CalStorageItemModel.jsm:175:30\nhandleResultInner@resource:///modules/calendar/CalStorageDatabase.jsm:176:21\n", location: XPCWrappedNative_NoHelper }
​
columnNumber: 0
​
data: XPCWrappedNative_NoHelper { QueryInterface: QueryInterface() }
​
filename: "resource:///modules/calendar/calStorageHelpers.jsm"
​
lineNumber: 189
​
location: XPCWrappedNative_NoHelper { QueryInterface: QueryInterface(), filename: Getter, name: Getter, … }
​
message: "[JavaScript Error: \"zone is null\" {file: \"resource:///modules/calendar/Ical.jsm\" line: 5520}]'[JavaScript Error: \"zone is null\" {file: \"resource:///modules/calendar/Ical.jsm\" line: 5520}]' when calling method: [calIDateTime::getInTimezone]"
​
name: "NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS"
​
result: 2153185313
​
stack: "newDateTime@resource:///modules/calendar/calStorageHelpers.jsm:189:19\ngetEventFromRow@resource:///modules/calendar/CalStorageItemModel.jsm:653:24\ngetEventFromRow@resource:///modules/calendar/CalStorageCachedItemModel.jsm:148:24\ngetEvents/start/<@resource:///modules/calendar/CalStorageItemModel.jsm:175:30\nhandleResultInner@resource:///modules/calendar/CalStorageDatabase.jsm:176:21\n"
​
<prototype>: ExceptionPrototype { toString: toString(), name: Getter, message: Getter, … }
CalStorageDatabase.jsm:190
This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”.
```

and a whole bunch of quirks mode, and like, Mozilla, you are on both sides of  this one, the markup to be rendered and the renderer.

```
mailnews.pop3.0: 
error { target: TCPSocket, isTrusted: true, name: "SecurityError", message: "SecurityCertificate", errorCode: 2153394164, srcElement: TCPSocket, eventPhase: 0, bubbles: false, cancelable: false, returnValue: true, … }
​
bubbles: false
​
cancelBubble: false
​
cancelable: false
​
composed: false
​
composedTarget: TCPSocket { host: "mail.melanconent.com", port: 995, ssl: true, … }
​
currentTarget: null
​
defaultPrevented: false
​
defaultPreventedByChrome: false
​
defaultPreventedByContent: false
​
errorCode: 2153394164
​
eventPhase: 0
​
explicitOriginalTarget: TCPSocket { host: "mail.melanconent.com", port: 995, ssl: true, … }
​
isReplyEventFromRemoteContent: false
​
isSynthesized: false
​
isTrusted: true
​
isWaitingReplyFromRemoteContent: false
​
message: "SecurityCertificate"
​
multipleActionsPrevented: false
​
name: "SecurityError"
​
originalTarget: TCPSocket { host: "mail.melanconent.com", port: 995, ssl: true, … }
​
returnValue: true
​
srcElement: TCPSocket { host: "mail.melanconent.com", port: 995, ssl: true, … }
​
target: TCPSocket { host: "mail.melanconent.com", port: 995, ssl: true, … }
​
timeStamp: 0
​
type: "error"
​
<get isTrusted()>: function isTrusted()
​
<prototype>: TCPSocketErrorEventPrototype { name: Getter, message: Getter, errorCode: Getter, … }
 SecurityError SecurityCertificate 2153394164 Pop3Client.jsm:324:18
mailnews.pop3.0: Failed to send because socket state is closed 2 Pop3Client.jsm:440:20
This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”.
2 calItemBase.js:431:30
tb.account.size_on_disk - Attempted to set the scalar to an incompatible value. 2
This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”.
calItemBase.js:431:30
```

```
<Provider> does not support changing `store` on the fly. It is most likely that you see this error because you updated to Redux 2.x and React Redux 2.x which no longer hot reload reducers automatically. See https://github.com/reactjs/react-redux/releases/tag/v2.0.0 for the migration instructions. react-redux.js:881:13
    Redux 3
        warning$2
        warnAboutReceivingStore
        componentWillReceiveProps
    React 13
        callComponentWillReceiveProps
        updateClassInstance
        updateClassComponent
        beginWork
        performUnitOfWork
        workLoop
        renderRoot
        performWorkOnRoot
        performWork
        performSyncWork
        interactiveUpdates$1
        interactiveUpdates
        dispatchInteractiveEvent
NS_ERROR_FAILURE: No directory for uri=jsaddrbook://impab.sqlite AddrBookManager.jsm:266
    getDirectory resource:///modules/AddrBookManager.jsm:266
    get spamSettings resource:///modules/MsgIncomingServer.jsm:547
[Exception... "No directory for uri=jsaddrbook://impab.sqlite"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: resource:///modules/AddrBookManager.jsm :: getDirectory :: line 266"  data: no] AddrBookManager.jsm:266:22
    getDirectory resource:///modules/AddrBookManager.jsm:266
    get spamSettings resource:///modules/MsgIncomingServer.jsm:547
```

OK and now, it's been 15 minutes since starting Thunderbird, i am going to ask it explicitly to get my main e-mail.

OK, it claimed that it "Received 81 of 81 messages" in the status bar while giving these errors in the console:

```
: Component returned failure code: 0x80550005 [nsIMsgFolder.msgDatabase] ext-mail.js:1965
    findNewMessages chrome://messenger/content/parent/ext-mail.js:1965
    onFolderIntPropertyChanged chrome://messenger/content/parent/ext-mail.js:1928
    _actionHandleMessage resource:///modules/Pop3Client.jsm:1082
    _actionRetrResponse resource:///modules/Pop3Client.jsm:1207
    read resource:///modules/LineReader.jsm:55
    _actionRetrResponse resource:///modules/Pop3Client.jsm:1181
    _onData resource:///modules/Pop3Client.jsm:312
    AsyncFunctionNext self-hosted:632
mailnews.pop3.2: 
error { target: TCPSocket, isTrusted: true, name: "SecurityError", message: "SecurityCertificate", errorCode: 2153394164, srcElement: TCPSocket, currentTarget: TCPSocket, eventPhase: 2, bubbles: false, cancelable: false, … }
 SecurityError SecurityCertificate 2153394164 Pop3Client.jsm:324:18
mailnews.pop3.2: Failed to send because socket state is closed 2 Pop3Client.jsm:440:20
```

AND I DO NOT SEE MY 81 MESSAGES ANYWHERE.

This is way worse than yesterday, when it seemed to be getting the same message over and over again and failing to download the second.

Visited my account settings to make sure all messages are left on the server since suddenly i cannot trust Thunderbird to not be grabbing e-mails and throwing them into nowhere.

Then i pressed "Get Messages" out of habit.

And… a bunch of the previously received e-mails suddenly showed up in "Inbox"— but without sorting into the various subfolders, as there are rules set up for them to do.  And without being highlighted blue as never even glanced at before, as things used to be.

Meanwhile, the console log:

```
GEThttps://status.mayfirst.org/favicon.ico
[HTTP/1.1 404 Not Found 379ms]

about:accountsettings : Unable to run script because scripts are blocked internally. 30
NS_ERROR_FAILURE: No directory for uri=jsaddrbook://impab.sqlite AddrBookManager.jsm:266
Navigated to mailbox:///home/mlncn/.thunderbird/6w6bpqkg.default/Mail/Local%20Folders/Inbox.sbd/1Agaric?number=31039916
This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”.
1Agaric
Uncaught 
Exception { name: "NS_ERROR_NOT_INITIALIZED", message: "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIMsgIncomingServer.getNewMessages]", result: 3253927937, filename: "chrome://messenger/content/mailWindowOverlay.js", lineNumber: 3128, columnNumber: 0, data: null, stack: "GetNewMsgs@chrome://messenger/content/mailWindowOverlay.js:3128:10\nGetFolderMessages@chrome://messenger/content/mailWindowOverlay.js:3108:19\nMsgGetMessage@chrome://messenger/content/mailWindowOverlay.js:2053:5\ndoCommand@chrome://messenger/content/mail3PaneWindowCommands.js:713:9\ndoCommand@chrome://messenger/content/mailTabs.js:819:23\ndoCommand@chrome://messenger/content/tabmail.js:577:27\ngoDoCommand@chrome://global/content/globalOverlay.js:128:18\nMsgGetMessagesForAccount@chrome://messenger/content/mailWindowOverlay.js:2134:16\noncommand@chrome://messenger/content/messenger.xhtml:1:1\n", location: XPCWrappedNative_NoHelper }
mailWindowOverlay.js:3128
An error occurred executing the cmd_getNewMessages command: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIMsgIncomingServer.getNewMessages]"  nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)"  location: "JS frame :: chrome://messenger/content/mailWindowOverlay.js :: GetNewMsgs :: line 3128"  data: no] globalOverlay.js:131
TypeError: db.folder is null
MsgDBCacheManager.jsm:133:11
This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”.
Inbox
This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”.
Inbox
TypeError: db.folder is null
```

It got… some? all?  most?

And it is threading messages, which i absolutely hate, and i am sure i turned off the option for long ago.

BARGLEFARGLE BLOODY HELL.

That last one about database folder being NULL keeps repeating and it seems kinda bad?

```
This page is in Quirks Mode. Page layout may be impacted. For Standards Mode use “<!DOCTYPE html>”.
MimeMessage.jsm:621:24
TypeError: db.folder is null
3 MsgDBCacheManager.jsm:133:11
    checkCachedDBs resource:///modules/MsgDBCacheManager.jsm:133
    _dbCacheCheckTimerCallback resource:///modules/MsgDBCacheManager.jsm:64
```



Expected results:

Thunderbird should have continued to function in a manner acceptable for fetching and viewing e-mail as it has for me for the past SIXTEEN YEARS.

E-mail is fetched from POP without problem and sorted into local folders according to the rules set up.

E-mail messages that have just been downloaded are indicated in blue.  It is easy to see what has been downloaded, they are seen immediately, and we have confidence messages are not being lost into oblivion.

I am on Debian testing.  If this same experience is rolled out to other longtime users, say who are likely getting it from apt in Ubuntu, it is going to be pretty devastating to the community.  I am a financial supporter of Thunderbird and many others likely to be affected are also.  PLEASE test these upgrades against some 20-year-old profiles with decades of mail!

Disruptive changes should have a guided migration.  What is happening right now to the place where i have two decades of e-mail (a few years of that imported from Opera Mail) is SCARY.  Please help.  Thank you.