Debugger lists about:neterror pages for iframes with domains prohibited via hosts (Win7)

UNCONFIRMED
Unassigned

Status

P3
normal
UNCONFIRMED
3 years ago
4 months ago

People

(Reporter: arni2033, Unassigned)

Tracking

Trunk

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Created attachment 8720453 [details]
testcase 1 - Debugger lists neterror pages.html

>>>   My Info:   Win7_64, Nightly 47, 32bit, ID 20160212030242
STR:
1. Open c:\Windows\System32\drivers\etc\ , open file "hosts" in that folder in text editor
2. Add 1 line in that file:   "127.0.0.1 ad.doubleclick.net"   (without quotes), save the file
3. Open attached "testcase 1" in a new tab. Press Ctrl+Shift+R in that tab.
4. Open devtools -> Debugger

AR:
 Debugger lists about:neterror page in the left pane

ER:
 That frame shouldn't appear in the list just like normal valid script. Sometimes I use
 "search in all files" in debugger, and that error page definitely shouldn't interfere.

I'm leaving this unconfirmed only becase... well, maybe that was planned?

Screenshot:
> https://dl.dropboxusercontent.com/s/sefjega4w8uzd49/screenshot%201%20%28youtube%29%20-%20Debugger%20lists%20neterror%20pages.png?dl=0
I suspect that about:neterror shows up because it contains at least one script, so it's treated as a HTML source. If that's the case, then this behavior is to be expected, although I'm not sure if it's also desired.

James, what do you think?
Flags: needinfo?(jlong)
This is a UI papercut, and is probably expected behavior, so I'm marking this as P3 for now. If James thinks that it should be a bug, we can up the priority to P2.
Priority: -- → P3
Yes, I can even see in the glimpse of the webpage that the "page cannot be found" page is being displayed, probably inside an iframe. We show all sources within frames. You blocked the page, so instead of seeing the sources for the page, you are seeing the sources for the about:neterror page. Nothing surprising here.

What you really are asking for is the ability to only see sources in the top-level page and none of its iframes. I think you can do this with the button in the toolbar that lets you select which frame you are inspecting; it looks like a black box with dotted lines inside of it. You select frames within the page and it'll focus on the frame. Although, I'm not sure if you can select *just* the top frame and none of its children though.
Flags: needinfo?(jlong)
(In reply to James Long (:jlongster) from comment #3)
> Yes, I can even see in the glimpse of the webpage that the "page cannot be
> found" page is being displayed, probably inside an iframe. We show all
> sources within frames. You blocked the page, so instead of seeing the
> sources for the page, you are seeing the sources for the about:neterror
> page. Nothing surprising here.
> 
> What you really are asking for is the ability to only see sources in the
> top-level page and none of its iframes. I think you can do this with the
> button in the toolbar that lets you select which frame you are inspecting;
> it looks like a black box with dotted lines inside of it. You select frames
> within the page and it'll focus on the frame. Although, I'm not sure if you
> can select *just* the top frame and none of its children though.

When you select the top-level frame, you actually select all frames on the page. Only when you select a subframe do we only select that specific frame. We could easily change that though, if we wanted to.
(Reporter)

Comment 5

3 years ago
(In reply to James Long (:jlongster) from comment #3)
> You blocked the page, so instead of seeing the sources for the page, you are seeing the
> sources for the about:neterror page. Nothing surprising here.
But why anybody would need to inspect error pages in frames? They are supposed to be isolated anyway
That is the only surprising thing.

> What you really are asking for is the ability to only see sources in the
> top-level page and none of its iframes.
No... I reported error pages spamming in search results in Debugger (and in sources list a bit)
Actually, the feature you mentioned looks incomplete to me... I may still be interested in inspecting a useful frame on the same domain.

Another possible compromise: (1) to make error pages obey pref "Automatically Black Box Minified Sources" AND (2) add a pref to exclude strings found in black-boxed scripts from search results
I believe somebody already thought about (2) and filed a bug, because it seems logical.

Updated

4 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.