Bug: Intermittent browser/components/newtab/test/browser/abouthomecache/browser_no_startup_actions.js | Uncaught exception - undefined - threw exception: [Exception... "Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED)
Status: RESOLVED
Priority: P5
Resolution: DUPLICATE
Created: 2020-12-01 12:50:12+00:00
Resolved: 2023-04-21 19:19:17+00:00

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

---
```
[task 2020-12-01T10:52:34.175Z] 10:52:34     INFO - TEST-START | browser/components/newtab/test/browser/abouthomecache/browser_no_startup_actions.js
[task 2020-12-01T10:52:34.211Z] 10:52:34     INFO - GECKO(5433) | JavaScript error: resource://gre/modules/remotepagemanager/MessagePort.jsm, line 236: Error: Message port has been destroyed
[task 2020-12-01T10:52:34.212Z] 10:52:34     INFO - GECKO(5433) | JavaScript error: resource://activity-stream/data/content/activity-stream.bundle.js, line 10931: InvalidStateError: An exception was thrown
[task 2020-12-01T10:52:35.542Z] 10:52:35     INFO - GECKO(5433) | JavaScript error: resource://gre/modules/PromiseWorker.jsm, line 413: Error: Internal error: worker terminated
[task 2020-12-01T10:52:37.944Z] 10:52:37     INFO - TEST-INFO | started process screentopng
[task 2020-12-01T10:52:38.202Z] 10:52:38     INFO - TEST-INFO | screentopng: exit 0
[task 2020-12-01T10:52:38.202Z] 10:52:38     INFO - Buffered messages logged at 10:52:34
[task 2020-12-01T10:52:38.202Z] 10:52:38     INFO - Entering test bound test_no_startup_actions
[task 2020-12-01T10:52:38.203Z] 10:52:38     INFO - Console message: [JavaScript Error: "Error: Message port has been destroyed" {file: "resource://gre/modules/remotepagemanager/MessagePort.jsm" line: 236}]
[task 2020-12-01T10:52:38.203Z] 10:52:38     INFO - sendAsyncMessage@resource://gre/modules/remotepagemanager/MessagePort.jsm:236:13
[task 2020-12-01T10:52:38.203Z] 10:52:38     INFO - NewtabRenderUtils</</messageMiddleware/</<@resource://activity-stream/data/content/activity-stream.bundle.js:10931:24
[task 2020-12-01T10:52:38.203Z] 10:52:38     INFO - NewtabRenderUtils</</rehydrationMiddleware/</<@resource://activity-stream/data/content/activity-stream.bundle.js:10954:14
[task 2020-12-01T10:52:38.203Z] 10:52:38     INFO - NewtabRenderUtils</</queueEarlyMessageMiddleware/</<@resource://activity-stream/data/content/activity-stream.bundle.js:11004:11
[task 2020-12-01T10:52:38.203Z] 10:52:38     INFO - _dispatchImpressionStats@resource://activity-stream/data/content/activity-stream.bundle.js:5371:13
[task 2020-12-01T10:52:38.203Z] 10:52:38     INFO - NewtabRenderUtils</</setImpressionObserver/this._handleIntersect@resource://activity-stream/data/content/activity-stream.bundle.js:5474:14
[task 2020-12-01T10:52:38.203Z] 10:52:38     INFO - 
[task 2020-12-01T10:52:38.204Z] 10:52:38     INFO - Console message: [JavaScript Error: "InvalidStateError: An exception was thrown" {file: "resource://activity-stream/data/content/activity-stream.bundle.js" line: 10931}]
[task 2020-12-01T10:52:38.204Z] 10:52:38     INFO - Test is clearing the cache
[task 2020-12-01T10:52:38.204Z] 10:52:38     INFO - Test has cleared the cache.
[task 2020-12-01T10:52:38.204Z] 10:52:38     INFO - Simulating restart of the browser
[task 2020-12-01T10:52:38.204Z] 10:52:38     INFO - Simulating shutdown write
[task 2020-12-01T10:52:38.205Z] 10:52:38     INFO - Console message: 1606819954526	AboutHomeStartupCache	TRACE	Clearing the cache.
[task 2020-12-01T10:52:38.205Z] 10:52:38     INFO - Console message: 1606819954527	AboutHomeStartupCache	TRACE	Never wrote a cache this session. Arming cache task.
[task 2020-12-01T10:52:38.206Z] 10:52:38     INFO - Console message: 1606819954528	AboutHomeStartupCache	TRACE	Finalizing cache task on shutdown
[task 2020-12-01T10:52:38.206Z] 10:52:38     INFO - Console message: 1606819954528	AboutHomeStartupCache	TRACE	Caching now.
[task 2020-12-01T10:52:38.207Z] 10:52:38     INFO - Console message: 1606819954528	AboutHomeStartupCache	TRACE	Parent is requesting Activity Stream state object.
[task 2020-12-01T10:52:38.208Z] 10:52:38     INFO - Console message: 1606819954529	AboutHomeStartupCache	TRACE	Parent is requesting cache streams.
[task 2020-12-01T10:52:38.208Z] 10:52:38     INFO - Buffered messages logged at 10:52:35
[task 2020-12-01T10:52:38.209Z] 10:52:38     INFO - Shutdown write done
[task 2020-12-01T10:52:38.209Z] 10:52:38     INFO - Waiting for AboutHomeStartupCacheChild to uninit
[task 2020-12-01T10:52:38.209Z] 10:52:38     INFO - Console message: [JavaScript Error: "1606819955531	AboutHomeStartupCache	ERROR	Timed out getting cache streams. Skipping cache task." {file: "resource://gre/modules/Log.jsm" line: 723}]
[task 2020-12-01T10:52:38.210Z] 10:52:38     INFO - append@resource://gre/modules/Log.jsm:723:12
[task 2020-12-01T10:52:38.210Z] 10:52:38     INFO - log@resource://gre/modules/Log.jsm:379:16
[task 2020-12-01T10:52:38.210Z] 10:52:38     INFO - error@resource://gre/modules/Log.jsm:387:10
[task 2020-12-01T10:52:38.210Z] 10:52:38     INFO - cacheNow@resource:///modules/BrowserGlue.jsm:5105:18
[task 2020-12-01T10:52:38.210Z] 10:52:38     INFO - 
[task 2020-12-01T10:52:38.211Z] 10:52:38     INFO - Console message: 1606819955531	AboutHomeStartupCache	TRACE	Uninitialized.
[task 2020-12-01T10:52:38.211Z] 10:52:38     INFO - AboutHomeStartupCacheChild uninitted
[task 2020-12-01T10:52:38.211Z] 10:52:38     INFO - Waiting for AboutHomeStartupCache cache entry
[task 2020-12-01T10:52:38.212Z] 10:52:38     INFO - Console message: 1606819955539	AboutHomeStartupCache	TRACE	Initting.
[task 2020-12-01T10:52:38.212Z] 10:52:38     INFO - Console message: 1606819955539	AboutHomeStartupCache	TRACE	Constructing pipes.
[task 2020-12-01T10:52:38.213Z] 10:52:38     INFO - Console message: 1606819955541	AboutHomeStartupCache	TRACE	Initialized.
[task 2020-12-01T10:52:38.213Z] 10:52:38     INFO - Console message: 1606819955541	AboutHomeStartupCache	TRACE	A privileged about content process is launching with ID 1.
[task 2020-12-01T10:52:38.214Z] 10:52:38     INFO - Console message: 1606819955541	AboutHomeStartupCache	INFO	Sending input streams down to content process.
[task 2020-12-01T10:52:38.223Z] 10:52:38     INFO - Console message: [JavaScript Error: "Error: Internal error: worker terminated" {file: "resource://gre/modules/PromiseWorker.jsm" line: 413}]
[task 2020-12-01T10:52:38.223Z] 10:52:38     INFO - Buffered messages logged at 10:52:37
[task 2020-12-01T10:52:38.223Z] 10:52:38     INFO - Got AboutHomeStartupCache cache entry
[task 2020-12-01T10:52:38.224Z] 10:52:38     INFO - Ensuring cache bytes are available
[task 2020-12-01T10:52:38.224Z] 10:52:38     INFO - Console message: 1606819957813	AboutHomeStartupCache	TRACE	Cache entry is available.
[task 2020-12-01T10:52:38.224Z] 10:52:38     INFO - Console message: 1606819957814	AboutHomeStartupCache	TRACE	Connecting nsICacheEntry to pipes.
[task 2020-12-01T10:52:38.225Z] 10:52:38     INFO - Console message: 1606819957815	AboutHomeStartupCache	TRACE	
[task 2020-12-01T10:52:38.225Z] 10:52:38     INFO - Console message: 1606819957815	AboutHomeStartupCache	DEBUG	Cache meta data does not exist. Closing streams.
[task 2020-12-01T10:52:38.226Z] 10:52:38     INFO - Buffered messages finished
[task 2020-12-01T10:52:38.226Z] 10:52:38     INFO - TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/abouthomecache/browser_no_startup_actions.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:52:38.226Z] 10:52:38     INFO - Leaving test bound test_no_startup_actions
[task 2020-12-01T10:52:38.226Z] 10:52:38     INFO - GECKO(5433) | MEMORY STAT | vsize 3161MB | residentFast 471MB | heapAllocated 89MB
[task 2020-12-01T10:52:38.226Z] 10:52:38     INFO - TEST-OK | browser/components/newtab/test/browser/abouthomecache/browser_no_startup_actions.js | took 3789ms
[task 2020-12-01T10:52:38.227Z] 10:52:38     INFO - Not taking screenshot here: see the one that was previously logged
[task 2020-12-01T10:52:38.227Z] 10:52:38     INFO - TEST-UNEXPECTED-FAIL | browser/components/newtab/test/browser/abouthomecache/browser_no_startup_actions.js | Found an unexpected tab at the end of test run: about:home - 
[task 2020-12-01T10:52:38.227Z] 10:52:38     INFO - checking window state```