-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
Self Checks
- I have read the Contributing Guide and Language Policy.
- This is only for bug report, if you would like to ask a question, please head to Discussions.
- I have searched for existing issues search for existing issues, including closed ones.
- I confirm that I am using English to submit this report, otherwise it will be closed.
- 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
- Please do not modify this template :) and fill in all the required fields.
Dify version
main branch (latest)
Cloud or Self Hosted
Self Hosted (Source)
Steps to reproduce
- Create a new workflow
- Add a Tool node (or DataSource node, or TriggerPlugin node) that uses a plugin
- Uninstall the plugin from Plugins page (or import a workflow that contains nodes using plugins you don't have installed)
- Go back to the workflow - the node shows a locked overlay with "Install from Marketplace" button (this is correct)
- Click "Publish" button
- The workflow is published successfully (this is the bug)
- Try to run the published workflow
- The workflow fails with
ToolProviderNotFoundErrorat runtime
✔️ Expected Behavior
When a workflow contains nodes with uninstalled plugins, the publish operation should be blocked. The checklist panel should display these nodes as having errors (like "Plugin is not installed"), preventing the user from publishing an invalid workflow.
❌ Actual Behavior
The workflow can be published even when it contains nodes with uninstalled plugins. The frontend checkValid function returns no error because the tool schema is empty when the plugin is not installed, causing all validation to be skipped. The checklist panel does not show any warning for these nodes.
The workflow only fails at runtime when trying to execute, which is a poor user experience as the user has already published the workflow.
Root cause analysis:
getToolCheckParamsinweb/app/components/workflow/utils/tool.tsreturns emptyformSchemaswhen the plugin is not installed (sincecurrCollectionandcurrToolare both undefined)checkValidin node'sdefault.tsvalidates required fields against the schema, but since the schema is empty, no validation errors are reported- The checklist (
useChecklisthook) does not check for_pluginInstallLockedstatus on plugin-dependent nodes handleCheckBeforePublishalso does not check for this status
This issue affects three node types:
- Tool nodes
- DataSource nodes
- TriggerPlugin nodes