Bug: JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
Status: RESOLVED
Priority: --
Resolution: FIXED
Created: 2023-07-08 05:23:01+00:00
Resolved: 2023-10-18 00:12:11+00:00

I see in my local mochitest log, of C-C FULL DEBUG version of TB and other people debug log on try-comm-central the error in the subject line.
For example, Geoff's job:
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=a4f2d3754f0a3767f84aa5d15453e18ad1995828
His debug execution is only for linux.

But my try-comm-central jobs include all the architectures.
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=f1aef228b7e8fd8ba91768513316aa9711fdf9c2
There, it happens across different OS (linux, windows, macosx).
The number of such errors in my local log is 34.

Interesting thing is that I started to see this error on June 10.
Earlier mochitest logs in May did not show this errors. So this is possibly a new regression.

The errors are logged against these tests during mochitest by running FULL DEBUG version of C-C TB.
```
123:59.93 TEST_START: comm/mail/test/browser/attachment/browser_attachment.js
124:13.53 GECKO(2307941) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
123:59.93 TEST_START: comm/mail/test/browser/attachment/browser_attachment.js
124:13.68 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
124:13.90 TEST_END: Test OK. Subtests passed 75/79. Unexpected 0
124:28.54 TEST_START: comm/mail/test/browser/attachment/browser_attachmentIcon.js
124:33.42 GECKO(2307941) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
124:28.54 TEST_START: comm/mail/test/browser/attachment/browser_attachmentIcon.js
124:33.63 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
124:33.87 TEST_END: Test OK. Subtests passed 19/19. Unexpected 0
124:36.49 TEST_START: comm/mail/test/browser/attachment/browser_attachmentMenus.js
124:55.30 GECKO(2307941) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
124:36.49 TEST_START: comm/mail/test/browser/attachment/browser_attachmentMenus.js
124:55.54 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
124:56.15 TEST_END: Test OK. Subtests passed 484/484. Unexpected 0
124:56.15 TEST_START: comm/mail/test/browser/attachment/browser_attachmentSize.js
125:02.25 GECKO(2307941) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
124:56.15 TEST_START: comm/mail/test/browser/attachment/browser_attachmentSize.js
125:02.36 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
125:03.06 TEST_END: Test OK. Subtests passed 85/85. Unexpected 0
125:03.06 TEST_START: comm/mail/test/browser/attachment/browser_openAttachment.js
125:30.61 GECKO(2307941) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
125:03.06 TEST_START: comm/mail/test/browser/attachment/browser_openAttachment.js
125:30.85 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
125:34.05 TEST_END: Test OK. Subtests passed 88/88. Unexpected 0
140:25.28 TEST_START: comm/mail/test/browser/composition/browser_forwardDefectiveCharset.js
140:34.76 GECKO(2308864) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
140:25.28 TEST_START: comm/mail/test/browser/composition/browser_forwardDefectiveCharset.js
140:34.90 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
140:35.91 TEST_END: Test OK. Subtests passed 8/8. Unexpected 0
142:10.76 TEST_START: comm/mail/test/browser/composition/browser_imageDisplay.js
142:19.26 GECKO(2308864) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
142:10.76 TEST_START: comm/mail/test/browser/composition/browser_imageDisplay.js
142:19.56 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
142:20.08 TEST_END: Test OK. Subtests passed 78/78. Unexpected 0
146:50.54 TEST_START: comm/mail/test/browser/composition/browser_replySignature.js
147:01.71 GECKO(2308864) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
146:50.54 TEST_START: comm/mail/test/browser/composition/browser_replySignature.js
147:02.08 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
147:02.55 TEST_END: Test OK. Subtests passed 15/15. Unexpected 0
151:09.70 TEST_START: comm/mail/test/browser/composition/browser_subjectWas.js
151:13.18 GECKO(2308864) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
151:09.70 TEST_START: comm/mail/test/browser/composition/browser_subjectWas.js
151:13.63 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
151:14.24 TEST_END: Test OK. Subtests passed 6/6. Unexpected 0
160:40.02 TEST_START: comm/mail/test/browser/folder-display/browser_viewSource.js
160:48.97 GECKO(2312764) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
160:40.02 TEST_START: comm/mail/test/browser/folder-display/browser_viewSource.js
160:49.22 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
160:53.73 TEST_END: Test OK. Subtests passed 28/28. Unexpected 0
164:49.97 TEST_START: comm/mail/test/browser/message-header/browser_messageHeader.js
165:05.39 GECKO(2316151) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
164:49.97 TEST_START: comm/mail/test/browser/message-header/browser_messageHeader.js
165:05.81 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
165:06.56 TEST_END: Test OK. Subtests passed 138/141. Unexpected 0
165:06.56 TEST_START: comm/mail/test/browser/message-header/browser_messageHeaderCustomize.js
165:09.24 GECKO(2316151) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
165:06.56 TEST_START: comm/mail/test/browser/message-header/browser_messageHeaderCustomize.js
165:09.25 GECKO(2316151) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1293: TypeError: can't access property "entries", this._underlyingFolders is null
165:06.56 TEST_START: comm/mail/test/browser/message-header/browser_messageHeaderCustomize.js
165:09.41 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
165:06.56 TEST_START: comm/mail/test/browser/message-header/browser_messageHeaderCustomize.js
165:09.42 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1293}]
165:10.13 TEST_END: Test OK. Subtests passed 51/51. Unexpected 0
166:10.14 TEST_START: comm/mail/test/browser/message-reader/browser_convertToEventOrTask.js
166:20.99 GECKO(2316499) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
166:10.14 TEST_START: comm/mail/test/browser/message-reader/browser_convertToEventOrTask.js
166:21.23 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
166:22.02 TEST_END: Test OK. Subtests passed 6/6. Unexpected 0
166:36.70 TEST_START: comm/mail/test/browser/message-reader/browser_printing.js
166:38.46 GECKO(2316499) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
166:36.70 TEST_START: comm/mail/test/browser/message-reader/browser_printing.js
166:38.52 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
166:38.94 TEST_END: Test OK. Subtests passed 5/5. Unexpected 0
177:16.40 TEST_START: comm/mail/test/browser/tabmail/browser_dragndrop.js
178:24.76 GECKO(2320069) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
177:16.40 TEST_START: comm/mail/test/browser/tabmail/browser_dragndrop.js
178:25.09 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
178:25.71 TEST_END: Test OK. Subtests passed 104/104. Unexpected 0
179:20.25 TEST_START: comm/mailnews/extensions/newsblog/test/browser/browser_feedDisplay.js
179:23.33 GECKO(2320754) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
179:20.25 TEST_START: comm/mailnews/extensions/newsblog/test/browser/browser_feedDisplay.js
179:23.45 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
179:25.91 TEST_END: Test OK. Subtests passed 17/17. Unexpected 0
```
One error stack from my local log is quoted below.
My local log contains extra debug dumps.
```
123:59.93 TEST_START: comm/mail/test/browser/attachment/browser_attachment.js
123:59.93 GECKO(2307941) Chrome file doesn't exist: /NEW-SSD/moz-obj-dir/objdir-tb3/_tests/testing/mochitest/browser/comm/mail/test/browser/attachment/head.js
...
124:13.32 GECKO(2307941) calling RemoveFromCache(this)
124:13.32 GECKO(2307941) {streamdebug} value: mCopyState = (nil) 'initialized to nullptr' in OnCopyCompleted  at line 1323 of /NEW-SSD/NREF-COMM-CENTRAL/mozilla/comm/mailnews/local/src/nsLocalMailFolder.cpp
124:13.53 GECKO(2307941) JavaScript error: resource:///modules/DBViewWrapper.jsm, line 1256: TypeError: can't access property "entries", this._underlyingFolders is null
124:13.53 GECKO(2307941) ~nsMsgDatabase(): closing database    /COMM-CENTRAL/TMP-DIR/tmpafsgpyzf.mozrunner/Mail/Local Folders/Trash.sbd/AttachmentA.msf
124:13.53 GECKO(2307941) calling RemoveFromCache(this)
124:13.59 GECKO(2307941) console.error: gloda.index_msg: "Exception while attempting to mark message with gloda state afterdb commit" ({})
124:13.59 GECKO(2307941) console.error: gloda.index_msg: "Exception while attempting to mark message with gloda state afterdb commit" ({})
124:13.59 GECKO(2307941) console.error: gloda.index_msg: "Exception while attempting to mark message with gloda state afterdb commit" ({})
124:13.68 INFO Console message: [JavaScript Error: "TypeError: can't access property "entries", this._underlyingFolders is null" {file: "resource:///modules/DBViewWrapper.jsm" line: 1256}]
_folderMoved@resource:///modules/DBViewWrapper.jsm:1256:39
_folderMoveHelper@resource:///modules/DBViewWrapper.jsm:270:17
folderMoveCopyCompleted@resource:///modules/DBViewWrapper.jsm:285:12
@chrome://mochitests/content/browser/comm/mail/test/browser/attachment/browser_attachment.js:763:10
nextTest@chrome://mochikit/content/browser-test.js:702:35
testScope/test_finish/<@chrome://mochikit/content/browser-test.js:1794:25
run@chrome://mochikit/content/browser-test.js:1714:9

124:13.90 GECKO(2307941) MEMORY STAT vsizeMaxContiguous not supported in this build configuration.
124:13.90 GECKO(2307941) MEMORY STAT heapAllocated not supported in this build configuration.
124:13.90 GECKO(2307941) MEMORY STAT | vsize 6867MB | residentFast 852MB
124:13.90 TEST_END: Test OK. Subtests passed 75/79. Unexpected 0

```

bug 1025550  may be similar, but it was under mozmill  and is 9 years ago. I doubt if this is related.