zapy33
zapy33

Reputation: 1

Error while running Logic Apps (Standard)

I decided to ask here since the Logic Apps team won't answer me on github. Anyways, I have tried to run a logic app locally in VS Code following this guide: Create Single Tenant Workflows Visual Studio Code (I have tried following other guides too) but I always get this same error when I run it:

Job dispatching error: operationName='JobDispatchingWorker.ExecuteTriggerInnerLoop', jobPartition='F106FDA38562443473E3DC4790D974E6:2D08585773452306434462235104894CU00', jobId='08585773234586434462235104894CU00', message='Job dispatching worker unable to execute inner trigger loop.', exception='System.FormatException: Input string was not in a correct format.
  at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type) 
  at System.Convert.ToDouble(String value)
  at Microsoft.Azure.Workflows.Common.Logging.FlowEventSource.JobHistory(String jobPartition, String jobId, String callback, String startTime, String endTime, String executionTimeInMilliseconds, String 
executionDelayInMilliseconds, String executionIntervalInMilliseconds, String executionStatus, String executionMessage, String executionDetails, String nextExecutionTime, String subscriptionId, String correlationId, String principalOid, String principalPuid, String tenantId, String dequeueCount, String advanceVersion, String triggerId, String messageId, String state, String organizationId, String activityVector, String realPuid, String altSecId, String additionalProperties, String jobDurabilityLevel)
at Microsoft.WindowsAzure.ResourceStack.Common.BackgroundJobs.Execution.JobDispatchingWorker.HandleJobExecution(JobTrigger trigger, JobDefinition definition, BackgroundJob backgroundJob, DateTime startTime, DateTime endTime, TimeSpan executionTime, TimeSpan executionDelay, TimeSpan executionInterval, JobExecutionResult executionResult, Boolean executeJobInline)
  at Microsoft.WindowsAzure.ResourceStack.Common.BackgroundJobs.Execution.JobDispatchingWorker.ExecuteJobWithCancellation(JobTrigger trigger, JobDefinition definition, CancellationToken cancellationToken)
  at Microsoft.WindowsAzure.ResourceStack.Common.BackgroundJobs.Execution.JobDispatchingWorker.ExecuteJobWithWatchdog(JobTrigger trigger, JobDefinition definition)
  at Microsoft.WindowsAzure.ResourceStack.Common.BackgroundJobs.Execution.JobDispatchingWorker.ExecuteTriggerInnerLoop(JobTrigger trigger, JobDefinition definition)', correlationId='', organizationId='', activityVector='', additionalProperties='', extensionVersion='1.0.0.0', siteName='UNDEFINED_SITE_NAME', slotName='', activityId='00000000-0000-0000-0000-000000000000'.

The error occurs after

Host lock lease acquired by instance ID '00000000000000000000000051282CB2'

workflow.json (generated by vsc designer):

{
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "Send_an_email_(V2)": {
                "type": "ApiConnection",
                "inputs": {
                    "host": {
                        "connection": {
                            "referenceName": "office365"
                        }
                    },
                    "method": "post",
                    "body": {
                        "To": "[email protected]",
                        "Subject": "@triggerOutputs()?['body']?['name']",
                        "Body": "<p>@{triggerOutputs()?['body']?['name']} has been Updated</p>"
                    },
                    "path": "/v2/Mail"
                },
                "runAfter": {}
            }
        },
        "triggers": {
            "When_a_blob_is_Added_or_Modified_in_Azure_Storage": {
                "type": "ServiceProvider",
                "inputs": {
                    "parameters": {
                        "path": "test/host"
                    },
                    "serviceProviderConfiguration": {
                        "connectionName": "AzureBlob",
                        "operationId": "whenABlobIsAddedOrModified",
                        "serviceProviderId": "/serviceProviders/AzureBlob"
                    }
                }
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {}
    },
    "kind": "Stateless"
}

connections.json

{
  "serviceProviderConnections": {
    "AzureBlob": {
      "parameterValues": {
        "connectionString": "@appsetting('AzureBlob_connectionString')"
      },
      "serviceProvider": {
        "id": "/serviceProviders/AzureBlob"
      },
      "displayName": "sample"
    }
  },
  "managedApiConnections": {
    "office365": {
      "api": {
        "id": "/subscriptions/***/providers/Microsoft.Web/locations/***/managedApis/office365"
      },
      "connection": {
        "id": "/subscriptions/***/resourceGroups/***/providers/Microsoft.Web/connections/office365"
      },
      "connectionRuntimeUrl": "https://***.**.common.logic-***.azure-apihub.net/apim/office365/***/",
      "authentication": {
        "type": "Raw",
        "scheme": "Key",
        "parameter": "@appsetting('office365-connectionKey')"
      }
    }
  }
}

host.json

{
  "version": "2.0",
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows",
    "version": "[1.*, 2.0.0)"
  }
}

local.settings.json

{
  "IsEncrypted": false,
  "Values": {
    "AzureWebJobsStorage": "DefaultEndpointsProtocol=https;AccountName=***;AccountKey=**********",
    "FUNCTIONS_WORKER_RUNTIME": "node",
    "WORKFLOWS_TENANT_ID": "***",
    "WORKFLOWS_SUBSCRIPTION_ID": "***",
    "WORKFLOWS_RESOURCE_GROUP_NAME": "***",
    "WORKFLOWS_LOCATION_NAME": "***",
    "WORKFLOWS_MANAGEMENT_BASE_URI": "https://management.azure.com/",
    "AzureBlob_connectionString": "***********",
    "office365-connectionKey": "**********************************"
    }
}

Upvotes: 0

Views: 3769

Answers (1)

zapy33
zapy33

Reputation: 1

There is nothing wrong with the Logic app itself and the problem lies within Azure Functions Core Tools and my country's way of using commas instead of dots. The problem was that my country uses , (comma) as a decimal separator and not . (dot). This caused the error and by changing my regional setting to the US, it works just fine.

Upvotes: 0

Related Questions