Closed Bug 1546029 Opened 6 years ago Closed 6 years ago

Blank Inspector trying to inspect element on pop-out code window

Categories

(DevTools :: Inspector, defect, P1)

66 Branch
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1277348

People

(Reporter: 13hurdw, Assigned: miker)

References

()

Details

Attachments

(2 files, 1 obsolete file)

Attached image Open Code in New Window

Thank you for helping make Firefox better. If you are reporting a defect, please complete the following:

What were you doing?

Please tell us what site you were on, and what steps led to the error you are reporting

What happened?

Inspector just shows a blank area

What should have happened?

Inspector shows rendered source

Anything else we should know?

Firefox 66.0.3
Ubuntu

Assignee: nobody → mratcliffe
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Unspecified → All
Priority: -- → P1
Hardware: Unspecified → All

There is no error thrown here so it is hard to find.

The problem is that window.document.readyState === "loading" and it stays there.

In devtools/server/actors/inspector/inspector.js:127 we have this:

if (window.document.readyState === "loading") {
  window.addEventListener(loadEvent, domReady, true);
} else {
  domReady();
}

So we wait for ever for the document to finish loading.

If we just call domReady() it works just fine but that would break other documents.

The web server is misconfigured so the length of the document reported in headers to the browser is longer than the actual document length. This causes the ready state to stick on "loading" because the browser is still expecting more data.

This doesn't mean we can't do anything about it though.

There is no need to wait here as it just slows things down. Removing it stops us waiting for an event that may never happen and in some cases speeds up the markup view.

I have tested this on plenty of websites and it works just fine.

The web server is misconfigured so the length of the document reported in headers to the browser is longer than the actual document length. This causes the ready state to stick on "loading" because the browser is still expecting more data.

This doesn't mean we can't do anything about it though.

There is no need to wait here as it just slows things down. Removing it stops us waiting for an event that may never happen and in some cases speeds up the markup view.

I have tested this on plenty of websites and it works just fine.

try

https://treeherder.mozilla.org/#/jobs?repo=try&revision=1f4b881a76241accaf74bf7f16d70d9d4877497f

Assignee: mratcliffe → nobody
Status: ASSIGNED → NEW

Mike, this is still marked as a P1, but is now unassigned. Does the problem still exist? Does it lead to a "crash" of the inspector? If so, I believe it should still be a P1. And because you've done work on it already and have a patch, would you be ok resuming the work on this? If not, please let us know what the outstanding issues are so someone else can potentially resume.

Flags: needinfo?(mratcliffe)
Attachment #9060942 - Attachment is obsolete: true

Ah, this is a duplicate of another document.write bug... marking it as such.

It is not a P1 as no error is thrown... it is just that the inspector never initializes because window.document.readyState === "loading" and it stays on loading because the response.write() replaces the document contents and then the size of the document never matches the reported size from the server.

Assignee: nobody → mratcliffe
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(mratcliffe)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: