elsa-workflows / elsa-workflows/elsa-studio

"the server responded with a status of 404" when a cron job "hits"

Open
#564 0 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
301
Forks
181
Avg merge
17h 12m
Merged PRs (30d)
42

Description

While testing out Cron I got this here.

Image

```
https://localhost:44366/elsa/api/features/installed/Elsa.RealTimeWorkflowUpdates

:44366/elsa/api/features/installed/Elsa.RealTimeWorkflowUpdates:1 Failed to load resource: the server responded with a status of 404 ()
blazor.webassembly.js:1 (null)
vt @ blazor.webassembly.js:1
blazor.webassembly.js:1 Unhandled Exception:
vt @ blazor.webassembly.js:1
blazor.webassembly.js:1 System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
vt @ blazor.webassembly.js:1
blazor.webassembly.js:1 ---> System.TimeoutException: The operation was canceled.
vt @ blazor.webassembly.js:1
:44366/elsa/api/workflow-instances/83c5406396ef4c5b/journal?skip=0&take=100:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
:44366/elsa/api/activity-execution-summaries/list?WorkflowInstanceId=83c5406396ef4c5b&ActivityNodeId=Workflow1%3A59ce400cc6ed16b6%3A20b514d37075fc4e:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
:44366/elsa/api/workflow-instances/83c5406396ef4c5b/execution-state:1 Failed to load resource: net::ERR_CONNECTION_REFUSED
```

My server logs where `Receiving signal ActivityCompleted on activity 50a1552c6f070cba of type Elsa.Cron`

```
2025-07-10 14:13:00.008 +00:00 [WRN] Attempt to resume workflow 21906750c7eb6097 that is not in the Running state. The actual state is "Finished"
2025-07-10 14:13:00.008 +00:00 [INF] Invoking RunScheduledTask
2025-07-10 14:13:00.008 +00:00 [INF] RunScheduledTask completed with no result
2025-07-10 14:13:00.008 +00:00 [WRN] Attempt to resume workflow 21906750c7eb6097 that is not in the Running state. The actual state is "Finished"
2025-07-10 14:13:00.008 +00:00 [INF] Invoking RunScheduledTask
2025-07-10 14:13:00.008 +00:00 [INF] RunScheduledTask completed with no result
2025-07-10 14:13:00.021 +00:00 [DBG] Scheduled activity 50a1552c6f070cba to resume from bookmark b0ebaa1b6f0fd81e
2025-07-10 14:13:00.021 +00:00 [DBG] Workflow heartbeat interval: "00:03:00"
2025-07-10 14:13:00.026 +00:00 [DBG] Receiving signal ActivityCompleted on activity 50a1552c6f070cba of type Elsa.Cron
2025-07-10 14:13:00.029 +00:00 [DBG] Receiving signal ActivityCompleted on activity 24119417c7400e0a of type Elsa.Flowchart
2025-07-10 14:13:00.035 +00:00 [INF] Request starting HTTP/2 GET https://localhost:44366/elsa/api/activity-execution-summaries/list?WorkflowInstanceId=97a65797efb2c5fd&ActivityNodeId=Workflow1%3A24119417c7400e0a%3A50a1552c6f070cba - null null
2025-07-10 14:13:00.035 +00:00 [INF] CORS policy execution successful.
2025-07-10 14:13:00.035 +00:00 [DBG] The event OpenIddict.Validation.OpenIddictValidationEvents+ProcessRequestContext was successfully processed by OpenIddict.Validation.AspNetCore.OpenIddictValidationAspNetCoreHandlers+ResolveRequestUri.
2025-07-10 14:13:00.035 +00:00 [DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+ResolveRequestUri.
2025-07-10 14:13:00.035 +00:00 [DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+InferEndpointType.
2025-07-10 14:13:00.036 +00:00 [DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by Volo.Abp.Account.Web.Pages.Account.OpenIddictImpersonateInferEndpointType.
2025-07-10 14:13:00.036 +00:00 [DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+ValidateTransportSecurityRequirement.
2025-07-10 14:13:00.036 +00:00 [DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+ValidateHostHeader.
2025-07-10 14:13:00.036 +00:00 [DBG] Routing to Elsa API key authentication for path: /elsa/api/activity-execution-summaries/list
2025-07-10 14:13:00.037 +00:00 [DBG] Processing API key authentication for path: /elsa/api/activity-execution-summaries/list
2025-07-10 14:13:00.037 +00:00 [DBG] API key authentication successful for admin user
2025-07-10 14:13:00.037 +00:00 [DBG] AuthenticationScheme: ElsaApiKey was successfully authenticated.
2025-07-10 14:13:00.037 +00:00 [DBG] Granting access to Elsa endpoint for authenticated user: admin
2025-07-10 14:13:00.037 +00:00 [INF] Executing endpoint 'HTTP: GET /elsa/api/activity-execution-summaries/list'
2025-07-10 14:13:00.039 +00:00 [INF] Executed endpoint 'HTTP: GET /elsa/api/activity-execution-summaries/list'
2025-07-10 14:13:00.039 +00:00 [INF] Request finished HTTP/2 GET https://localhost:44366/elsa/api/activity-execution-summaries/list?WorkflowInstanceId=97a65797efb2c5fd&ActivityNodeId=Workflow1%3A24119417c7400e0a%3A50a1552c6f070cba - 200 null application/json 4.0136ms
2025-07-10 14:13:00.049 +00:00 [DBG] Receiving signal ActivityCompleted on activity Workflow1 of type Elsa.Workflow
2025-07-10 14:13:00.051 +00:00 [DBG] Auto-burning bookmark b0ebaa1b6f0fd81e
2025-07-10 14:13:00.054 +00:00 [DBG] Receiving signal ActivityCompleted on activity 3001d24720fc8353 of type Elsa.WriteLine
2025-07-10 14:13:00.054 +00:00 [DBG] Receiving signal ActivityCompleted on activity 24119417c7400e0a of type Elsa.Flowchart
2025-07-10 14:13:00.056 +00:00 [DBG] Receiving signal ActivityCompleted on activity 24119417c7400e0a of type Elsa.Flowchart
2025-07-10 14:13:00.056 +00:00 [DBG] Receiving signal ActivityCompleted on activity Workflow1 of type Elsa.Workflow
2025-07-10 14:13:00.057 +00:00 [DBG] Receiving signal ActivityCompleted on activity Workflow1 of type Elsa.Workflow
2025-07-10 14:13:00.058 +00:00 [DBG] Receiving signal ActivityCompleted on activity Workflow1 of type Elsa.Workflow
2025-07-10 14:13:00.058 +00:00 [DBG] Auto-burning bookmark b0ebaa1b6f0fd81e
2025-07-10 14:13:00.059 +00:00 [INF] Request starting HTTP/2 GET https://localhost:44366/elsa/api/activity-executions/e5babfdd7239e679 - null null
2025-07-10 14:13:00.059 +00:00 [INF] CORS policy execution successful.
2025-07-10 14:13:00.059 +00:00 [DBG] The event OpenIddict.Validation.OpenIddictValidationEvents+ProcessRequestContext was successfully processed by OpenIddict.Validation.AspNetCore.OpenIddictValidationAspNetCoreHandlers+ResolveRequestUri.
2025-07-10 14:13:00.060 +00:00 [DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+ResolveRequestUri.
2025-07-10 14:13:00.060 +00:00 [DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by OpenIddict.Server.OpenIddictServerHandlers+InferEndpointType.
2025-07-10 14:13:00.060 +00:00 [DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by Volo.Abp.Account.Web.Pages.Account.OpenIddictImpersonateInferEndpointType.
2025-07-10 14:13:00.060 +00:00 [DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+ValidateTransportSecurityRequirement.
2025-07-10 14:13:00.060 +00:00 [DBG] The event OpenIddict.Server.OpenIddictServerEvents+ProcessRequestContext was successfully processed by OpenIddict.Server.AspNetCore.OpenIddictServerAspNetCoreHandlers+ValidateHostHeader.
2025-07-10 14:13:00.061 +00:00 [DBG] Routing to Elsa API key authentication for path: /elsa/api/activity-executions/e5babfdd7239e679
2025-07-10 14:13:00.061 +00:00 [DBG] Processing API key authentication for path: /elsa/api/activity-executions/e5babfdd7239e679
2025-07-10 14:13:00.061 +00:00 [DBG] API key authentication successful for admin user
2025-07-10 14:13:00.061 +00:00 [DBG] AuthenticationScheme: ElsaApiKey was successfully authenticated.
```

The workflow

```json
{"$schema":"https://elsaworkflows.io/schemas/workflow-definition/v3.0.0/schema.json","id":"3bf3b52390de7bc1","definitionId":"936937fd1ce7332c","name":"Timer Workflow","description":"Recurring every 1 minute","createdAt":"2025-07-10T13:15:21.4977828\u002B00:00","version":1,"toolVersion":"3.5.0.0","variables":[],"inputs":[],"outputs":[],"outcomes":[],"customProperties":{},"isReadonly":false,"isSystem":false,"isLatest":true,"isPublished":false,"options":{"autoUpdateConsumingWorkflows":false},"root":{"id":"59ce400cc6ed16b6","nodeId":"Workflow1:59ce400cc6ed16b6","name":"Flowchart1","type":"Elsa.Flowchart","version":1,"customProperties":{"notFoundConnections":[],"canStartWorkflow":false,"runAsynchronously":false,"logPersistenceMode":{"default":"Inherit","inputs":{},"outputs":{}},"logPersistenceConfig":{"default":null,"internalState":null,"inputs":{},"outputs":{}}},"metadata":{},"activities":[{"text":{"typeName":"String","expression":{"type":"Liquid","value":"Timer triggered at {{ \u0027now\u0027 | date: \u0022%Y-%m-%d %H:%M:%S\u0022 }}\r\n"}},"id":"20b514d37075fc4e","nodeId":"Workflow1:59ce400cc6ed16b6:20b514d37075fc4e","name":"WriteLine1","type":"Elsa.WriteLine","version":1,"customProperties":{"canStartWorkflow":false,"runAsynchronously":false},"metadata":{"designer":{"position":{"x":-79.23333740234375,"y":-196.02500915527344},"size":{"width":158.69168090820312,"height":67.04167175292969}}}},{"cronExpression":{"typeName":"String","expression":{"type":"Literal","value":"0 * * * *"}},"id":"9fdd2c34404307c9","nodeId":"Workflow1:59ce400cc6ed16b6:9fdd2c34404307c9","name":"Cron1","type":"Elsa.Cron","version":1,"customProperties":{"canStartWorkflow":true,"runAsynchronously":false,"logPersistenceMode":{"default":"Inherit","inputs":{},"outputs":{}},"logPersistenceConfig":{"default":null,"internalState":null,"inputs":{},"outputs":{}}},"metadata":{"designer":{"position":{"x":-337.23333740234375,"y":-196.02500915527344},"size":{"width":169.0166778564453,"height":67.04167175292969}},"displayText":"Every 1 min"}}],"variables":[],"connections":[{"source":{"activity":"9fdd2c34404307c9","port":"Done"},"target":{"activity":"20b514d37075fc4e","port":"In"},"vertices":[]}]}}
```

And it looks like it kills my Blazor server (locally) when it its.. thats probably the worst part..

Elsa 3.5.0 RC 2/3

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported Elsa.Cron workflow from the supplied JSON and inspect the server logs around ActivityCompleted and RunScheduledTask. Trace the listed /elsa/api endpoints and Blazor client failures to determine where the local server stops responding. Done means the cron run completes without the 404, connection refusals, timeout, or server termination described.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.