Mark Message or thread as read (shortcuts: M/R) fails from facet search results "show results as list" or Open message in conversation (Uncaught TypeError: can't access property "getNumUnread", this.displayedFolder is null)
Categories
(Thunderbird :: Search, defect)
Tracking
(thunderbird_esr78 unaffected, thunderbird82 affected)
| Tracking | Status | |
|---|---|---|
| thunderbird_esr78 | --- | unaffected |
| thunderbird82 | --- | affected |
People
(Reporter: wsmwk, Assigned: lasana)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file, 2 obsolete files)
|
10.80 KB,
patch
|
mkmelin
:
review+
|
Details | Diff | Splinter Review |
80.0b2. I'm assuming this is a regression but I have no idea when it started.
Steps:
- global search, then show results as list
- OR pick a message and do open message in conversation
- type "R" to mark thread as read
Results:
fails. error console below
Works for the same message if I do "open message in containing folder".
20:06:17.736 Uncaught TypeError: this.displayedFolder is null
get canMarkThreadAsRead chrome://messenger/content/folderDisplay.js:2315
isCommandEnabled chrome://messenger/content/mail3PaneWindowCommands.js:484
isCommandEnabled chrome://messenger/content/mailTabs.js:834
isCommandEnabled chrome://messenger/content/tabmail.js:548
goDoCommand chrome://global/content/globalOverlay.js:100
oncommand chrome://messenger/content/messenger.xhtml:1
folderDisplay.js:2315:21
20:06:17.737
An error occurred executing the cmd_markThreadAsRead command: [Exception... "[JavaScript Error: "this.displayedFolder is null" {file: "chrome://messenger/content/folderDisplay.js" line: 2315}]'[JavaScript Error: "this.displayedFolder is null" {file: "chrome://messenger/content/folderDisplay.js" line: 2315}]' when calling method: [nsIController::isCommandEnabled]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://global/content/globalOverlay.js :: goDoCommand :: line 100" data: yes]
Comment 2•5 years ago
|
||
STR
- Ctrl+K (focus search field) and type some search text and hit enter
- Click on "Show results as list"
- Focus the list pane and Ctrl+A (select all)
- Hit r key
Regression window:
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=e258a4e7d2369fef4d2e6850422cd646faedae47&tochange=f8d95023913a43a93dd4a5f9f81fc6732aca8da8
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=3d1e9c77a42dec977bd7a22e2668af56b2587145&tochange=7f7b983390650cbc7d736e92fd3e1f629a30ac02
Comment 3•5 years ago
|
||
Error console:
Uncaught TypeError: can't access property "getNumUnread", this.displayedFolder is null
get canMarkThreadAsRead chrome://messenger/content/folderDisplay.js:2315
isCommandEnabled chrome://messenger/content/mail3PaneWindowCommands.js:484
isCommandEnabled chrome://messenger/content/mailTabs.js:834
isCommandEnabled chrome://messenger/content/tabmail.js:548
goDoCommand chrome://global/content/globalOverlay.js:100
oncommand chrome://messenger/content/messenger.xhtml:1
folderDisplay.js:2315:21
get canMarkThreadAsRead chrome://messenger/content/folderDisplay.js:2315
isCommandEnabled chrome://messenger/content/mail3PaneWindowCommands.js:484
isCommandEnabled chrome://messenger/content/mailTabs.js:834
isCommandEnabled chrome://messenger/content/tabmail.js:548
goDoCommand chrome://global/content/globalOverlay.js:100
oncommand chrome://messenger/content/messenger.xhtml:1
An error occurred executing the cmd_markThreadAsRead command: [Exception... "[JavaScript Error: "can't access property "getNumUnread", this.displayedFolder is null" {file: "chrome://messenger/content/folderDisplay.js" line: 2315}]'[JavaScript Error: "can't access property "getNumUnread", this.displayedFolder is null" {file: "chrome://messenger/content/folderDisplay.js" line: 2315}]' when calling method: [nsIController::isCommandEnabled]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://global/content/globalOverlay.js :: goDoCommand :: line 100" data: yes] globalOverlay.js:104
goDoCommand chrome://global/content/globalOverlay.js:104
oncommand chrome://messenger/content/messenger.xhtml:1
Updated•5 years ago
|
Comment 4•5 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #0)
- type "R" to mark a messages as read
R = mark thread read, not message
M = toggle message read/unread
| Reporter | ||
Comment 5•5 years ago
|
||
I've further expanded the functions affected to include mark message as read and open message in conversation.
Apparently we don't have an automated test to cover this?
| Reporter | ||
Comment 6•5 years ago
|
||
Or we do have tests, but insufficient.
Note also bug 1658227 has whiteboard "Thunderbird-disabled-test"
Updated•5 years ago
|
| Assignee | ||
Comment 7•5 years ago
|
||
Can we rename this bug to the error encountered? The current title is a bit confusing. Also I think I'm running into a different error (Daily):
AutocompleteInput chrome://global/content/elements/autocomplete-input.js:70
openTab chrome://messenger/content/glodaFacetTab.js:36
openTab chrome://messenger/content/tabmail.js:955
doSearch chrome://messenger/content/gloda-autocomplete-input.js:217
MozGlodaAutocompleteInput chrome://messenger/content/gloda-autocomplete-input.js:60````
| Assignee | ||
Updated•5 years ago
|
Comment 8•5 years ago
•
|
||
(In reply to Lasana Murray from comment #7)
Can we rename this bug to the error encountered? The current title is a bit confusing.
Lasana! Sorry hey, we love verbose bug titles in bug triage because of a systemic shortcoming in Bugzilla where the summary is the only place to add search words which make the bug retrievable and avoid more duplicates. Instead, they should have separate fields for alternative titles and/or search words. I've added the error to the bug title for you ;-)
Also I think I'm running into a different error (Daily):
Uncaught TypeError: can't access property "hasAttribute", window.gBrowser.selectedBrowser is null
Well, that's another one but it happens at step 1 (global search).
Wayne is talking about the error of step 3:
After doing "show results as list", then press "R" on any (unread) msg or thread in the list, and you still get this:
Uncaught TypeError: can't access property "getNumUnread", this.displayedFolder is null
get canMarkThreadAsRead chrome://messenger/content/folderDisplay.js:2315
isCommandEnabled chrome://messenger/content/mail3PaneWindowCommands.js:484
isCommandEnabled chrome://messenger/content/mailTabs.js:834
isCommandEnabled chrome://messenger/content/tabmail.js:548
goDoCommand chrome://global/content/globalOverlay.js:100
oncommand chrome://messenger/content/messenger.xhtml:1
folderDisplay.js:2315:21
An error occurred executing the cmd_markThreadAsRead command: [Exception... "[JavaScript Error: "can't access property "getNumUnread", this.displayedFolder is null" {file: "chrome://messenger/content/folderDisplay.js" line: 2315}]'[JavaScript Error: "can't access property "getNumUnread", this.displayedFolder is null" {file: "chrome://messenger/content/folderDisplay.js" line: 2315}]' when calling method: [nsIController::isCommandEnabled]" nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)" location: "JS frame :: chrome://global/content/globalOverlay.js :: goDoCommand :: line 100" data: yes] globalOverlay.js:104
Comment 9•5 years ago
|
||
Wayne, pressing "M" in your step 3 no longer reproduces for me, does it for you? on daily 82.0a1 (2020-08-25) (64-bit), but you reported against 80.0b2.
- type "R" to mark a messages as read
Can you pls correct comment 0:
- press
Rto mark thread as read
(and add this you can still reproduce:)
- or press
Mto mark msg as read
| Reporter | ||
Comment 10•5 years ago
|
||
Comment 0 is corrected.
Lassana, do you have a theory for the fix?
| Assignee | ||
Comment 11•5 years ago
|
||
I believe I have fixed it. I'm writing a test to check for it.
| Assignee | ||
Comment 12•5 years ago
|
||
If the underlying view has "synthetic" messages, the displayedFolder property will be null causing the error. This patch includes a check for a synthetic view incanMarkThreadAsRead.
Comment 13•5 years ago
|
||
| Assignee | ||
Comment 14•5 years ago
|
||
Updated for feedback. I'll see if I can figure out bug 1663904 there.
Comment 15•5 years ago
|
||
| Assignee | ||
Comment 16•5 years ago
|
||
The tests here pass:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=9e026891a6859f97606e2a1411d34366b8b8499c
However they won't work with --verify because the folders created need to be deleted after each test. I looked into doing that but I could not find a friendly way to do that in FolderDisplayHelpers.jsm looks like some refactoring is needed there.
Alternatively, I could give the folders random names though I noticed other tests that create folders don't work with verify either.
Comment 17•5 years ago
|
||
You can just call folder.deleteSelf(null); at the end of each test. I don't think anything more elaborate is needed.
| Assignee | ||
Comment 18•5 years ago
|
||
calling folder.deleteSelf(null) in a clean up function results in this:
FAIL uncaught exception - : Component returned failure code: 0x80550006 [nsIMsgFolder.msgDatabase] at _persistColumnStates@chrome://messenger/content/folderDisplay.js:533:39 hintColumnsChanged@chrome://messenger/content/folderDisplay.js:557:10 OnLoadThreadPane/observer<@chrome://messenger/content/msgMail3PaneWindow.js:1332:20 MutationCallback*OnLoadThreadPane@chrome://messenger/content/msgMail3PaneWindow.js:1331:18 InitPanes@chrome://messenger/content/msgMail3PaneWindow.js:1298:3 LoadPostAccountWizard@chrome://messenger/content/msgMail3PaneWindow.js:790:3 _delayedStartup@chrome://messenger/content/msgMail3PaneWindow.js:705:7 EventListener.handleEvent*onLoad@chrome://messenger/content/msgMail3PaneWindow.js:661:12 EventHandlerNonNull*@chrome://messenger/content/messenger.xhtml:286:36
| Assignee | ||
Comment 19•5 years ago
|
||
Updated the tests to run better with --verify. They are all passing using --verify for me right now but I occasionally ran into errors like the one in bug 1662911 and a timeout when clicking tree items from time to time.
| Assignee | ||
Comment 20•5 years ago
|
||
Comment 21•5 years ago
|
||
Updated•5 years ago
|
Comment 22•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/2757dd53eeea
Take synthetic views into consideration when calculating canMarkThreadAsRead. r=mkmelin
Description
•