Unable to get property _destroyed of undefined or null reference

Hi everyone, Ever since the Windows 10 April 2018 Update the browser Edge is having trouble working with Mendix. We have already received two complaints from customers about this issue and at first I wasn't able to reproduce it in Edge version 41. After I ran the Windows 10 update myself (that also updates Edge to version 42) I was able to reproduce the problem as well. Even the simplest of tasks like a menu item showing a page will result in the following console error: "Unable to get property '_destroyed' of undefined or null reference" It might well be something that Microsoft/Mendix will have to fix, but I just wanted to check if there's any workaround that anyone might have found. And also to see how many people can confirm they are having this issue as well. The two apps where we have experienced this are in 6.10.10 and 7.5.1. Upgrading the 7.5.1 one to 7.9.0 does seem to fix the issue, but I'm not sure the other customer is willing to make this step when the easier solution is to have people switch browsers, so any ideas are more than welcome!   [Edit] For those looking for a script fix, the one that Marcel provided works, but Mendix also provided one that works slightly better (no errors in the browser console at all). Add the following lines of code (before the line of code that loads the mxui.js file) to the index.html in your theme folder. <script type="text/javascript">      if (/Edge/i.test(navigator.userAgent)){          // patch for Microsoft Edge 17.17134          // see https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/17847795/          Document.prototype.adoptNode = function(element) {              var parent = element.parentNode;              var nodeCopy = document.importNode(element, true);              parent.removeChild(element);              return nodeCopy;          }      } </script>
4 answers

Hi Dennis,

If you are looking for a quick (dirty) fix:

  1. Get the original mxui.js for your modeler version
  2. Copy it to your theme folder and change the reference to the mxui.js file in your theme's index.html to the one in your theme folder
  3. In the mxui.js file, search for "return hash[node.getAttribute("widgetId")];" and replace this with "return hash[node.getAttribute("widgetid")];"
  4. Save & restart project

The thing is mxui.js does a getAttribute on widgetId with uppercase 'i'. However, the attributes in the DOM are all lowercase and altough I think getAttribute is supposed to be case-insensitive, it only works when you use widgetid with lowercase 'i' in the getAttribute.

At least this worked for me as a temporary hotfix untill a cleaner solution or fix from Mendix comes available.


I have seen this same issue today when testing one of our widgets. Reproduced this in 6.10.10.

I have pinpointed the part of code that causes this problem in our source. Seems like Edge is doing some weird voodoo here, as it works in a normal fashion in other browsers.

I have submitted a ticket with Support and will see if R&D can fix this issue.

Edit (June 7): I have been informed that they have a fix for this, currently testing it. If all goes well, this will be fixed in 6.10.13 and 7.16 (upcoming release)

Edit (July 3): Fix is included in 6.10.13 and 7.16.0


I now see your question, I have the same problem.


Also in free app https://userofpostalcodeho.mxapps.io/ in version 7.8

Not in the same tools rebuilt 7.0.2 version https://userofpostalcodeho101.mxapps.io/

Tried a different layout for every page, but same error.

Also see this problem at a customer in 7.4, same App in version 7.13.1 giving the same error, too.

Another customer on 7.13.1 is fine.

So it is not bug that every IE Edge user is experiencing, but certainly a lot.