Bug: Intermittent TV browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js | Ads exposure should not have been recorded - [{"category":"shopping","name":"ads_exposure","timestamp":434791}] == null - {"filename":"chrome://mochitests/conte
Status: RESOLVED
Priority: P5
Resolution: FIXED
Created: 2023-11-03 20:45:05+00:00
Resolved: 2023-11-09 13:31:01+00:00

**Filed by:** nfay [at] mozilla.com
**Parsed log:** https://treeherder.mozilla.org/logviewer?job_id=434873007&repo=autoland
**Full log:** https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/Lk3GEeq7TX-8lxH1uDG2DQ/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/Lk3GEeq7TX-8lxH1uDG2DQ/runs/0/artifacts/public/logs/live_backing.log&only_show_unexpected=1

---
```
[task 2023-11-03T16:07:12.822Z] 16:07:12     INFO - TEST-START | browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js
[task 2023-11-03T16:07:12.946Z] 16:07:12     INFO - GECKO(2715) | console.error: "Failed to fetch product analysis data" (new Error("request failed", "resource:///actors/ShoppingSidebarChild.sys.mjs", 312))
[task 2023-11-03T16:07:13.235Z] 16:07:13     INFO - TEST-INFO | started process screentopng
[task 2023-11-03T16:07:13.689Z] 16:07:13     INFO - TEST-INFO | screentopng: exit 0
[task 2023-11-03T16:07:13.690Z] 16:07:13     INFO - Buffered messages logged at 16:07:12
[task 2023-11-03T16:07:13.690Z] 16:07:13     INFO - Entering test bound test_ads_exposure_disabled_not_recorded
[task 2023-11-03T16:07:13.691Z] 16:07:13     INFO - Buffered messages logged at 16:07:13
[task 2023-11-03T16:07:13.692Z] 16:07:13     INFO - TEST-PASS | browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js | product.requestRecommendations should not have been called if ads and ads exposure were disabled - true == true - 
[task 2023-11-03T16:07:13.692Z] 16:07:13     INFO - Buffered messages finished
[task 2023-11-03T16:07:13.706Z] 16:07:13     INFO - TEST-UNEXPECTED-FAIL | browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js | Ads exposure should not have been recorded - [{"category":"shopping","name":"ads_exposure","timestamp":434791}] == null - {"filename":"chrome://mochitests/content/browser/browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js","name":"test_ads_exposure_disabled_not_recorded","sourceId":610,"lineNumber":74,"columnNumber":10,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochikit/content/browser-test.js","name":"handleTask","sourceId":555,"lineNumber":1134,"columnNumber":26,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"_runTaskBasedTest","sourceId":555,"lineNumber":1206,"columnNumber":18,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"Tester_execTest","sourceId":555,"lineNumber":1348,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"nextTest/<","sourceId":555,"lineNumber":1117,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js","name":"SimpleTest.waitForFocus/<","sourceId":584,"lineNumber":1058,"columnNumber":13,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":null,"formattedStack":"SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"nextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"Tester_execTest@chrome://mochikit/content/browser-test.js:1348:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1206:18\nTester_execTest@chrome://mochikit/content/browser-test.js:1348:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"async*handleTask@chrome://mochikit/content/browser-test.js:1134:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1206:18\nTester_execTest@chrome://mochikit/content/browser-test.js:1348:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"caller":null,"formattedStack":"test_ads_exposure_disabled_not_recorded@chrome://mochitests/content/browser/browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js:74:10\nasync*handleTask@chrome://mochikit/content/browser-test.js:1134:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1206:18\nTester_execTest@chrome://mochikit/content/browser-test.js:1348:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}}
[task 2023-11-03T16:07:13.707Z] 16:07:13     INFO - Stack trace:
[task 2023-11-03T16:07:13.711Z] 16:07:13     INFO - chrome://mochitests/content/browser/browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js:test_ads_exposure_disabled_not_recorded:74
[task 2023-11-03T16:07:13.712Z] 16:07:13     INFO - chrome://mochikit/content/browser-test.js:handleTask:1134
[task 2023-11-03T16:07:13.715Z] 16:07:13     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1206
[task 2023-11-03T16:07:13.715Z] 16:07:13     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1348
[task 2023-11-03T16:07:13.716Z] 16:07:13     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1117
[task 2023-11-03T16:07:13.716Z] 16:07:13     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
[task 2023-11-03T16:07:13.717Z] 16:07:13     INFO - Leaving test bound test_ads_exposure_disabled_not_recorded
[task 2023-11-03T16:07:13.718Z] 16:07:13     INFO - Entering test bound test_ads_exposure_enabled_no_ad_not_recorded
[task 2023-11-03T16:07:13.718Z] 16:07:13     INFO - GECKO(2715) | console.error: "Failed to fetch product analysis data" (new Error("request failed", "resource:///actors/ShoppingSidebarChild.sys.mjs", 312))
[task 2023-11-03T16:07:13.723Z] 16:07:13     INFO - TEST-PASS | browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js | product.requestRecommendations should have been called - true == true - 
[task 2023-11-03T16:07:13.724Z] 16:07:13     INFO - Not taking screenshot here: see the one that was previously logged
[task 2023-11-03T16:07:13.734Z] 16:07:13     INFO - TEST-UNEXPECTED-FAIL | browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js | Ads exposure should not have been recorded if ads exposure was enabled but no ads were returned - [{"category":"shopping","name":"ads_exposure","timestamp":434791}] == null - {"filename":"chrome://mochitests/content/browser/browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js","name":"test_ads_exposure_enabled_no_ad_not_recorded","sourceId":621,"lineNumber":127,"columnNumber":10,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochikit/content/browser-test.js","name":"handleTask","sourceId":555,"lineNumber":1134,"columnNumber":26,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"_runTaskBasedTest","sourceId":555,"lineNumber":1206,"columnNumber":18,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochikit/content/browser-test.js","name":"Tester_execTest","sourceId":555,"lineNumber":1348,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"nextTest/<","sourceId":555,"lineNumber":1117,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js","name":"SimpleTest.waitForFocus/<","sourceId":584,"lineNumber":1058,"columnNumber":13,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":null,"formattedStack":"SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"nextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"async*Tester_execTest@chrome://mochikit/content/browser-test.js:1348:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"caller":null,"formattedStack":"_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1206:18\nasync*Tester_execTest@chrome://mochikit/content/browser-test.js:1348:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"async*handleTask@chrome://mochikit/content/browser-test.js:1134:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1206:18\nasync*Tester_execTest@chrome://mochikit/content/browser-test.js:1348:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"caller":null,"formattedStack":"test_ads_exposure_enabled_no_ad_not_recorded@chrome://mochitests/content/browser/browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js:127:10\nasync*handleTask@chrome://mochikit/content/browser-test.js:1134:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1206:18\nasync*Tester_execTest@chrome://mochikit/content/browser-test.js:1348:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}}
[task 2023-11-03T16:07:13.745Z] 16:07:13     INFO - Stack trace:
[task 2023-11-03T16:07:13.745Z] 16:07:13     INFO - chrome://mochitests/content/browser/browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js:test_ads_exposure_enabled_no_ad_not_recorded:127
[task 2023-11-03T16:07:13.746Z] 16:07:13     INFO - chrome://mochikit/content/browser-test.js:handleTask:1134
[task 2023-11-03T16:07:13.747Z] 16:07:13     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1206
[task 2023-11-03T16:07:13.748Z] 16:07:13     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1348
[task 2023-11-03T16:07:13.749Z] 16:07:13     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1117
[task 2023-11-03T16:07:13.750Z] 16:07:13     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
[task 2023-11-03T16:07:13.751Z] 16:07:13     INFO - Leaving test bound test_ads_exposure_enabled_no_ad_not_recorded
[task 2023-11-03T16:07:13.752Z] 16:07:13     INFO - Entering test bound test_ads_exposure_enabled_with_ad_recorded
[task 2023-11-03T16:07:13.837Z] 16:07:13     INFO - GECKO(2715) | console.error: "Failed to fetch product analysis data" (new Error("request failed", "resource:///actors/ShoppingSidebarChild.sys.mjs", 312))
[task 2023-11-03T16:07:14.154Z] 16:07:14     INFO - TEST-PASS | browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js | product.requestRecommendations should have been called if ads exposure is enabled, even if ads are not - true == true - 
[task 2023-11-03T16:07:14.212Z] 16:07:14     INFO - Not taking screenshot here: see the one that was previously logged
[task 2023-11-03T16:07:14.218Z] 16:07:14     INFO - TEST-UNEXPECTED-FAIL | browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js | Ads exposure should have been recorded if ads exposure was enabled and ads were returned - 2 == 1 - {"filename":"chrome://mochitests/content/browser/browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js","name":"test_ads_exposure_enabled_with_ad_recorded","sourceId":621,"lineNumber":188,"columnNumber":10,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochikit/content/browser-test.js","name":"handleTask","sourceId":555,"lineNumber":1134,"columnNumber":26,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"_runTaskBasedTest","sourceId":555,"lineNumber":1206,"columnNumber":18,"sourceLine":"","asyncCause":null,"asyncCaller":{"filename":"chrome://mochikit/content/browser-test.js","name":"Tester_execTest","sourceId":555,"lineNumber":1348,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/browser-test.js","name":"nextTest/<","sourceId":555,"lineNumber":1117,"columnNumber":14,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":{"filename":"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js","name":"SimpleTest.waitForFocus/<","sourceId":584,"lineNumber":1058,"columnNumber":13,"sourceLine":"","asyncCause":null,"asyncCaller":null,"caller":null,"formattedStack":"SimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"nextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"async*Tester_execTest@chrome://mochikit/content/browser-test.js:1348:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"caller":null,"formattedStack":"_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1206:18\nasync*Tester_execTest@chrome://mochikit/content/browser-test.js:1348:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"formattedStack":"async*handleTask@chrome://mochikit/content/browser-test.js:1134:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1206:18\nasync*Tester_execTest@chrome://mochikit/content/browser-test.js:1348:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}},"caller":null,"formattedStack":"test_ads_exposure_enabled_with_ad_recorded@chrome://mochitests/content/browser/browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js:188:10\nasync*handleTask@chrome://mochikit/content/browser-test.js:1134:26\n_runTaskBasedTest@chrome://mochikit/content/browser-test.js:1206:18\nasync*Tester_execTest@chrome://mochikit/content/browser-test.js:1348:14\nnextTest/<@chrome://mochikit/content/browser-test.js:1117:14\nSimpleTest.waitForFocus/<@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:1058:13\n","nativeSavedFrame":{}}
[task 2023-11-03T16:07:14.219Z] 16:07:14     INFO - Stack trace:
[task 2023-11-03T16:07:14.219Z] 16:07:14     INFO - chrome://mochitests/content/browser/browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js:test_ads_exposure_enabled_with_ad_recorded:188
[task 2023-11-03T16:07:14.220Z] 16:07:14     INFO - chrome://mochikit/content/browser-test.js:handleTask:1134
[task 2023-11-03T16:07:14.221Z] 16:07:14     INFO - chrome://mochikit/content/browser-test.js:_runTaskBasedTest:1206
[task 2023-11-03T16:07:14.221Z] 16:07:14     INFO - chrome://mochikit/content/browser-test.js:Tester_execTest:1348
[task 2023-11-03T16:07:14.222Z] 16:07:14     INFO - chrome://mochikit/content/browser-test.js:nextTest/<:1117
[task 2023-11-03T16:07:14.223Z] 16:07:14     INFO - chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:SimpleTest.waitForFocus/<:1058
[task 2023-11-03T16:07:14.225Z] 16:07:14     INFO - TEST-PASS | browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js | Glean event should have category 'shopping' - "shopping" == "shopping" - 
[task 2023-11-03T16:07:14.227Z] 16:07:14     INFO - TEST-PASS | browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js | Glean event should have name 'ads_exposure' - "ads_exposure" == "ads_exposure" - 
[task 2023-11-03T16:07:14.237Z] 16:07:14     INFO - Leaving test bound test_ads_exposure_enabled_with_ad_recorded
[task 2023-11-03T16:07:14.545Z] 16:07:14     INFO - GECKO(2715) | MEMORY STAT | vsize 11497MB | residentFast 491MB | heapAllocated 238MB
[task 2023-11-03T16:07:14.546Z] 16:07:14     INFO - TEST-OK | browser/components/shopping/tests/browser/browser_ads_exposure_telemetry.js | took 1722ms
[task 2023-11-03T16:07:14.573Z] 16:07:14     INFO - checking window state
[task 2023-11-03T16:07:14.586Z] 16:07:14     INFO - GECKO(2715) | Completed ShutdownLeaks collections in process 2715
[task 2023-11-03T16:07:14.587Z] 16:07:14     INFO - TEST-START | Shutdown
[task 2023-11-03T16:07:14.587Z] 16:07:14     INFO - Browser Chrome Test Summary
[task 2023-11-03T16:07:14.588Z] 16:07:14     INFO - Passed:  13
[task 2023-11-03T16:07:14.588Z] 16:07:14     INFO - Failed:  3
[task 2023-11-03T16:07:14.589Z] 16:07:14     INFO - Todo:    0
[task 2023-11-03T16:07:14.589Z] 16:07:14     INFO - Mode:    e10s
[task 2023-11-03T16:07:14.590Z] 16:07:14     INFO - *** End BrowserChrome Test Results ***
```