Azure / LogicAppsUX

https://learn.microsoft.com/azure/logic-apps
MIT License
77 stars 83 forks source link

Designer crashes when naming a Compose action "toString" #4087

Closed jaimereyesmx closed 8 months ago

jaimereyesmx commented 9 months ago

Describe the Bug with repro steps

  1. Create a flow in Azure logic apps with any trigger and a Compose action
  2. Save the flow to validate this works properly.

image

  1. Rename the Compose action to "toString"

image

  1. Click Save
  2. Navigate away and then try to open the flow to see the crash

image

What type of Logic App Is this happening in?

Consumption (Portal)

Are you using new designer or old designer

New Designer

Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg

Yes

Workflow JSON

No response

Screenshots or Videos

No response

Browser

Edge

Additional context

No response

hartra344 commented 9 months ago

@rllyy97 can you take a look at this tomorrow? Designer crashes are hard GA stoppers

rllyy97 commented 9 months ago

The issue appears to be that naming a node like toString is causing a lot of property overlap all over the project. Since prototype functions can still be referenced by bracket notation (which we use all over the app to get our node record data), asking for any toString node data is returning the toString function instead.

The proper way around this is to check records with Object.hasOwn before using bracket notation to grab the data, but that would be a huge amount of reference changes on every record. For now the easiest option would be to check the name during renaming and just have prototype functions declared as invalid values, or append a whitespace character so it appears the same but references correctly.