OnClick Navigate Event "Received event for missing view"

I have a flex repeater that dynamically shows a view. In these views I have two clickable buttons. Each button navigates to a page and passes an ID parameter.

I have noticed when I navigate via the navigate action my error log fills up with the following error
'Received event for missing view "Project/Widgets/Machine@C$0:2[0]"

When I do the same thing via a script the error message does not appear.

It's not a big deal to do everything with the script, but I am curious why the error happens with the navigate event.

I don't get that error when I use a Navigation Action, so I highly suspect it's the result of something else. What Events do you have configured within the View being instanced within the Flex Repeater (other than the onClick)?

I have good amount of Bindings and one change script on the that view.
But I have disabled all but the navigation action and still had the same effect.

Some of the key events are a Query Binding, an on Click Binding on the root and an on change for a is_selected parameter.

How my "Widget" works is when a user selects anywhere on the object in the flex repeater it highlights green to show which one is selected. It also has a table object in it that can be expanded to show all the tools loaded to that machine. The Tool Table gets it's data from a SQL binding in a custom property in my "Widget" view.

Change scripts are usually an area to look at, especially if they write to a property during their lifecycle. The script continues to execute on the back-end, but then when it tries to write to a property, that front-end property has vanished. Really though, anything in that View which writes to a property could be the culprit, if the write is part of some event which could still be executing while or after the navigation is performed. You might have a race condition in your View.

  1. User clicks Open Machine link when the widget is not already selected.
  2. Link onClick executes, which begins navigation - the first step of which is to remove the current View.
  3. Widget onClick executes after because the event has to bubble-up.
  4. The Widget onClick attempts to write the highlight color to the Widget, but the Widget no longer exists because the View it lives in is gone.

Thanks I'll do some more digging and check these.

I should be able to disable all my scripts and binding and just turn them on one at a time until I find which one is causing the problem.

Maybe. If it's a race condition, it might not happen every time. Welcome to the frustration of Quality Assurance. I wouldn't worry about plain bindings, but any change scripts, any Events which have Script Actions, and any binding transforms could all be a cause.

1 Like