Closed Bug 1804232 Opened 1 year ago Closed 1 year ago

Html Preview of network response is broken in console

Categories

(DevTools :: Console, defect)

Firefox 107
defect

Tracking

(firefox-esr102 unaffected, firefox107 wontfix, firefox108 wontfix, firefox109 fixed, firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox107 --- wontfix
firefox108 --- wontfix
firefox109 --- fixed
firefox110 --- fixed

People

(Reporter: alexander, Assigned: nchevobbe)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:107.0) Gecko/20100101 Firefox/107.0

Steps to reproduce:

I make an Ajax request and want to see the result of its execution in the console of the webdeveloper panel.

Actual results:

If the result is with content-type: text/html then I see a white empty window instead of rendering html. Moreover, if you switch to "show code" there is an html code there. There is no rendering.

Expected results:

Before version 107 everything was fine (the result was rendered), now rendering works only on the "Network" tab. There the result is displayed as it should.

The Bugbug bot thinks this bug should belong to the 'DevTools::Netmonitor' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Netmonitor
Product: Firefox → DevTools

Move to 'DevTools::Console' component, please.

(In reply to alexander from comment #2)

Move to 'DevTools::Console' component, please.

The console component showing network requests detail is the same as in the Netmonitor, so this is the right component

Regressor could be Bug 1640689
Alexander, could you give us a public url where we can check this? if it's not public, maybe you could paste the actual HTML content of the request here so we can reproduce the issue.

Flags: needinfo?(alexander)

No problem, i maked it. Look at http://tst.dimases.ru/ with simple instruction with screenshots...

Flags: needinfo?(alexander)

(In reply to alexander from comment #5)

No problem, i maked it. Look at http://tst.dimases.ru/ with simple instruction with screenshots...

Thanks a lot for putting this up.
And sorry, I was wrong, this does only appear in the webconsole, I'll move the bug to the appropriate module

Component: Netmonitor → Console

Ok, thanks, I said that it is only in the console =). I'm waiting for a fix, I really need to see the rendering there.

(In reply to alexander from comment #7)

Ok, thanks, I said that it is only in the console =). I'm waiting for a fix, I really need to see the rendering there.

can't you use the network panel until we fix this?

So when we render the HTML preview in the console, we're getting a oop-browser-crashed event, from https://searchfox.org/mozilla-central/rev/70bc66e002ad1cdb1fe5d77428803432f261038a/devtools/client/netmonitor/src/components/previews/HtmlPreview.js#26-33

const iframe = container.ownerDocument.createXULElement("iframe");
this.iframe = iframe;
iframe.setAttribute("type", "content");
iframe.setAttribute("remote", "true");
iframe.addEventListener("mousedown", e => e.preventDefault(), {
  capture: true,
});
container.appendChild(iframe); // triggers the "oop-browser-crashed" event

I'm still not sure what's causing this

okay, we probably need to add the console document in https://searchfox.org/mozilla-central/rev/70bc66e002ad1cdb1fe5d77428803432f261038a/dom/base/nsFrameLoader.cpp#2683

"chrome://devtools/content/netmonitor/index.html"_ns,
Regressed by: 1640689

(In reply to Nicolas Chevobbe [:nchevobbe] from comment #8)

can't you use the network panel until we fix this?
I use the network panel, though it's not very convenient. Hope it will be fixed in the next release.

:ochameau, since you are the author of the regressor, bug 1640689, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Flags: needinfo?(poirot.alex)
Keywords: regression
Assignee: nobody → nchevobbe
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(poirot.alex)

Set release status flags based on info from the regressing bug 1640689

As it was done for the netmonitor in Bug 1640689, we need to add the webconsole
document to the whitelist of nested content browsers so we can show the html
preview of network request in the console.

Summary: Render html ajax in console is blanc result → Html Preview of network response is broken in console
Duplicate of this bug: 1804265
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e5f24755764e
Add webconsole to the whitelist of nested content browsers. r=smaug.
https://hg.mozilla.org/integration/autoland/rev/4aec58116226
[devtools] Add test for network request HTML preview in webconsole. r=bomsy.
Duplicate of this bug: 1805374

Set release status flags based on info from the regressing bug 1640689

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch

Comment on attachment 9307123 [details]
Bug 1804232 - Add webconsole to the whitelist of nested content browsers. r=smaug.

Beta/Release Uplift Approval Request

  • User impact if declined: Users can't see network requests html preview in the console (we had several reports about this already)
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): devtools only patch, with automated test (in https://phabricator.services.mozilla.com/D164104), reproducing a change that was made earlier in the netmonitor
  • String changes made/needed:
  • Is Android affected?: No
Attachment #9307123 - Flags: approval-mozilla-beta?
Attachment #9307124 - Flags: approval-mozilla-beta?

Comment on attachment 9307123 [details]
Bug 1804232 - Add webconsole to the whitelist of nested content browsers. r=smaug.

Approved for 109.0b3.

Attachment #9307123 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9307124 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: