Closed Bug 1624479 Opened 4 years ago Closed 4 years ago

HTML (index) source replaced by dynamically loaded script

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: Harald, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached image ScreenFlow.gif

What were you doing?

  1. Open Debugger on https://www.google.com/covid19/ and enable pausing for click events
  2. Click one of the elements
  3. (Alternatively, open (index) from sources before pausing)

What happened?

Pauses in (index), which is line of compressed JS.

When opening (index) before pausing, the original HTML loads and the :1 location highlights the first line of the file.

What should have happened?

Consistent handling of (index). Don't override the original (index).

Logan, any idea how (index) gets overridden here?

Flags: needinfo?(loganfsmyth)

I can't seem to reproduce this now, can you? When I try to enable click event breakpoints, it pauses in code in index.min.js and in google analytics but not in (index) so I never saw the behavior you've recorded here.

When I try the "Alternatively, open (index) from sources before pausing" approach, I am sometimes getting "Error: Incorrect contents fetched, please reload." and sometimes getting the HTML as normal in the editor. That said, the "Incorrect contents fetched" error can happen if the scripts/HTML on a page change between when it is loaded and when devtools is open, and that page is pretty dynamic, so I'd consider that potentially an expected error for a page like this.

So for your JS file replacement, I'm honestly not sure. I could see that happening if:

  • The HTML file was being served with a javascript content-type accidentally
  • A <script> element was injected into the HTML page and that somehow picked up the URL of the page?

I don't know if there are others, it's hard to without being able to reproduce.

Flags: needinfo?(loganfsmyth)
Flags: needinfo?(hkirschner)

I have not been able to reproduce on a clean profile; might be extension related.

Status: NEW → RESOLVED
Closed: 4 years ago
Flags: needinfo?(hkirschner)
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: