Error Message: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
Bug Description
I am getting frequently repeating crashes with the error: Error Message: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node. Error Stack: "Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.\n at dl (https://regex101.com/static/vendors-bundle.63bbe289ff4e5599639f.js:2:176938)\n at fl (https://regex101.com/static/vendors-bundle.63bbe289ff4e5599639f.js:2:176623)\n at dl (https://regex101.com/static/vendors-bundle.63bbe289ff4e5599639f.js:2:177694)\n at gl (https://regex101.com/static/vendors-bundle.63bbe289ff4e5599639f.js:2:178182)\n at ml (https://regex101.com/static/vendors-bundle.63bbe289ff4e5599639f.js:2:178642)\n at gl (https://regex101.com/static/vendors-bundle.63bbe289ff4e5599639f.js:2:178332)\n at ml (https://regex101.com/static/vendors-bundle.63bbe289ff4e5599639f.js:2:178445)\n at gl (https://regex101.com/static/vendors-bundle.63bbe289ff4e5599639f.js:2:178332)\n at ml (https://regex101.com/static/vendors-bundle.63bbe289ff4e5599639f.js:2:178642)\n at gl (https://regex101.com/static/vendors-bundle.63bbe289ff4e5599639f.js:2:178332)"
Reproduction steps
I have gotten this with several different Regex expressions, so I'm not sure if it is particular to the expression, but this expression has been triggering it a lot today:
^\t*Assert\.AreEqual\((("[^"]*")|([^,\(\n\r]+(\([^\)\n\r)]*\),?)?)),\w*((\n\r)*\s*)(("[^"]*")|([^,\(\n\r]+(\([^\)\n\r)]*\),?)?)+)(,|\))
along with this test string:
Assert.AreEqual("Azeri",
my.frog(ate, an(old), apple)),
"Setup problem: AzeriJUD should return language name as Azeri.");
Assert.AreEqual("Engl, ish",
ReferenceTextTestUtils.CreateCustomReferenceText(persistenceImpl, TestReferenceTextResource.EnglishJUD));
Assert.AreEqual(my.frog,
ReferenceTextTestUtils.CreateCustomReferenceText(persistenceImpl, TestReferenceTextResource.EnglishJUD),
"Setup problem: AzeriJUD should return language name as Azeri.");
Assert.AreEqual(my.frog(ate, an),
ReferenceTextTestUtils.CreateCustomReferenceText(persistenceImpl, TestReferenceTextResource.EnglishJUD),
"Setup problem: AzeriJUD should return language name as Azeri.");
Assert.AreEqual(my.frog(ate, an(old), apple),
ReferenceTextTestUtils.CreateCustomReferenceText(persistenceImpl, TestReferenceTextResource.EnglishJUD),
"Setup problem: AzeriJUD should return language name as Azeri.");
"Setup problem: AzeriJUD should return language name as Azeri.");
Assert.AreEqual("Engl, is, ()h", mom);
Assert.AreEqual(my.frog(), ReferenceTextTestUtils.CreateCustomReferenceText(persistenceImpl, TestReferenceTextResource.EnglishJUD), "Setup problem: AzeriJUD should return language name as Azeri.");
I think every time it crashes, it happens when I am editing the expression, but it might also have happened when editing the test data. It is often (but maybe not always) preceded by edits that result in a "Catastrophic backtracking" message
Expected Outcome
Don't crash.
Browser
Chrome Version 129.0.6668.90 (Official Build) (64-bit)
OS
Edition Windows 11 Pro Version 23H2 Installed on 9/13/2024 OS build 22631.4317 Experience Windows Feature Experience Pack 1000.22700.1041.0
Processor 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz 2.30 GHz Installed RAM 16.0 GB (15.7 GB usable)
Can you reproduce this in an incognito window? I suspect this may be caused by a rogue browser extension.
So far unable to repro in an incognito window, so perhaps you're correct.
Yeah, there are some extensions that edit the DOM directly, which React does not like, as it expects to have full authority over it. Only solution seem to be disabling these extensions. Translation plugins seem to be the most common culprit.
Okay, probably my phone dialer extension. It's a new thing at the office and I don't really use it, so I disabled it. We'll see, but my guess is that'll fix it.