Bug: Intermittent [TV] toolkit/content/tests/browser/browser_f7_caret_browsing.js | Uncaught exception in test - at chrome://browser/content/tabbrowser-tabs.js:1237 - TypeError: can't access property "closing", selectedTab is null
Status: RESOLVED
Priority: P5
Resolution: FIXED
Created: 2022-10-26 07:18:45+00:00
Resolved: 2022-10-31 06:30:11+00:00

**Filed by:** smolnar [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=394358982&repo=autoland
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/K5fVenVZQoC1G7J6eOROTg/runs/0/artifacts/public/logs/live_backing.log
**Reftest URL:** https://hg.mozilla.org/mozilla-central/raw-file/tip/layout/tools/reftest/reftest-analyzer.xhtml#logurl=https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/K5fVenVZQoC1G7J6eOROTg/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1

---
```
NFO - TEST-PASS | toolkit/content/tests/browser/browser_f7_caret_browsing.js | No additional dialog should have opened. - 
[task 2022-10-26T06:11:12.808Z] 06:11:12     INFO - Buffered messages finished
[task 2022-10-26T06:11:12.810Z] 06:11:12     INFO - TEST-UNEXPECTED-FAIL | toolkit/content/tests/browser/browser_f7_caret_browsing.js | Uncaught exception in test - at chrome://browser/content/tabbrowser-tabs.js:1237 - TypeError: can't access property "closing", selectedTab is null
[task 2022-10-26T06:11:12.810Z] 06:11:12     INFO - Stack trace:
[task 2022-10-26T06:11:12.810Z] 06:11:12     INFO - _setPositionalAttributes@chrome://browser/content/tabbrowser-tabs.js:1237:11
[task 2022-10-26T06:11:12.810Z] 06:11:12     INFO - _endRemoveTab@chrome://browser/content/tabbrowser.js:4165:25
[task 2022-10-26T06:11:12.810Z] 06:11:12     INFO - removeTab@chrome://browser/content/tabbrowser.js:3820:14
[task 2022-10-26T06:11:12.810Z] 06:11:12     INFO - removeTab@resource://testing-common/BrowserTestUtils.jsm:1797:30
[task 2022-10-26T06:11:12.810Z] 06:11:12     INFO - testF7SpamDoesNotOpenDialogs@chrome://mochitests/content/browser/toolkit/content/tests/browser/browser_f7_caret_browsing.js:368:20
[task 2022-10-26T06:11:12.811Z] 06:11:12     INFO - openPromptSync@resource://gre/modules/Prompter.jsm:1056:17
[task 2022-10-26T06:11:12.811Z] 06:11:12     INFO - confirmEx@resource://gre/modules/Prompter.jsm:1464:10
[task 2022-10-26T06:11:12.811Z] 06:11:12     INFO - confirmEx@resource://gre/modules/Prompter.jsm:304:14
[task 2022-10-26T06:11:12.812Z] 06:11:12     INFO - toggleCaretBrowsing@chrome://browser/content/tabbrowser.js:5447:45
[task 2022-10-26T06:11:12.812Z] 06:11:12     INFO - _handleKeyPressEvent@chrome://browser/content/tabbrowser.js:5512:16
[task 2022-10-26T06:11:12.812Z] 06:11:12     INFO - handleEvent@chrome://browser/content/tabbrowser.js:5645:16
[task 2022-10-26T06:11:12.813Z] 06:11:12     INFO - Leaving test bound testF7SpamDoesNotOpenDialogs
[task 2022-10-26T06:11:12.871Z] 06:11:12     INFO - GECKO(3816) | MEMORY STAT | vsize 11696MB | residentFast 529MB | heapAllocated 234MB
[task 2022-10-26T06:11:12.872Z] 06:11:12     INFO - TEST-OK | toolkit/content/tests/browser/browser_f7_caret_browsing.js | took 9437ms
[task 2022-10-26T06:11:12.879Z] 06:11:12     INFO - checking window state
[task 2022-10-26T06:11:12.889Z] 06:11:12     INFO - Console message: [JavaScript Error: "Failed to create tab" {file: "chrome://browser/content/tabbrowser.js" line: 2845}]
[task 2022-10-26T06:11:12.889Z] 06:11:12     INFO - addTab@chrome://browser/content/tabbrowser.js:2845:12
[task 2022-10-26T06:11:12.891Z] 06:11:12     INFO - Tester_waitForWindowsState@chrome://mochikit/content/browser-test.js:447:16
[task 2022-10-26T06:11:12.891Z] 06:11:12     INFO - nextTest@chrome://mochikit/content/browser-test.js:921:10
[task 2022-10-26T06:11:12.892Z] 06:11:12     INFO - 
[task 2022-10-26T06:11:12.893Z] 06:11:12     INFO - Console message: [JavaScript Error: "can't access property "closing", selectedTab is null" {file: "chrome://browser/content/tabbrowser-tabs.js" line: 1237}]
[task 2022-10-26T06:11:12.893Z] 06:11:12     INFO - _setPositionalAttributes@chrome://browser/content/tabbrowser-tabs.js:1237:11
[task 2022-10-26T06:11:12.893Z] 06:11:12     INFO - _insertTabAtIndex@chrome://browser/content/tabbrowser.js:3325:25
 INFO - addTab@chrome://browser/content/tabbrowser.js:2725:16
[task 2022-10-26T06:11:12.894Z] 06:11:12     INFO - Tester_waitForWindowsState@chrome://mochikit/content/browser-test.js:447:16
[task 2022-10-26T06:11:12.894Z] 06:11:12     INFO - nextTest@chrome://mochikit/content/browser-test.js:921:10
[task 2022-10-26T06:11:12.894Z] 06:11:12     INFO - 
[task 2022-10-26T06:11:12.898Z] 06:11:12     INFO - GECKO(3816) | [Parent 3816: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 46 (7f89e2bf4000) [pid = 3816] [serial = 49] [outer = 7f89e6c24d90]
[task 2022-10-26T06:11:13.176Z] 06:11:13     INFO - GECKO(3816) | [Child 3954: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 4 (7f91f8132c00) [pid = 3954] [serial = 2] [outer = 0] [url = about:blank]
[task 2022-10-26T06:11:13.177Z] 06:11:13     INFO - GECKO(3816) | [Child 3954: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 3 (7f91f813e400) [pid = 3954] [serial = 8] [outer = 0] [url = data:text/html;charset=utf-8,Caret browsing is fun.<input id='in'>]
[task 2022-10-26T06:11:13.177Z] 06:11:13     INFO - GECKO(3816) | [Child 3954: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (7f91f813e000) [pid = 3954] [serial = 7] [outer = 0] [url = about:blank]
[task 2022-10-26T06:11:13.177Z] 06:11:13     INFO - GECKO(3816) | [Child 3954: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 1 (7f91f8136800) [pid = 3954] [serial = 4] [outer = 0] [url = about:blank]
[task 2022-10-26T06:11:13.177Z] 06:11:13     INFO - GECKO(3816) | [Child 3954: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 0 (7f91f8137000) [pid = 3954] [serial = 5] [outer = 0] [url = data:text/html;charset=utf-8,Caret browsing is fun.<input id='in'>]
[task 2022-10-26T06:11:13.195Z] 06:11:13     INFO - GECKO(3816) | [Child 3988: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 4 (7f740f139800) [pid = 3988] [serial = 9] [outer = 0] [url = data:text/html;charset=utf-8,Caret browsing is fun.<input id='in'>]
[task 2022-10-26T06:11:13.195Z] 06:11:13     INFO - GECKO(3816) | [Child 3988: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 3 (7f740f139000) [pid = 3988] [serial = 8] [outer = 0] [url = about:blank]
[task 2022-10-26T06:11:13.260Z] 06:11:13     INFO - GECKO(3816) | [Child 3988: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (7f740f138c00) [pid = 3988] [serial = 11] [outer = 0] [url = about:blank]
[task 2022-10-26T06:11:13.330Z] 06:11:13     INFO - GECKO(3816) | [Child 3950: Main Thread]: I/DocShellAndDOMWindowLeak --DOCSHELL 7f0ee5532400 == 0 [pid = 3950] [id = 0] [url = about:newtab]
<...>
```