WebApp re-triggers a duplicate full workflow run after Human Input resume, causing 'Stopped by user'
- Dominant language
- TypeScript
- Stars
- 156k
- Forks
- 24.6k
- Avg merge
- 20h 50m
- Merged PRs (30d)
- 586
Description
### Self Checks
- [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542).
- [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general).
- [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones.
- [x] I confirm that I am using English to submit this report, otherwise it will be closed.
- [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- [x] Please do not modify this template :) and fill in all the required fields.
### Dify version
1.16.0
### Cloud or Self Hosted
Self Hosted (Docker)
### Steps to reproduce
### Self Checks
- [x] I have searched for existing issues, including closed ones.
- [x] I confirm that I am using English to submit this report.
- [x] Please do not modify this template :) and fill in all the required fields.
### Dify version
1.16.0
### Cloud or Self Hosted
Self Hosted (Docker Compose)
### Steps to reproduce
1. Create a Workflow app with: Start (one text-input variable `test`) → Human Input node (webapp delivery, `form_content: '{{#start.test#}}'`, single action button `action_1`) → Template Transform node (`template: '{{ rendered }}'`, referencing the Human Input node's `__rendered_content` output) → End.
2. Publish the app.
3. Open the published WebApp, fill in the `test` input, run the workflow.
4. When the workflow pauses at the Human Input node and the form is displayed, click the action button once.
### Worker log evidence
The first execution (`workflow_run_id=5eea261a-ba8f-4b9e-947a-3ea0b52094a2`) pauses, receives the button click, and resumes/completes successfully:
09:01:36.437 workflow_based_app_execution_task received (workflow_run_id='5eea261a-ba8f-4b9e-947a-3ea0b52094a2', invoke_from=WEB_APP)
09:01:36.493 Created workflow pause 019fa7f5-436d-7799-b310-903d03e26d94 for workflow run 5eea261a-ba8f-4b9e-947a-3ea0b52094a2
09:01:41.348 Task resume_app_execution received <-- user clicked the action button
09:01:41.360 Resumed workflow pause 019fa7f5-436d-7799-b310-903d03e26d94 for workflow run 5eea261a-ba8f-4b9e-947a-3ea0b52094a2
09:01:41.372 Deleted workflow pause 019fa7f5-436d-7799-b310-903d03e26d94 for workflow run 5eea261a-ba8f-4b9e-947a-3ea0b52094a2
09:01:41.380 Task resume_app_execution succeeded
09:01:41.442 HTTP Request: POST http://sandbox:8194/v1/sandbox/run "HTTP/1.1 200 OK" <-- Template Transform node ran fine
### ✔️ Expected Behavior
The workflow resumes from the Human Input node, runs the Template Transform node, and the End node outputs the rendered form content. The UI should show a successful result.
### ❌ Actual Behavior
The UI shows a red error banner: `Stopped by user.` on the workflow, and the Human Input node shows a warning icon, even though (per the `worker` logs) the workflow actually resumed and completed successfully the first time.
[test.yml](https://github.com/user-attachments/files/30455498/test.yml)
Contributor guide
Research direction
Reproduce the published WebApp workflow from the issue steps using test.yml, then trace the Human Input action through the named resume_app_execution task and the worker log sequence. Compare the successful resumed workflow with the UI's stopped state and duplicate run; done means one click produces one completed run and a successful UI result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, typescript
- Domain
- backend, full-stack
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100