Closed
Bug 1378810
Opened 7 years ago
Closed 7 years ago
listeningPromise does not wait for all listeners attached to the correct browser
Categories
(Remote Protocol :: Marionette, defect, P1)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1332122
People
(Reporter: whimboo, Assigned: whimboo)
References
Details
Attachments
(1 file)
(deleted),
text/x-review-board-request
|
Details |
The problem here is part of the `new_session` command which endpoint in Marionette is `newSession`. In that method we have two promises for registering browsers, and waiting for listeners attached. The faulty one is the latter: https://dxr.mozilla.org/mozilla-central/rev/211d4dd61025c0a40caea7a54c9066e051bdde8c/testing/marionette/driver.js#628-637 As you can see we handle the `Marionette:listenersAttached` message, but we actually do not care about from which browser it comes. This means if multiple tabs are open, and the selected one is not the first one, we resolve the promise already for the very first tab, but do not wait until the listeners for our wanted tab's browser have been attached. As such the next command which gets executed in content scope will fail because the end-point for the message doens't exist yet.
Assignee | ||
Comment 1•7 years ago
|
||
Actually it's not only the `newSession` command but every command which uses the `listeningPromise`. This includes switching tabs and frames.
Summary: newSession does not wait for all listeners attached to the correct browser → listeningPromise does not wait for all listeners attached to the correct browser
Assignee | ||
Updated•7 years ago
|
Whiteboard: [spec][17/07]
Comment hidden (mozreview-request) |
Assignee | ||
Comment 3•7 years ago
|
||
I don't know how as best create a reliable testcase for this issue. Given that different builds are slower or faster it makes it hard. And we talk about some milliseconds here. So I triggered a try build, and if it is green we should get it in.
Assignee | ||
Comment 4•7 years ago
|
||
So the try build failed because with the current code in listener.js we only return a valid listener ID via the `Marionette:listenersAttached` message if a remoteness change has happened. This is pretty bad because we have lots of reloads of the listener nowadays which is not causing a remoteness change. Given that I did all the frame script reload refactoring in bug 1332122 I'm tempted to include this small change into the patch set of the other bug instead. Even with the risk that we cannot uplift it to beta and/or 52esr.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox55:
affected → ---
status-firefox56:
affected → ---
status-firefox-esr52:
affected → ---
Resolution: --- → DUPLICATE
Whiteboard: [spec][17/07]
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•