Warning when loading, Error when re-loading a page

We have a page which, when user navigates to it, produces a warning in Chrome:

index.js:2 [Deprecation] Listener added for a synchronous 'DOMNodeInserted' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.

But the page loads fine. However, if we then reload the page (using browser button), immediately after the page loads the page then crashes and in console we see these two errors:

sdk.js:16 DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.

and

Uncaught (in promise) DOMException: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.

This is totally out of my depth… I think perhaps it’s a core bug/issue with some React or Javascript that Backendless generates from UI Builder. Any idea what might be happening, or how I might perform some diagnostics/tests when the page is loading its various elements/components?

Hi @Alex_Klein,

could you please provide us with steps to reproduce?
Maybe you can provide us with the page URL where it happens.

Difficult to reproduce — I can only reproduce on a dev preview version (the error doesn’t happen on published version). And, we have since removed a certain function from the offending page, now the error seems to be gone… not sure why, because the same function is used on many other pages without trouble. I’ll mark this one as “solved”, if/when e run into the issue again I’ll be careful to create steps to reproduce :grinning:

1 Like