Bug: Intermittent browser/components/newtab/test/browser/abouthomecache/browser_shutdown_timeout.js | Uncaught exception - undefined - threw exception: [Exception... "Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED) [nsIInputStream.available
Status: RESOLVED
Priority: P5
Resolution: FIXED
Created: 2020-12-01 10:53:55+00:00
Resolved: 2022-04-09 15:00:24+00:00

**Filed by:** rmaries [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=323144117&repo=autoland
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/dCdLommPRI2gTlOkw5nXpA/runs/0/artifacts/public/logs/live_backing.log

---
```
[task 2020-12-01T10:05:32.558Z] 10:05:32     INFO - TEST-START | browser/components/newtab/test/browser/abouthomecache/browser_shutdown_timeout.js
[task 2020-12-01T10:05:39.375Z] 10:05:39     INFO - Ensuring cache bytes are available
[task 2020-12-01T10:05:39.375Z] 10:05:39     INFO - Console message: 1606817138415	AboutHomeStartupCache	TRACE	Cache entry is available.
[task 2020-12-01T10:05:39.376Z] 10:05:39     INFO - Console message: 1606817138416	AboutHomeStartupCache	TRACE	Connecting nsICacheEntry to pipes.
[task 2020-12-01T10:05:39.377Z] 10:05:39     INFO - Console message: 1606817138417	AboutHomeStartupCache	TRACE	
[task 2020-12-01T10:05:39.380Z] 10:05:39     INFO - Console message: 1606817138417	AboutHomeStartupCache	DEBUG	Cache meta data does not exist. Closing streams.
[task 2020-12-01T10:05:39.381Z] 10:05:39     INFO - Buffered messages finished
[task 2020-12-01T10:05:39.382Z] 10:05:39     INFO - TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/abouthomecache/browser_shutdown_timeout.js | Uncaught exception - undefined - threw exception: [Exception... "Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED) [nsIInputStream.available]"  nsresult: "0x80470002 (NS_BASE_STREAM_CLOSED)"  location: "JS frame :: chrome://mochitests/content/browser/browser/components/newtab/test/browser/abouthomecache/head.js :: <TOP_LEVEL> :: line 130"  data: no]
[task 2020-12-01T10:05:39.383Z] 10:05:39     INFO - Leaving test bound test_shutdown_timeout
[task 2020-12-01T10:05:39.383Z] 10:05:39     INFO - GECKO(3071) | MEMORY STAT | vsize 3044MB | residentFast 339MB | heapAllocated 93MB
[task 2020-12-01T10:05:39.384Z] 10:05:39     INFO - TEST-OK | browser/components/newtab/test/browser/abouthomecache/browser_shutdown_timeout.js | took 6231ms
[task 2020-12-01T10:05:39.384Z] 10:05:39     INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-12-01T10:05:39.385Z] 10:05:39     INFO - TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/abouthomecache/browser_shutdown_timeout.js | Found an unexpected tab at the end of test run: about:home - 
[task 2020-12-01T10:05:39.385Z] 10:05:39     INFO - GECKO(3071) | [Child 3346, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040111 (NS_ERROR_NOT_AVAILABLE): file /builds/worker/checkouts/gecko/caps/BasePrincipal.cpp:1349
[task 2020-12-01T10:05:39.386Z] 10:05:39     INFO - GECKO(3071) | [Child 3219: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 0x7f9766498c00 == 1 [pid = 3219] [id = 5]
[task 2020-12-01T10:05:39.389Z] 10:05:39     INFO - GECKO(3071) | [Child 3219: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 2 (0x7f97664b7200) [pid = 3219] [serial = 11] [outer = (nil)]
[task 2020-12-01T10:05:39.389Z] 10:05:39     INFO - GECKO(3071) | [Child 3219: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 3 (0x7f976649c000) [pid = 3219] [serial = 12] [outer = 0x7f97664b7200]
[task 2020-12-01T10:05:39.390Z] 10:05:39     INFO - checking window state```