Closed Bug 1661627 Opened 4 years ago Closed 4 years ago

Browser toolbox isn't available if it's opened when print preview window is opened by clicking the print icon in the PDF viewer

Categories

(DevTools :: General, defect, P2)

defect

Tracking

(firefox82 verified)

VERIFIED FIXED
82 Branch
Tracking Status
firefox82 --- verified

People

(Reporter: hiro, Assigned: ochameau)

References

(Blocks 1 open bug)

Details

(Whiteboard: [print2020_v81] [old-ui-])

Attachments

(1 file)

STR;

  1. Open https://www.irs.gov/pub/irs-pdf/f1040.pdf
  2. Click the printer icon in the pdf viewer
  3. Open the browser toolbox

You will see a blank window

Thanks for the report!

I can't reproduce the problem on my machine Win 10, Nightly 82.
Hiroyuki, what OS/Firefox version are you running?

Do you see any exception e.g. in the Browser Console?

Honza

Flags: needinfo?(hikezoe.birchill)

I can also reproduce. Windows 10, latest Nightly.
Multiple exceptions in the browser console:

Failed to sendQuery in DevToolsFrameParent DevToolsFrameParent:instantiate-already-available DevToolsFrameParent.jsm:200:15
    sendQuery resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:200
    instantiateTarget resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:63
    createTargets resource://devtools/server/actors/watcher/target-helpers/frame-helper.js:39
    watchTargets resource://devtools/server/actors/watcher.js:137
    handler resource://devtools/shared/protocol/Actor.js:166
    onPacket resource://devtools/server/devtools-server-connection.js:379
    _onJSONObjectReady resource://devtools/shared/transport/transport.js:464
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103

Error: Mismatch between DevToolsFrameParent and DevToolsFrameChild  expected browsing context with browserId undefined, but got 32212254721 DevToolsFrameParent.jsm:201:15
    sendQuery resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:201
    instantiateTarget resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:63
    createTargets resource://devtools/server/actors/watcher/target-helpers/frame-helper.js:39
    watchTargets resource://devtools/server/actors/watcher.js:137
    handler resource://devtools/shared/protocol/Actor.js:166
    onPacket resource://devtools/server/devtools-server-connection.js:379
    _onJSONObjectReady resource://devtools/shared/transport/transport.js:464
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103
    makeInfallible resource://devtools/shared/ThreadSafeDevToolsUtils.js:103

Error while calling actor 'watcher's method 'watchTargets' Mismatch between DevToolsFrameParent and DevToolsFrameChild  expected browsing context with browserId undefined, but got 32212254721 Actor.js:95:13
    writeError resource://devtools/shared/protocol/Actor.js:95
    handler resource://devtools/shared/protocol/Actor.js:199

receiveMessage@resource://devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm:337:15
JSActor query*sendQuery@resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:197:31
instantiateTarget@resource://devtools/server/connectors/js-window-actor/DevToolsFrameParent.jsm:63:17
createTargets@resource://devtools/server/actors/watcher/target-helpers/frame-helper.js:39:8
watchTargets@resource://devtools/server/actors/watcher.js:137:30
handler@resource://devtools/shared/protocol/Actor.js:166:37
onPacket@resource://devtools/server/devtools-server-connection.js:379:58
_onJSONObjectReady/<@resource://devtools/shared/transport/transport.js:464:22
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22
exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22
Actor.js:100:15
    writeError resource://devtools/shared/protocol/Actor.js:100
    handler resource://devtools/shared/protocol/Actor.js:199

Alex, can you reproduce this?

Honza

Flags: needinfo?(poirot.alex)

I'm reproducing this, let me have a look

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Flags: needinfo?(poirot.alex)
Flags: needinfo?(hikezoe.birchill)

It looks like this is what causing the issue: https://searchfox.org/mozilla-central/rev/ce21a13035623c1d349980057d09000e70669802/devtools/server/connectors/js-window-actor/DevToolsFrameChild.jsm#34-41

One of the document in the page has docShell.hasLoadedNonBlankURI set to false, which makes us think it's an about:blank page, that we shouldn't handle, but is not detected from https://searchfox.org/mozilla-central/rev/ce21a13035623c1d349980057d09000e70669802/devtools/server/actors/watcher/target-helpers/frame-helper.js#247-253 , which ends up causing the issue in DevToolsFrameChild.

Setting as P2 since PDF printing is an important feature.
Thanks Nicolas for jumping in and helping!

Honza

Severity: -- → S3
Priority: -- → P2
Assignee: nchevobbe → poirot.alex

PDF print preview are using about:blank documents, which are ignored
by DevTools in order to save resources.
We avoid creating targets for these, very often, transcient documents.
I tried to find ways to distinguish typical temporary about:blank documents
from this print preview one.

Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bbf6a9ee320a
Stop ignoring PDF print preview documents. r=nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 82 Branch
Flags: qe-verify+

Reproduced the issue on the affected Nightly build from 2020-08-27 on Windows 10.
Verified-fixed on the latest Nightly 83.0a1 (2020-09-22) (64-bit) and Beta 82.0b2 on Windows 10, MacOS 10.15 and Ubuntu 16.04. The browser toolbox will be opened and functional when a pdf document is in print preview.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
See Also: → 1676769
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: