Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logic App Designer crashes when host run time is unavailable without an actionable message #4743

Open
acornsoft opened this issue May 1, 2024 · 1 comment

Comments

@acornsoft
Copy link

Describe the Bug with repro steps

  1. Existing Workflow created in Designer, ContactsProcessor
  2. Open n Code view (works)
  3. Open in Designer view (does not work)

Created a new Workflow, that uses the same code, ContactsProcessor2 (and ContactsProcessor3)

  1. Copy the CODE from the initial ContactsProcessor
  2. Cut/Paste into the CODE window of ContactsProcessor2
  3. Initially, the Designer is able to open. In Fact, when I do this all the previous one's also work.
  4. Then after a few minutes, they ALL are unable to open in Designer again

What type of Logic App Is this happening in?

Standard (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

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "IncomingMessages": {
                "actions": {
                    "Find_Contact_by_ContactNumber": {
                        "inputs": {
                            "headers": {
                                "accept": "application/json;odata.metadata=full",
                                "organization": "https://wseco-fs-dev.crm.dynamics.com",
                                "prefer": "odata.include-annotations=*"
                            },
                            "host": {
                                "connection": {
                                    "referenceName": "commondataservice"
                                }
                            },
                            "method": "get",
                            "path": "/api/data/v9.1/@{encodeURIComponent(encodeURIComponent('contacts'))}",
                            "queries": {
                                "$filter": "governmentid eq '@{body('Parse_MessageContent')['ContactNumber']}'",
                                "$top": 3
                            }
                        },
                        "runAfter": {
                            "List_rows_(preview)": [
                                "SUCCEEDED"
                            ]
                        },
                        "type": "ApiConnection"
                    },
                    "Found_Contact": {
                        "actions": {
                            "Set_CurrentContact": {
                                "inputs": {
                                    "name": "CurrentContact",
                                    "value": "@first(body('Find_Contact_by_ContactNumber')?['value'])"
                                },
                                "runAfter": {
                                    "Set_CurrentContactId": [
                                        "SUCCEEDED"
                                    ]
                                },
                                "type": "SetVariable"
                            },
                            "Set_CurrentContactId": {
                                "inputs": {
                                    "name": "CurrentContactId",
                                    "value": "@{body('Find_Contact_by_ContactNumber')?['value'][0]['contactid']}"
                                },
                                "type": "SetVariable"
                            },
                            "Update_Existing_Contact": {
                                "inputs": {
                                    "body": {
                                        "description": "UPDATE FLOW",
                                        "emailaddress1": "@{body('Parse_MessageContent')['PrimaryEmail']}",
                                        "firstname": "@{body('Parse_MessageContent')['FirstName']}",
                                        "governmentid": "@{body('Parse_MessageContent')['ContactNumber']}",
                                        "jobtitle": "@{body('Parse_MessageContent')['JobTitle']}",
                                        "lastname": "@{body('Parse_MessageContent')['LastName']}",
                                        "mobilephone": "@{body('Parse_MessageContent')['PrimaryMobile']}",
                                        "telephone1": "@{body('Parse_MessageContent')['PrimaryPhone']}",
                                        "ws_axcontactnumber": "@{body('Parse_MessageContent')['ContactNumber']}"
                                    },
                                    "headers": {
                                        "accept": "application/json;odata.metadata=full",
                                        "organization": "https://wseco-fs-dev.crm.dynamics.com",
                                        "prefer": "return=representation,odata.include-annotations=*"
                                    },
                                    "host": {
                                        "connection": {
                                            "referenceName": "commondataservice"
                                        }
                                    },
                                    "method": "patch",
                                    "path": "/api/data/v9.1/@{encodeURIComponent(encodeURIComponent('contacts'))}(@{encodeURIComponent(encodeURIComponent(variables('CurrentContactId')))})"
                                },
                                "runAfter": {
                                    "Set_CurrentContact": [
                                        "SUCCEEDED"
                                    ]
                                },
                                "type": "ApiConnection"
                            }
                        },
                        "else": {
                            "actions": {
                                "Add_Contact_to_Field_Service": {
                                    "description": "We add the new Contact",
                                    "inputs": {
                                        "body": {
                                            "description": "ADD FLOW",
                                            "emailaddress1": "@{body('Parse_MessageContent')['PrimaryEmail']}",
                                            "firstname": "@{body('Parse_MessageContent')['FirstName']}",
                                            "governmentid": "@{body('Parse_MessageContent')['ContactNumber']}",
                                            "jobtitle": "@{body('Parse_MessageContent')['JobTitle']}",
                                            "lastname": "@{body('Parse_MessageContent')['LastName']}",
                                            "mobilephone": "@{body('Parse_MessageContent')['PrimaryMobile']}",
                                            "telephone1": "@{body('Parse_MessageContent')['PrimaryPhone']}",
                                            "ws_axcontactnumber": "@{body('Parse_MessageContent')['ContactNumber']}"
                                        },
                                        "headers": {
                                            "organization": "https://wseco-fs-dev.crm.dynamics.com",
                                            "prefer": "return=representation,odata.include-annotations=*"
                                        },
                                        "host": {
                                            "connection": {
                                                "referenceName": "commondataservice"
                                            }
                                        },
                                        "method": "post",
                                        "path": "/api/data/v9.1/@{encodeURIComponent(encodeURIComponent('contacts'))}"
                                    },
                                    "type": "ApiConnection"
                                },
                                "Set_CurrentContactId__": {
                                    "inputs": {
                                        "name": "CurrentContactId",
                                        "value": "@body('Add_Contact_to_Field_Service')?['contactid']"
                                    },
                                    "runAfter": {
                                        "Add_Contact_to_Field_Service": [
                                            "SUCCEEDED"
                                        ]
                                    },
                                    "type": "SetVariable"
                                }
                            }
                        },
                        "expression": {
                            "and": [
                                {
                                    "greaterOrEquals": [
                                        "@length(body('Find_Contact_by_ContactNumber')?['value'])",
                                        1
                                    ]
                                }
                            ]
                        },
                        "runAfter": {
                            "Find_Contact_by_ContactNumber": [
                                "SUCCEEDED"
                            ]
                        },
                        "type": "If"
                    },
                    "List_rows_(preview)": {
                        "inputs": {
                            "headers": {
                                "accept": "application/json;odata.metadata=full",
                                "organization": "https://wseco-fs-dev.crm.dynamics.com",
                                "prefer": "odata.include-annotations=*"
                            },
                            "host": {
                                "connection": {
                                    "referenceName": "commondataservice"
                                }
                            },
                            "method": "get",
                            "path": "/api/data/v9.1/@{encodeURIComponent(encodeURIComponent('contacts'))}",
                            "queries": {
                                "$top": 3
                            }
                        },
                        "runAfter": {
                            "Parse_MessageContent": [
                                "SUCCEEDED"
                            ]
                        },
                        "type": "ApiConnection"
                    },
                    "Parse_MessageContent": {
                        "inputs": {
                            "content": "@item()?['contentData']",
                            "schema": {
                                "oneOf": [
                                    {
                                        "properties": {
                                            "AccountNumber": {
                                                "type": "string"
                                            },
                                            "ContactNumber": {
                                                "type": "string"
                                            },
                                            "FirstName": {
                                                "type": "string"
                                            },
                                            "JobTitle": {
                                                "type": "string"
                                            },
                                            "LastName": {
                                                "type": "string"
                                            },
                                            "ModifiedByEmail": {
                                                "type": "string"
                                            },
                                            "PrimaryEmail": {
                                                "type": "string"
                                            },
                                            "PrimaryMobile": {
                                                "type": "string"
                                            },
                                            "PrimaryPhone": {
                                                "type": "string"
                                            }
                                        },
                                        "required": [
                                            "ContactNumber"
                                        ]
                                    },
                                    {
                                        "properties": {
                                            "contacts": {
                                                "items": {
                                                    "properties": {
                                                        "AccountNumber": {
                                                            "type": "string"
                                                        },
                                                        "ContactNumber": {
                                                            "type": "string"
                                                        },
                                                        "FirstName": {
                                                            "type": "string"
                                                        },
                                                        "JobTitle": {
                                                            "type": "string"
                                                        },
                                                        "LastName": {
                                                            "type": "string"
                                                        },
                                                        "ModifiedByEmail": {
                                                            "type": "string"
                                                        },
                                                        "PrimaryEmail": {
                                                            "type": "string"
                                                        },
                                                        "PrimaryMobile": {
                                                            "type": "string"
                                                        },
                                                        "PrimaryPhone": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "ContactNumber"
                                                    ],
                                                    "type": "object"
                                                },
                                                "type": "array"
                                            }
                                        },
                                        "required": [
                                            "contacts"
                                        ],
                                        "type": "object"
                                    }
                                ],
                                "type": "object"
                            }
                        },
                        "runAfter": {
                            "item()[ContentData]": [
                                "SUCCEEDED"
                            ]
                        },
                        "type": "ParseJson"
                    },
                    "item()[ContentData]": {
                        "inputs": {
                            "name": "MessageBodyContent",
                            "value": "@{item()?['contentData']}"
                        },
                        "type": "SetVariable"
                    }
                },
                "foreach": "@triggerOutputs()?['body']",
                "runAfter": {
                    "item()": [
                        "SUCCEEDED"
                    ]
                },
                "type": "foreach"
            },
            "Initialize_AppVersion": {
                "inputs": {
                    "variables": [
                        {
                            "name": "AppVersion",
                            "type": "string",
                            "value": "@{parameters('Version')}"
                        }
                    ]
                },
                "runAfter": {},
                "type": "InitializeVariable"
            },
            "Initialize_CurrentContact": {
                "inputs": {
                    "variables": [
                        {
                            "name": "CurrentContact",
                            "type": "object",
                            "value": {}
                        }
                    ]
                },
                "runAfter": {
                    "Initialize_AppVersion": [
                        "SUCCEEDED"
                    ]
                },
                "type": "InitializeVariable"
            },
            "Initialize_CurrentContactId": {
                "inputs": {
                    "variables": [
                        {
                            "name": "CurrentContactId",
                            "type": "string"
                        }
                    ]
                },
                "runAfter": {
                    "Initialize_CurrentContact": [
                        "SUCCEEDED"
                    ]
                },
                "type": "InitializeVariable"
            },
            "Initialize_MessageArray": {
                "inputs": {
                    "variables": [
                        {
                            "name": "MessageArray",
                            "type": "array",
                            "value": []
                        }
                    ]
                },
                "runAfter": {
                    "Initialize_CurrentContactId": [
                        "SUCCEEDED"
                    ]
                },
                "type": "InitializeVariable"
            },
            "Initialize_MessageBody": {
                "inputs": {
                    "variables": [
                        {
                            "name": "MessageBody",
                            "type": "object",
                            "value": {}
                        }
                    ]
                },
                "runAfter": {
                    "Initialize_MessageArray": [
                        "SUCCEEDED"
                    ]
                },
                "type": "InitializeVariable"
            },
            "Initialize_MessageBodyContent": {
                "inputs": {
                    "variables": [
                        {
                            "name": "MessageBodyContent",
                            "type": "string"
                        }
                    ]
                },
                "runAfter": {
                    "Initialize_MessageBody": [
                        "SUCCEEDED"
                    ]
                },
                "type": "InitializeVariable"
            },
            "Initialize_MessageHeader": {
                "inputs": {
                    "variables": [
                        {
                            "name": "MessageDetails",
                            "type": "object",
                            "value": {}
                        }
                    ]
                },
                "runAfter": {
                    "Initialize_MessageBodyContent": [
                        "SUCCEEDED"
                    ]
                },
                "type": "InitializeVariable"
            },
            "Initialize_Workflow": {
                "inputs": {
                    "variables": [
                        {
                            "name": "Workflow",
                            "type": "object",
                            "value": "@workflow()"
                        }
                    ]
                },
                "runAfter": {
                    "Initialize_MessageHeader": [
                        "SUCCEEDED"
                    ]
                },
                "type": "InitializeVariable"
            },
            "Initialize_WorkflowId": {
                "inputs": {
                    "variables": [
                        {
                            "name": "WorkflowId",
                            "type": "string",
                            "value": "@{workflow()['run']['name']}"
                        }
                    ]
                },
                "runAfter": {
                    "Initialize_Workflow": [
                        "SUCCEEDED"
                    ]
                },
                "type": "InitializeVariable"
            },
            "Initialize_WorkflowName": {
                "inputs": {
                    "variables": [
                        {
                            "name": "WorkflowName",
                            "type": "string",
                            "value": "@{workflow()['name']}"
                        }
                    ]
                },
                "runAfter": {
                    "Initialize_WorkflowId": [
                        "SUCCEEDED"
                    ]
                },
                "type": "InitializeVariable"
            },
            "Initialize_WorkflowRun": {
                "inputs": {
                    "variables": [
                        {
                            "name": "WorkflowRun",
                            "type": "object",
                            "value": "@workflow()['run']"
                        }
                    ]
                },
                "runAfter": {
                    "Initialize_WorkflowName": [
                        "SUCCEEDED"
                    ]
                },
                "type": "InitializeVariable"
            },
            "item()": {
                "inputs": {
                    "name": "MessageDetails",
                    "value": "@item()"
                },
                "runAfter": {
                    "triggerBody()": [
                        "SUCCEEDED"
                    ]
                },
                "type": "SetVariable"
            },
            "triggerBody()": {
                "inputs": {
                    "name": "MessageArray",
                    "value": "@triggerBody()"
                },
                "runAfter": {
                    "Initialize_WorkflowRun": [
                        "SUCCEEDED"
                    ]
                },
                "type": "SetVariable"
            }
        },
        "contentVersion": "2024.4.22.1",
        "outputs": {},
        "triggers": {
            "New_Contact_Messages_Arrived_(sbts-contacts)": {
                "inputs": {
                    "parameters": {
                        "isSessionsEnabled": false,
                        "subscriptionName": "sbts-contacts",
                        "topicName": "sbt-standard"
                    },
                    "serviceProviderConfiguration": {
                        "connectionName": "serviceBus-1",
                        "operationId": "receiveTopicMessages",
                        "serviceProviderId": "/serviceProviders/serviceBus"
                    }
                },
                "type": "ServiceProvider"
            }
        }
    },
    "kind": "Stateful"
}

Screenshots or Videos

NotWorking-001
Working-001

Browser

Microsoft Edge

Additional context

Workflow id: /subscriptions/1496fbb4-bd46-4c76-9d8c-51e9d0df9324/resourceGroups/rg-wseco-ce-field-services-dev-westus-001/providers/Microsoft.Web/sites/logic-wseco-processors-westus-001/workflows/ContactsProcessor
Azure portal session id: 78cf6b0dfaa846d6bf2bab2b79089bae
Logic App designer session id: undefined
Logic App designer instance id: N/A
Timestamp: Wed, 01 May 2024 13:45:58 GMT

@hartra344
Copy link
Contributor

Looking at our logs of the errors you’re getting. It looks like your runtime is failing to start. Keeping this bug because we should provide better messaging in this case but for the runtime failure, I’d advise opening a support case

@hartra344 hartra344 changed the title Logic App Designer not working Logic App Designer crashes when host run time is unavailable without an actionable message May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants