Closed Bug 1337464 Opened 7 years ago Closed 7 years ago

Marionette hangs when navigating between document fragments on `about:blank`

Categories

(Remote Protocol :: Marionette, defect)

Version 3
defect
Not set
normal

Tracking

(firefox-esr52 fixed, firefox54 fixed, firefox55 fixed)

RESOLVED FIXED
mozilla55
Tracking Status
firefox-esr52 --- fixed
firefox54 --- fixed
firefox55 --- fixed

People

(Reporter: jugglinmike, Assigned: whimboo)

References

(Blocks 1 open bug)

Details

When the client is viewing the "about:blank" page, Marionette hangs if a "Get"
command specifies the same page with a fragment identifier. The following
transitions cause a time out:

- from `about:blank` to `about:blank#a`
- from `about:blank#a` to `about:blank#b`

However, Marionette correctly responds when navigating from a URL with a
fragment to one that does not specify a fragment (i.e. from `about:blank#a` to
`about:blank`).

I am using the `wdclient` library [1] to issue requests through GeckoDriver
[2]. The log provided by GeckoDriver includes the following information prior
to timing out:

    hyper::server	DEBUG	Incoming stream"
    hyper::server::request	DEBUG	Request Line: Post AbsolutePath("/session/e61c7447-12b4-4976-84fd-9c8fd6f76505/url") Http11"
    hyper::server::request	DEBUG	Headers { Host: 127.0.0.1:4445, Accept-Encoding: identity, Content-Length: 22, }"
    webdriver::server	DEBUG	Got request POST AbsolutePath("/session/e61c7447-12b4-4976-84fd-9c8fd6f76505/url")"
    webdriver::command	DEBUG	Got request body {"url": "about:blank"}"
    geckodriver::marionette	DEBUG	→ 33:[0,2,"get",{"url":"about:blank"}]"
    geckodriver::marionette	DEBUG	← [1,2,null,{}]"
    webdriver::server	DEBUG	Returning status Ok"
    webdriver::server	DEBUG	Returning body {}"
    hyper::server::response	DEBUG	writing head: Http11 Ok"
    hyper::server::response	DEBUG	headers ["
    ction: close, Content-Type: application/json, Content-Length: 2, Date: Tue, 07 Feb 2017 18:14:31 GMT, }]"
    hyper::server::response	DEBUG	write 2 bytes"
    hyper::server	DEBUG	keep_alive = false for 127.0.0.1:46388"
    hyper::server	DEBUG	keep_alive loop ending for 127.0.0.1:46388"
    hyper::server	DEBUG	Incoming stream"
    hyper::server::request	DEBUG	Request Line: Post AbsolutePath("/session/e61c7447-12b4-4976-84fd-9c8fd6f76505/url") Http11"
    hyper::server::request	DEBUG	Headers { Host: 127.0.0.1:4445, Accept-Encoding: identity, Content-Length: 24, }"
    webdriver::server	DEBUG	Got request POST AbsolutePath("/session/e61c7447-12b4-4976-84fd-9c8fd6f76505/url")"
    webdriver::command	DEBUG	Got request body {"url": "about:blank#a"}"
    geckodriver::marionette	DEBUG	→ 35:[0,3,"get",{"url":"about:blank#a"}]"

This occurs on the x64 Linux builds of Firefox (51.0.1) and Firefox Nightly
(54.0a1 2017-01-31).

For context: I am writing tests for `web-platform-tests` which must be
executable in the absence of a network connection, so I am limited in which
URLs I can write test against.

[1] https://github.com/w3c/wdclient
[2] https://github.com/mozilla/geckodriver
This should have been fixed by https://bugzilla.mozilla.org/show_bug.cgi?id=1280300, but it’s possible we are not handling the about: protocol correctly since it is a ‘special’ protocol (https://url.spec.whatwg.org/#is-special).
Maybe bug 1333458 will help.
Depends on: webdriver-navigate
(In reply to Mike Pennisi [:jugglinmike] from comment #0)
> - from `about:blank` to `about:blank#a`

1499264503433	Marionette	TRACE	6 -> [0,10,"get",{"url":"about:blank"}]
1499264503440	Marionette	DEBUG	Received DOM event "beforeunload" for "about:blank"
1499264503449	Marionette	DEBUG	Received DOM event "pagehide" for "about:blank"
1499264503450	Marionette	DEBUG	Received DOM event "unload" for "about:blank"
1499264503463	Marionette	DEBUG	Received DOM event "DOMContentLoaded" for "about:blank"
1499264503469	Marionette	DEBUG	Received DOM event "pageshow" for "about:blank"
1499264503506	Marionette	TRACE	6 <- [1,10,null,{}]
1499264503529	Marionette	TRACE	6 -> [0,11,"get",{"url":"about:blank#a"}]
1499264503536	Marionette	DEBUG	Received DOM event "hashchange" for "about:blank#a"
1499264503560	Marionette	TRACE	6 <- [1,11,null,{}]

> - from `about:blank#a` to `about:blank#b`

1499264626319	Marionette	TRACE	6 -> [0,10,"get",{"url":"about:blank#a"}]
1499264626329	Marionette	DEBUG	Received DOM event "hashchange" for "about:blank#a"
1499264626356	Marionette	TRACE	6 <- [1,10,null,{}]
1499264626371	Marionette	TRACE	6 -> [0,11,"get",{"url":"about:blank"}]
1499264626376	Marionette	DEBUG	Received DOM event "beforeunload" for "about:blank#a"
1499264626394	Marionette	DEBUG	Received DOM event "pagehide" for "about:blank#a"
1499264626396	Marionette	DEBUG	Received DOM event "unload" for "about:blank#a"
1499264626410	Marionette	DEBUG	Received DOM event "DOMContentLoaded" for "about:blank#a"
1499264626417	Marionette	DEBUG	Received DOM event "pageshow" for "about:blank#a"
1499264626446	Marionette	TRACE	6 <- [1,11,null,{}]

This should all work across all supported versions of Firefox now, and I just missed to flag this bug when working on bug 1330348.
Status: NEW → RESOLVED
Closed: 7 years ago
Depends on: 1330348
No longer depends on: webdriver-navigate
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
(In reply to Henrik Skupin (:whimboo) from comment #3)
> > - from `about:blank#a` to `about:blank#b`

Sorry but the last comment contained the wrong part of the log. Here the correct one:

1499265236852	Marionette	TRACE	6 -> [0,10,"get",{"url":"about:blank#a"}]
1499265236885	Marionette	DEBUG	Received DOM event "hashchange" for "about:blank#a"
1499265236952	Marionette	TRACE	6 <- [1,10,null,{}]
1499265237090	Marionette	TRACE	6 -> [0,11,"get",{"url":"about:blank#b"}]
1499265237116	Marionette	DEBUG	Received DOM event "hashchange" for "about:blank#b"
1499265237137	Marionette	TRACE	6 <- [1,11,null,{}]
Assignee: nobody → hskupin
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.