Closed Bug 1698152 Opened 4 years ago Closed 4 years ago

Perma [tier 2] remote-puppeteer TEST-UNEXPECTED-ERROR Page "after each" hook for "should run beforeunload if asked for" (page.spec.ts)

Categories

(Remote Protocol :: Agent, defect, P5)

defect

Tracking

(firefox88 fixed)

RESOLVED FIXED
88 Branch
Tracking Status
firefox88 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: whimboo)

References

(Regression)

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

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


[task 2021-03-12T17:17:06.371Z] PID 389 | 1615569426371	RemoteAgent	TRACE	(connection {61c80e4a-c601-4360-a0d3-b0cafaf23d32})-> {"sessionId":"7e7be438-7b38-43ff-ae16-8afb6432872c","method":"Page.close","params":{},"id":117}
[task 2021-03-12T17:17:06.373Z] PID 389 | 1615569426372	RemoteAgent	ERROR	UnknownMethodError: Page.close:
[task 2021-03-12T17:17:06.373Z] PID 389 | 	RemoteAgentError@chrome://remote/content/cdp/Error.jsm:29:5
[task 2021-03-12T17:17:06.373Z] PID 389 | 	UnknownMethodError@chrome://remote/content/cdp/Error.jsm:112:7
[task 2021-03-12T17:17:06.373Z] PID 389 | 	execute@chrome://remote/content/cdp/domains/DomainCache.jsm:98:13
[task 2021-03-12T17:17:06.374Z] PID 389 | 	receiveMessage@chrome://remote/content/cdp/sessions/ContentProcessSession.jsm:84:45
[task 2021-03-12T17:17:06.374Z] PID 389 | caused by:
[task 2021-03-12T17:17:06.374Z] PID 389 | 1615569426373	RemoteAgent	TRACE	<-(connection {61c80e4a-c601-4360-a0d3-b0cafaf23d32}) {"id":117,"sessionId":"7e7be438-7b38-43ff-ae16-8afb6432872c","error":{"message":"Page.close","data":"RemoteAgentError@chrome: ... t/cdp/domains/DomainCache.jsm:98:13\nreceiveMessage@chrome://remote/content/cdp/sessions/ContentProcessSession.jsm:84:45\n"}}
[task 2021-03-12T17:17:06.374Z] PID 389 | 1615569426373	RemoteAgent	TRACE	<-(connection {61c80e4a-c601-4360-a0d3-b0cafaf23d32}) {"sessionId":"7e7be438-7b38-43ff-ae16-8afb6432872c","method":"Log.entryAdded","params":{"entry":{"source":"other","level":"error","text":"Page.close","timestamp":1615569426371,"url":"chrome://remote/content/cdp/Error.jsm","lineNumber":29}}}
[task 2021-03-12T17:17:21.946Z] PID 389 | console.error: BroadcastService:
[task 2021-03-12T17:17:21.946Z] PID 389 |   receivedBroadcastMessage: handler for
[task 2021-03-12T17:17:21.946Z] PID 389 |   remote-settings/monitor_changes
[task 2021-03-12T17:17:21.946Z] PID 389 |   threw error:
[task 2021-03-12T17:17:21.946Z] PID 389 |   Message: Error: Polling for changes failed: NetworkError when attempting to fetch resource..
[task 2021-03-12T17:17:21.947Z] PID 389 |   Stack:
[task 2021-03-12T17:17:21.947Z] PID 389 |     remoteSettingsFunction/remoteSettings.pollChanges@resource://services-settings/remote-settings.js:254:13
[task 2021-03-12T17:17:21.947Z] PID 389 | 
[task 2021-03-12T17:17:25.955Z] TEST-TIMEOUT | Page Page.close should run beforeunload if asked for (page.spec.ts) | took 20248ms
[task 2021-03-12T17:17:25.955Z] PID 389 | ["fail",{"title":"should run beforeunload if asked for","fullTitle":"Page Page.close should run beforeunload if asked for","file":"/builds/worker/checkouts/gecko/remote/test/puppeteer/test/page.spec.ts","duration":20005,"currentRetry":0,"err":"Timeout of 20000ms exceeded. For async tests and hooks, ensure \"done()\" is called; if returning a Promise, ensure it resolves. (/builds/worker/checkouts/gecko/remote/test/puppeteer/test/page.spec.ts)","stack":"Error: Timeout of 20000ms exceeded. For async tests and hooks, ensure \"done()\" is called; if returning a Promise, ensure it resolves. (/builds/worker/checkouts/gecko/remote/test/puppeteer/test/page.spec.ts)\n    at Test.Runnable._timeoutError (/builds/worker/checkouts/gecko/remote/test/puppeteer/node_modules/mocha/lib/runnable.js:432:10)\n    at Timeout.<anonymous> (/builds/worker/checkouts/gecko/remote/test/puppeteer/node_modules/mocha/lib/runnable.js:244:24)\n    at ontimeout (timers.js:436:11)\n    at tryOnTimeout (timers.js:300:5)\n    at listOnTimeout (timers.js:263:5)\n    at Timer.processTimers (timers.js:223:10)"}]
[task 2021-03-12T17:17:25.955Z] PID 389 | 1615569445955	RemoteAgent	TRACE	(connection {61c80e4a-c601-4360-a0d3-b0cafaf23d32})-> {"method":"Target.disposeBrowserContext","params":{"browserContextId":8},"id":118}
[task 2021-03-12T17:17:25.971Z] PID 389 | 1615569445970	RemoteAgent	TRACE	<-(connection {61c80e4a-c601-4360-a0d3-b0cafaf23d32}) {"sessionId":"7e7be438-7b38-43ff-ae16-8afb6432872c","method":"Page.javascriptDialogOpening","params":{"message":"This page is asking you to confirm that you want to leave — information you’ve entered may not be saved.","type":"beforeunload"}}
[task 2021-03-12T17:17:25.972Z] PID 389 | JavaScript error: chrome://remote/content/cdp/domains/parent/page/DialogHandler.jsm, line 107: TypeError: can't access property "listPrompts", this._browser.tabModalPromptBox is undefined
[task 2021-03-12T17:17:25.972Z] PID 389 | JavaScript error: chrome://remote/content/cdp/domains/parent/page/DialogHandler.jsm, line 107: TypeError: can't access property "listPrompts", this._browser.tabModalPromptBox is undefined
[task 2021-03-12T17:17:25.972Z] PID 389 | JavaScript error: chrome://remote/content/cdp/domains/parent/page/DialogHandler.jsm, line 107: TypeError: can't access property "listPrompts", this._browser.tabModalPromptBox is undefined
[task 2021-03-12T17:17:25.972Z] PID 389 | JavaScript error: chrome://remote/content/cdp/domains/parent/page/DialogHandler.jsm, line 107: TypeError: can't access property "listPrompts", this._browser.tabModalPromptBox is undefined
[task 2021-03-12T17:17:25.972Z] PID 389 | JavaScript error: chrome://remote/content/cdp/domains/parent/page/DialogHandler.jsm, line 107: TypeError: can't access property "listPrompts", this._browser.tabModalPromptBox is undefined
[task 2021-03-12T17:17:25.972Z] PID 389 | JavaScript error: chrome://remote/content/cdp/domains/parent/page/DialogHandler.jsm, line 107: TypeError: can't access property "listPrompts", this._browser.tabModalPromptBox is undefined
[task 2021-03-12T17:17:45.972Z] TEST-UNEXPECTED-ERROR Page "after each" hook for "should run beforeunload if asked for" (page.spec.ts)
[task 2021-03-12T17:17:45.972Z] PID 389 | ["fail",{"title":"\"after each\" hook for \"should run beforeunload if asked for\"","fullTitle":"Page \"after each\" hook for \"should run beforeunload if asked for\"","file":"/builds/worker/checkouts/gecko/remote/test/puppeteer/test/page.spec.ts","duration":20017,"currentRetry":0,"err":"Timeout of 20000ms exceeded. For async tests and hooks, ensure \"done()\" is called; if returning a Promise, ensure it resolves. (/builds/worker/checkouts/gecko/remote/test/puppeteer/test/page.spec.ts)","stack":"Error: Timeout of 20000ms exceeded. For async tests and hooks, ensure \"done()\" is called; if returning a Promise, ensure it resolves. (/builds/worker/checkouts/gecko/remote/test/puppeteer/test/page.spec.ts)\n    at Hook.Runnable._timeoutError (/builds/worker/checkouts/gecko/remote/test/puppeteer/node_modules/mocha/lib/runnable.js:432:10)\n    at Timeout.<anonymous> (/builds/worker/checkouts/gecko/remote/test/puppeteer/node_modules/mocha/lib/runnable.js:244:24)\n    at ontimeout (timers.js:436:11)\n    at tryOnTimeout (timers.js:300:5)\n    at listOnTimeout (timers.js:263:5)\n    at Timer.processTimers (timers.js:223:10)"}]
[task 2021-03-12T17:17:45.994Z] PID 389 | Exiting due to channel error.
[task 2021-03-12T17:17:45.994Z] PID 389 | Exiting due to channel error.
[task 2021-03-12T17:17:45.994Z] PID 389 | Exiting due to channel error.
[task 2021-03-12T17:17:45.998Z] PID 389 | Exiting due to channel error.
[task 2021-03-12T17:17:45.999Z] PID 389 | Exiting due to channel error.
[task 2021-03-12T17:17:46.031Z] PID 389 | *** You are running in headless mode.
[task 2021-03-12T17:17:46.262Z] PID 389 | [GFX1-]: glxtest: libEGL initialize failed
[task 2021-03-12T17:17:46.262Z] PID 389 | [GFX1-]: glxtest: Unable to open a connection to the X server
[task 2021-03-12T17:17:46.263Z] PID 389 | [GFX1-]: glxtest: libEGL initialize failed
[task 2021-03-12T17:17:47.301Z] PID 389 | 1615569467300	RemoteAgent	DEBUG	Setting recommended pref prompts.contentPromptSubDialog to false
[task 2021-03-12T17:17:47.312Z] PID 389 | DevTools listening on ws://localhost:40921/devtools/browser/1a35cc94-cfbf-4b28-9ac4-f98e56b4014f
[task 2021-03-12T17:17:47.332Z] PID 389 | 1615569467331	RemoteAgent	TRACE	(connection {53230b00-b0a0-45bb-ab35-b7449cb04396})-> {"method":"Target.setDiscoverTargets","params":{"discover":true},"id":1}
[task 2021-03-12T17:17:47.333Z] PID 389 | 1615569467333	RemoteAgent	TRACE	<-(connection {53230b00-b0a0-45bb-ab35-b7449cb04396}) {"method":"Target.targetCreated","params":{"targetInfo":{"targetId":"9eb71c52-a000-4106-b1b3-71c401281f49","type":"page","title":"","url":"about:blank","attached":false,"browserContextId":null}}}
[task 2021-03-12T17:17:47.334Z] PID 389 | 1615569467333	RemoteAgent	TRACE	<-(connection {53230b00-b0a0-45bb-ab35-b7449cb04396}) {"method":"Target.targetCreated","params":{"targetInfo":{"targetId":"1a35cc94-cfbf-4b28-9ac4-f98e56b4014f","type":"browser","attached":true}}}
[task 2021-03-12T17:17:47.334Z] PID 389 | 1615569467333	RemoteAgent	TRACE	<-(connection {53230b00-b0a0-45bb-ab35-b7449cb04396}) {"id":1,"result":{}}
[task 2021-03-12T17:17:47.370Z] TEST-START | querySelector Page.$eval should work (queryselector.spec.ts)```

Florian can you take a look please?
Thank you.

Flags: needinfo?(florian)
Regressed by: 1694659

Puppeteer hardcodes labels for some reason - https://searchfox.org/mozilla-central/rev/898cc2d20f2ceb2723e708162a98653a04b32496/remote/test/puppeteer/test/page.spec.ts#70-72 . This is a bad idea.

Can we just remove these assertions, :whimboo ?

https://searchfox.org/mozilla-central/rev/898cc2d20f2ceb2723e708162a98653a04b32496/remote/test/puppeteer-expected.json#1215 also susggests a timeout is expected here, so I'm not clear on why this is failing (or why we expect a timeout here).

Flags: needinfo?(florian) → needinfo?(hskupin)

(In reply to :Gijs (he/him) from comment #2)

Puppeteer hardcodes labels for some reason - https://searchfox.org/mozilla-central/rev/898cc2d20f2ceb2723e708162a98653a04b32496/remote/test/puppeteer/test/page.spec.ts#70-72 . This is a bad idea.

Can we just remove these assertions, :whimboo ?

Alternatively, could the test verify that the message is not empty, instead of checking for the specific string?

For me it is fine to check for any string. I will propose that change upstream and when it got accepted we can patch our version.

Flags: needinfo?(hskupin)

The PR is here: https://github.com/puppeteer/puppeteer/pull/6995

Once it has been reviewed and landed I will come up with the same fix for our downstream copy.

Assignee: nobody → hskupin
Status: NEW → ASSIGNED
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9d48260391c1
[puppeteer] Improve "Page.close should run beforeunload if asked for" unittest for Firefox. r=remote-protocol-reviewers,jdescottes
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 88 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: