elsa-core icon indicating copy to clipboard operation
elsa-core copied to clipboard

Elsa webhooks are not working

Open UrJoaoAvelino opened this issue 2 years ago • 1 comments

Tested on version 2.9.0

How to replicate:

Create a webhook with a path starting with / Add the webhook to a workflow, publish it and try to access it.

Details below: [{"errorMessage":"Workflow faulted at 2022-10-12T20:07:51Z with error: An exception was thrown whilst setting 'HttpEndpoint.Path'. See the inner exception for further details.","exception":{"Type":"Elsa.Exceptions.CannotSetActivityPropertyValueException","Message":"An exception was thrown whilst setting 'HttpEndpoint.Path'. See the inner exception for further details.","StackTrace":" at Elsa.Services.ActivityPropertyProviders.SetNestedActivityPropertiesAsync(Object nestedInstance, ActivityExecutionContext activityExecutionContext, IDictionary2 providers, IActivityPropertyDefaultValueResolver defaultValueResolver, String nestedInstanceName, CancellationToken cancellationToken)\r\n at Elsa.Services.ActivityPropertyProviders.SetActivityPropertiesAsync(IActivity activity, ActivityExecutionContext activityExecutionContext, CancellationToken cancellationToken)\r\n at Elsa.Services.Workflows.ActivityActivator.ActivateActivityAsync(ActivityExecutionContext context, Type type, CancellationToken cancellationToken)\r\n at Elsa.Services.ActivityActivatorExtensions.ActivateActivityAsync[T](IActivityActivator activityActivator, ActivityExecutionContext context, CancellationToken cancellationToken)\r\n at Elsa.Activities.Webhooks.ActivityTypes.WebhookActivityTypeProvider.<>c__DisplayClass7_0.<<CreateWebhookActivityType>g__ActivateActivityAsync|1>d.MoveNext()\r\n--- End of stack trace from previous location ---\r\n at Elsa.Services.Workflows.WorkflowRunner.CanExecuteAsync(WorkflowExecutionContext workflowExecutionContext, IActivityBlueprint activityBlueprint, Boolean resuming, CancellationToken cancellationToken)\r\n at Elsa.Services.Workflows.WorkflowRunner.BeginWorkflow(WorkflowExecutionContext workflowExecutionContext, IActivityBlueprint activity, CancellationToken cancellationToken)","InnerException":{"Type":"System.ArgumentException","Message":"Object of type 'Microsoft.AspNetCore.Http.PathString' cannot be converted to type 'System.String'.","StackTrace":" at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)\r\n at System.RuntimeType.CheckValue(Object value, Binder binder, CultureInfo culture, BindingFlags invokeAttr)\r\n at System.Reflection.MethodBase.CheckArguments(StackAllocedArguments& stackArgs, ReadOnlySpan1 parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)\r\n at System.Reflection.RuntimeMethodInfo.InvokeOneParameter(Object obj, BindingFlags invokeAttr, Binder binder, Object parameter, CultureInfo culture)\r\n at System.Reflection.RuntimePropertyInfo.SetValue(Object obj, Object value, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture)\r\n at System.Reflection.PropertyInfo.SetValue(Object obj, Object value)\r\n at Elsa.Services.ActivityPropertyProviders.SetNestedActivityPropertiesAsync(Object nestedInstance, ActivityExecutionContext activityExecutionContext, IDictionary`2 providers, IActivityPropertyDefaultValueResolver defaultValueResolver, String nestedInstanceName, CancellationToken cancellationToken)","InnerException":null,"Data":{}},"Data":{}},"workflow":{"name":null,"version":21,"instanceId":"7af1487c1875406da041c2ee78c0cb31"}}]

UrJoaoAvelino avatar Oct 14 '22 08:10 UrJoaoAvelino

@jwillmer @constantine-v Are you seeing this too by any chance?

sfmskywalker avatar Oct 14 '22 18:10 sfmskywalker