Bug: Intermittent toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js | A promise chain failed to handle a rejection: captureCallback is not a function - stack: done@resource://gre/modules/BackgroundPageThumbs.jsm:718:22
Status: RESOLVED
Priority: P5
Resolution: INCOMPLETE
Created: 2021-04-06 16:17:19+00:00
Resolved: 2023-10-20 12:01:55+00:00

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

---
```
[task 2021-04-06T15:51:41.796Z] 15:51:41     INFO - TEST-START | toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js
[task 2021-04-06T15:51:41.804Z] 15:51:41     INFO - GECKO(16673) | [Child 16817: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 2 (7fcf0cd8fc00) [pid = 16817] [serial = 2] [outer = 0] [url = about:blank]
[task 2021-04-06T15:51:41.840Z] 15:51:41     INFO - GECKO(16673) | [Parent 16673, Main Thread] WARNING: NS_ENSURE_TRUE(mCacheEntry) failed: file /builds/worker/checkouts/gecko/netwerk/protocol/http/nsHttpChannel.cpp:5206
[task 2021-04-06T15:51:41.861Z] 15:51:41     INFO - GECKO(16673) | [Child 17190: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 5 (7f517f492000) [pid = 17190] [serial = 5] [outer = 7f519ca63c80]
[task 2021-04-06T15:51:41.938Z] 15:51:41     INFO - GECKO(16673) | JavaScript error: resource://gre/modules/BackgroundPageThumbs.jsm, line 718: TypeError: captureCallback is not a function
[task 2021-04-06T15:51:42.015Z] 15:51:42     INFO - GECKO(16673) | [Parent 16673: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 17 (7ff0a9910000) [pid = 16673] [serial = 8] [outer = 0] [url = about:blank]
[task 2021-04-06T15:51:42.015Z] 15:51:42     INFO - GECKO(16673) | [Parent 16673: Main Thread]: I/DocShellAndDOMWindowLeak --DOMWINDOW == 16 (7ff0ab36b000) [pid = 16673] [serial = 17] [outer = 0] [url = about:blank]
[task 2021-04-06T15:51:42.031Z] 15:51:42     INFO - GECKO(16673) | [Parent 16673, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80040111 (NS_ERROR_NOT_AVAILABLE): file /builds/worker/checkouts/gecko/netwerk/cache/nsApplicationCacheService.cpp:161
[task 2021-04-06T15:51:42.040Z] 15:51:42     INFO - TEST-INFO | started process screentopng
[task 2021-04-06T15:51:42.382Z] 15:51:42     INFO - TEST-INFO | screentopng: exit 0
[task 2021-04-06T15:51:42.383Z] 15:51:42     INFO - Buffered messages logged at 15:51:41
[task 2021-04-06T15:51:42.384Z] 15:51:42     INFO - Entering test bound thumbnails_bg_redirect
[task 2021-04-06T15:51:42.384Z] 15:51:42     INFO - TEST-PASS | toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js | Thumbnail file for original URL should not exist yet. - 
[task 2021-04-06T15:51:42.385Z] 15:51:42     INFO - TEST-PASS | toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js | Thumbnail file for final URL should not exist yet. - 
[task 2021-04-06T15:51:42.386Z] 15:51:42     INFO - Console message: [JavaScript Warning: "An iframe which has both allow-top-navigation and allow-top-navigation-by-user-activation for its sandbox attribute will permit top navigations." {file: "http://www.example.com/2" line: 0}]
[task 2021-04-06T15:51:42.386Z] 15:51:42     INFO - Console message: [JavaScript Warning: "An iframe which has both allow-top-navigation and allow-top-navigation-by-user-activation for its sandbox attribute will permit top navigations." {file: "about:blank" line: 0}]
[task 2021-04-06T15:51:42.387Z] 15:51:42     INFO - Console message: [JavaScript Error: "TypeError: captureCallback is not a function" {file: "resource://gre/modules/BackgroundPageThumbs.jsm" line: 718}]
[task 2021-04-06T15:51:42.387Z] 15:51:42     INFO - Buffered messages logged at 15:51:42
[task 2021-04-06T15:51:42.388Z] 15:51:42     INFO - TEST-PASS | toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js | Captured URL should be URL passed to capture - 
[task 2021-04-06T15:51:42.389Z] 15:51:42     INFO - TEST-PASS | toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js | Thumbnail for original URL should be cached - 
[task 2021-04-06T15:51:42.389Z] 15:51:42     INFO - TEST-PASS | toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js | Thumbnail for final URL should be cached - 
[task 2021-04-06T15:51:42.389Z] 15:51:42     INFO - Buffered messages finished
[task 2021-04-06T15:51:42.389Z] 15:51:42     INFO - TEST-UNEXPECTED-FAIL | toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js | A promise chain failed to handle a rejection: captureCallback is not a function - stack: done@resource://gre/modules/BackgroundPageThumbs.jsm:718:22
[task 2021-04-06T15:51:42.389Z] 15:51:42     INFO - _done@resource://gre/modules/BackgroundPageThumbs.jsm:741:7
[task 2021-04-06T15:51:42.389Z] 15:51:42     INFO - pageLoaded@resource://gre/modules/BackgroundPageThumbs.jsm:650:12
[task 2021-04-06T15:51:42.389Z] 15:51:42     INFO - Rejection date: Tue Apr 06 2021 15:51:41 GMT+0000 (Coordinated Universal Time) - false == true - JS frame :: resource://testing-common/PromiseTestUtils.jsm :: assertNoUncaughtRejections :: line 285
[task 2021-04-06T15:51:42.389Z] 15:51:42     INFO - Stack trace:
[task 2021-04-06T15:51:42.389Z] 15:51:42     INFO - resource://testing-common/PromiseTestUtils.jsm:assertNoUncaughtRejections:285
[task 2021-04-06T15:51:42.389Z] 15:51:42     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest/<:1120
[task 2021-04-06T15:51:42.390Z] 15:51:42     INFO - Leaving test bound thumbnails_bg_redirect
[task 2021-04-06T15:51:42.390Z] 15:51:42     INFO - GECKO(16673) | [Child 17190: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 6 (7f517f495c00) [pid = 17190] [serial = 6] [outer = 7f519ca63c80]
[task 2021-04-06T15:51:42.390Z] 15:51:42     INFO - Console message: [JavaScript Warning: "An iframe which has both allow-top-navigation and allow-top-navigation-by-user-activation for its sandbox attribute will permit top navigations." {file: "http://example.com/redirected" line: 0}]
[task 2021-04-06T15:51:42.390Z] 15:51:42     INFO - GECKO(16673) | MEMORY STAT | vsize 2867MB | residentFast 375MB | heapAllocated 133MB
[task 2021-04-06T15:51:42.390Z] 15:51:42     INFO - TEST-OK | toolkit/components/thumbnails/test/browser_thumbnails_bg_redirect.js | took 290ms
[task 2021-04-06T15:51:42.392Z] 15:51:42     INFO - GECKO(16673) | [Child 16730: Main Thread]: I/DocShellAndDOMWindowLeak ++DOCSHELL 7f730b8be000 == 3 [pid = 16730] [id = 10]
[task 2021-04-06T15:51:42.392Z] 15:51:42     INFO - GECKO(16673) | [Child 16730: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 8 (7f730aa07040) [pid = 16730] [serial = 24] [outer = 0]
[task 2021-04-06T15:51:42.392Z] 15:51:42     INFO - GECKO(16673) | [Child 16730: Main Thread]: I/DocShellAndDOMWindowLeak ++DOMWINDOW == 9 (7f730b8bf800) [pid = 16730] [serial = 25] [outer = 7f730aa07040]
[task 2021-04-06T15:51:42.392Z] 15:51:42     INFO - checking window state
[task 2021-04-06T15:51:42.392Z] 15:51:42     INFO - TEST-START | toolkit/components/thumbnails/test/browser_thumbnails_bg_timeout.js```