(TypeError: Cannot read properties of null (reading 'removeChild')) #627
-
Hi!
When users of the application navigate to three different pages in our application we see the following error in Azure Application Insights:
The error occurs only for some of the users and I cant reproduce it myself making it very hard to solve. Regards Niclas |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This type of error usually occurs when some browser-code (JavaScript? extension? 3rd party component) is removing an element from the page out of Blazor, so that causes Blazor to fail because something external made the DOM out of sync with the representation it has in memory. |
Beta Was this translation helpful? Give feedback.
Hi Hakenr, finally I have solved our problem and wanted to share the solution if anyone else is having the same problem.
In our case it wasn't any of the third party JS scripts we are using but instead it was a Google Chrome's language translation feature that changed the DOM from the outside. The fix was very simple, just include the "translate" attribute on the html element which prevents any translate tool from running:
<html lang="sv" translate="no">
Regards Niclas