Broken page: (Failed to execute 'removeChild' on 'Node')

Hello :wave:

I’ve catched this error in console. It appears when I translate the page with the browser built-in Google Translator.

Console error

Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.


Repro

I changed Discourse language to e.g. French and translate it with built-in Google Translator to English.

Without Google Translate no error appears but when I turn on Google translator, after the first topic page change on New & Unread Topics the page will completely froze (broke).

I show it with topic page change but this issue also appears other pages…e.g. on /about when changing between /faq, /tos etc. with navigation if Google Translate enabled.

Thank you :slightly_smiling_face:

2 Likes

This is a tricky one, is this a Google bug or Discourse one? Built in translators fiddle with HTML structure that then makes Ember get super confused and lose its grounding.

1 Like

Yes, unfortunately it seems that this is the case. You are right, this is not a Discourse issue but rather a conflict between Ember and Google Translate. I have also found a report from 5 years ago in the Ember.js git repo regarding a similar issue. Thanks Sam :slightly_smiling_face:

1 Like

I can ask our Ember friends if they have any ideas here, but all bets tend to be out if the DOM changes underneath it.

3 Likes