Appfarm crashes when selecting first in data source after upgrading to 108

After deploying to version 108, one of our actions have started crashing appfarm:
image

The action node that causes the error is a Set Selection, and is set up like this:
Screenshot 2024-10-15 083721

The data source we are selecting from looks fine before the action node runs:

And the error from the console:

I see now the selection might not be the problem - as the error occurs during “Open Dialog”.

I’m not sure what info is relevant to help debug this, but I know it worked before our recent deploy and that the only change was the Appfarm version.

Hi!

It looks like you’re correct in that the console error occurs during “Open Dialog” and not the selection itself. I have tried to recreate a similar process in my environment, setting selection in a database connected data source and then opening a dialog, but I am unable to recreate this error.

Could you provide some more details about the contents of the dialog that is opened, or other processes earlier in the same action, which may affect “getSelectedObjects”? It helps us a lot when we can recreate errors when we send them to our Dev team to investigate :blush:

Thanks!
Rhys
Appfarm

Hi Rhys,

I’ve located the error, which was in a text component function.
image

The data source Automatic Control Results (Current Project) had been changed from single cardinality to multi-cardinality, which made the function break down.

Looking back at this function param, I’m unsure what exactly is the behavior of using “selected objects” on a multi-cardinality reference of another object :thinking: Does it return the Issues of the selected Automatic Control Result? I don’t think it’s possible to select objects in a multi-cardinality reference?

Although as far as I can tell, there’s not been any edits to either this data source.

My hunch is that Automatic Control Results (Current Project) has lost it’s connection/relation to the data source.

Hi,

With this additional information, I’m able to recreate the same error message. It looks like it’s possible from the frontend to choose the selected objects of a multi-cardinality reference as a function parameter, but this causes Create to crash. I believe, as you said, that it shouldn’t be possible to select objects within a multi-cardinality reference (and it isn’t possible to do so from the “Select Objects” action node) so I will pass this on to our Devs as a bug. Perhaps “selected objects” should just not be visible in the dropdown menu in this case.

In the meantime, maybe a “filtered selection” here would work better instead of “selected objects”? I am unsure of the goal of the function, but perhaps similar behaviour can be recreated using a filter in the function param instead.

Rhys

Thanks, yeah I found a workaround by switching to a slightly different app logic.