This error typically indicates an issue with the client-side state or interaction with the Mendix client API, especially concerning the handling of DOM elements within custom widgets or JavaScript actions.
Given your description, the problem seems to be related to the lifecycle of a DOM element accessed by a Mendix widget or a custom JavaScript/TypeScript action within your page.
Here are steps to diagnose and potentially resolve the issue:
Verify Custom Widgets and JavaScript Actions: Check if the microflow in question is triggering any custom widgets or JavaScript actions that interact with the DOM. The error message suggests that a DOM element (domNode
) expected to be present is not found. This often happens when custom code tries to access an element before it's fully initialized or after it's been destroyed.
Review Widget Initialization and Cleanup: Ensure that any custom widget or JavaScript code properly handles the lifecycle of DOM elements. Widgets should only attempt to access DOM elements in the postCreate
lifecycle method (or equivalent for your widget framework) and should clean up any references in the uninitialize
method to prevent memory leaks and errors when elements are no longer present.
Context Refresh Handling: If the error occurs after a context refresh, ensure that custom code listens for and correctly handles Mendix context updates. Widgets and actions that rely on context data should update their state and DOM elements accordingly.
Debugging Tips:
undefined
reference occurs.Update Mendix and Widgets: Ensure your Mendix application and all custom widgets or third-party widgets are up to date. Sometimes, issues like these are resolved in newer versions of the Mendix platform or the widgets themselves.