context cancel quickly #249

Open
opened 2026-02-16 01:15:07 -05:00 by yindo · 0 comments
Owner

Originally created by @fatelei on GitHub (Feb 13, 2026).

Self Checks

To make sure we get to you in time, please check the following :)

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • "Please do not modify this template :) and fill in all the required fields."

Versions

  1. dify-plugin-daemon Version
  2. dify-api Version

Describe the bug

  1. install plugin
  2. execute cmd.Start context cancelled
2026-02-13T10:10:51.239306Z INFO dify-plugin-daemon setup_python_environment.go:377 detected dependency file plugin=langgenius/gemini:0.7.7 file=pyproject.toml
2026-02-13T10:10:51.239499Z INFO dify-plugin-daemon setup_python_environment.go:153 installing plugin dependencies plugin=langgenius/gemini:0.7.7 method="uv sync" file=pyproject.toml
2026-02-13T10:10:51.239603Z ERROR dify-plugin-daemon logger.go:24 local runtime start failed plugin=langgenius/gemini:0.7.7@e12c712679171e20bacf59cd12e88efe8c2a508450cd23ce8424a91dc29353db error="failed to install dependencies: failed to start command: context canceled\nfailed to init environment"
github.com/langgenius/dify-plugin-daemon/internal/core/control_panel.(*StandardLogger).OnLocalRuntimeStartFailed
	/Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/internal/core/control_panel/logger.go:24
github.com/langgenius/dify-plugin-daemon/internal/core/control_panel.(*ControlPanel).LaunchLocalPlugin.func6
	/Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/internal/core/control_panel/launcher_local.go:101
github.com/langgenius/dify-plugin-daemon/internal/core/control_panel.(*ControlPanel).WalkNotifiers
	/Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/internal/core/control_panel/notifier.go:20
github.com/langgenius/dify-plugin-daemon/internal/core/control_panel.(*ControlPanel).LaunchLocalPlugin
	/Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/internal/core/control_panel/launcher_local.go:100
github.com/langgenius/dify-plugin-daemon/internal/core/plugin_manager.(*PluginManager).installLocal.func1
	/Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/internal/core/plugin_manager/installer.go:323
github.com/langgenius/dify-plugin-daemon/pkg/utils/routine.Submit.func1.1
	/Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/pkg/utils/routine/pool.go:68
github.com/langgenius/dify-plugin-daemon/pkg/utils/routine.Submit.func1
	/Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/pkg/utils/routine/pool.go:58
github.com/panjf2000/ants/v2.(*goWorker).run.func1
	/Users/fatelei/go/pkg/mod/github.com/panjf2000/ants/v2@v2.10.0/worker.~o:71

the code

baseCtx, parent := p.startSpan("python.install_deps", attribute.String("plugin.identity", p.Config.Identity()))
defer parent.End()
ctx, cancel := context.WithTimeout(baseCtx, 10*time.Minute)
defer cancel()

it has 10 min to timeout, but it cancell quickly

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Originally created by @fatelei on GitHub (Feb 13, 2026). **Self Checks** To make sure we get to you in time, please check the following :) - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify-plugin-daemon/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] "Please do not modify this template :) and fill in all the required fields." **Versions** 1. dify-plugin-daemon Version 2. dify-api Version **Describe the bug** 1. install plugin 2. execute cmd.Start context cancelled ``` 2026-02-13T10:10:51.239306Z INFO dify-plugin-daemon setup_python_environment.go:377 detected dependency file plugin=langgenius/gemini:0.7.7 file=pyproject.toml 2026-02-13T10:10:51.239499Z INFO dify-plugin-daemon setup_python_environment.go:153 installing plugin dependencies plugin=langgenius/gemini:0.7.7 method="uv sync" file=pyproject.toml 2026-02-13T10:10:51.239603Z ERROR dify-plugin-daemon logger.go:24 local runtime start failed plugin=langgenius/gemini:0.7.7@e12c712679171e20bacf59cd12e88efe8c2a508450cd23ce8424a91dc29353db error="failed to install dependencies: failed to start command: context canceled\nfailed to init environment" github.com/langgenius/dify-plugin-daemon/internal/core/control_panel.(*StandardLogger).OnLocalRuntimeStartFailed /Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/internal/core/control_panel/logger.go:24 github.com/langgenius/dify-plugin-daemon/internal/core/control_panel.(*ControlPanel).LaunchLocalPlugin.func6 /Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/internal/core/control_panel/launcher_local.go:101 github.com/langgenius/dify-plugin-daemon/internal/core/control_panel.(*ControlPanel).WalkNotifiers /Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/internal/core/control_panel/notifier.go:20 github.com/langgenius/dify-plugin-daemon/internal/core/control_panel.(*ControlPanel).LaunchLocalPlugin /Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/internal/core/control_panel/launcher_local.go:100 github.com/langgenius/dify-plugin-daemon/internal/core/plugin_manager.(*PluginManager).installLocal.func1 /Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/internal/core/plugin_manager/installer.go:323 github.com/langgenius/dify-plugin-daemon/pkg/utils/routine.Submit.func1.1 /Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/pkg/utils/routine/pool.go:68 github.com/langgenius/dify-plugin-daemon/pkg/utils/routine.Submit.func1 /Users/fatelei/go/src/github.com/fatelei/dify-plugin-daemon/pkg/utils/routine/pool.go:58 github.com/panjf2000/ants/v2.(*goWorker).run.func1 /Users/fatelei/go/pkg/mod/github.com/panjf2000/ants/v2@v2.10.0/worker.~o:71 ``` the code ``` baseCtx, parent := p.startSpan("python.install_deps", attribute.String("plugin.identity", p.Config.Identity())) defer parent.End() ctx, cancel := context.WithTimeout(baseCtx, 10*time.Minute) defer cancel() ``` it has 10 min to timeout, but it cancell quickly **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here.
yindo added the cmdplugin-daemonbug labels 2026-02-16 01:15:07 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#249