Closed Bug 1863398 Opened 2 years ago Closed 2 years ago

Can't add DOM-Modification breakpoints after a reload; they fail with `TypeError: can't access property "update", container is undefined` in Browser Console

Categories

(DevTools :: Inspector, defect, P2)

defect

Tracking

(firefox-esr115 wontfix, firefox119 wontfix, firefox120 wontfix, firefox121 verified)

VERIFIED FIXED
121 Branch
Tracking Status
firefox-esr115 --- wontfix
firefox119 --- wontfix
firefox120 --- wontfix
firefox121 --- verified

People

(Reporter: dholbert, Assigned: nchevobbe)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

STR:

  1. Visit http://example.org/ (or probably any site)
  2. Right-click some blank area, Inspect
  3. In the inspector, right click <html> and choose "Break on: Attribute Modification"
  4. Verify that step 3 made a difference -- right-click <html> again, and choose "Break on", and verify that "Attribute Modification" is shown checked. (Also, an arrow/label should be to the left of the html element in the inspector)
  5. Ctrl+R to reload the page (keeping devtools inspector open)
  6. Repeat steps 3 and 4.

ACTUAL RESULTS:
The "Break on: Attribute Modification" function stops working (i.e. it has no effect). It seems that it becomes broken and stays broken (i.e. I can't watch attribute modifications) after I reload. If I check Browser Console (ctrl shift J), I see the following error appear when I click "Break on: Attribute Modification" (in step 5, i.e. after the previous successful watchpoint + reload):

TypeError: can't access property "update", container is undefined    markup.js:467:7

which points to this line.

EXPECTED RESULTS:
No TypeError; the breakpoint should be successfully added.

Note: if I close and reopen devtools, then the issue seems to go away.

(In reply to Daniel Holbert [:dholbert] from comment #0)

I see the following error [...] which points to this line.

Looks like this is a regression from the bug that added that line, bug 1581213.

Last good Nightly: 2022-10-26
First bad Nightly: 2022-10-27
Regression pushlog:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ab716c244f85daccb19bf580c59caf3db4a4b37f&tochange=2dddf127c6ab66595268672db7088712f1322aff
...which includes bug 1581213.

Keywords: regression
Regressed by: 1581213

(Author on that bug hasn't been active on Bugzilla for a while. jdescottes, maybe you could take a look here? Maybe this might be as simple as adding a null-check or something?)

Flags: needinfo?(jdescottes)

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

I'll have a look

Flags: needinfo?(jdescottes)
Priority: -- → P2

DOM mutation breakpoints are set on specific node fronts,
and we would keep retrieving node fronts from now discarded
targets after the page navigated.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Attachment #9362634 - Attachment description: Bug 1863398 - [devtools] Cleanup Toolbox store DOM mutation breakpoints on inspector front destroy. r=#devtools-reviewers. → Bug 1863398 - [devtools] Cleanup Toolbox store DOM mutation breakpoints on target destroy. r=#devtools-reviewers.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/cee24679e2a2 [devtools] Cleanup Toolbox store DOM mutation breakpoints on target destroy. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch

The patch landed in nightly and beta is affected.
:nchevobbe, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox120 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(nchevobbe)

(In reply to BugBot [:suhaib / :marco/ :calixte] from comment #8)

The patch landed in nightly and beta is affected.
:nchevobbe, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox120 to wontfix.

For more information, please visit BugBot documentation.

the issue exists for a while already, and we're at the end of the cycle, so let's not uplift

Flags: needinfo?(nchevobbe)
Flags: qe-verify+

Reproduced this issue on an affected Nightly build from 2023-11-06, on Ubuntu 22 following the STR from Comment 0.
Verified as fixed on Firefox 121.0b4 (20231127091758) on Ubuntu 22, macOS 11 and Windows 10. The breakpoint is successfully added and no TypeError is seen in the Browser Console.

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

Attachment

General

Created:
Updated:
Size: