mirror of
https://github.com/langgenius/dify-plugin-daemon.git
synced 2026-07-21 17:25:23 -04:00
PluginDaemonBadRequestError when downloading/uploading local plugins on Windows 11(Solved!) #57
Closed
opened 2026-02-16 00:19:27 -05:00 by yindo
·
9 comments
No Branch/Tag Specified
main
build/fix-serverless-runtime-error-propagation
gh-pages
build/test-document2
build/test-document
build/onboarding-ui
build/slim-extract
codex/depot-builds
codex/mac-runner-benchmark
feat/storage-path-prefix
feat/multi-db-user
feat/slim-action
deploy/dev
feat/dify-cli
feat/add-e2e
build/pg-bouncer
codex/add-multimodal-rerank-and-embedding-apis
refactor/local-runtime
build/multimodal-embeddings
codex/refactor-routine.submit-label-handling
codex/refactor-service-layer-based-on-provided-plan
feat/trigger-response
feat/trigger
build/trigger
deploy/trigger-dev
codex/remove-claude-code-reviewer-from-github-ci
codex/add-manifest-check-to-upload-endpoint
feat/no-root-dockerfile
fix/json-schema
fix/blocking-anthorized-langgenius
454-bump-cli-template
build/datasource
feat/datasource
bump-cloud-kit
feat/rag-tag
fix/change-session-not-found-to-400
feat/plugin-readme
add-claude-github-actions-1756274550417
docs/comprehensive-development-documentation
chore/remove-json-schema-validation-error
71cef04
fix/missing-parameter-type
fix/sessions-log
fix/template.env
bump/go-git
build/oauth
feat/oauth-refresh-token
feat/plugin-oauth
feat/tool-oauth-cli
build/plugin-oauth
feat/readme-i18n
fix/memory-leak
feat/icon-dark
feat/default-icon
plugin_launch_concurent
feat/collect-active-requests
feat/dark-icon
feat/support-structured-llm-output
feat/dynamic-selector
fix/reduce-logs
feat/decode-plugin-package
feat/db-extras
fix/backwards-invocation-overflow
feat/length-prefixed-chunking
fix/http-request-reader-header
chore/unify-configurations
fix/hardcoded-serverless-runtime-timeout
fix/cmd
fix/signature
refactor/implement-gen-routes
fix/redis-lock
refactor/codegen
feat/add-authorized-category
chore/style
feat/run-plugin-cli
reduce/run-once
feat/reinstall-serverless-runtime
feat/support-setup-process
fix/apply-stdio-buffer-size
chore/add-warning-messages-to-installed-bucket
feat/repo
enhance/stdio
feat/make-buffer-size-configurable
fix/moderation-init
fix/only-validate-profile-on-quick-mode
feat/support-quick-init-plugins
refactor/oauth-parameters
feat/oauth
refactor/simplify-plugin-invocation
test/integration-test-for-plugins
fix/backwards-compatible-to-llm-result-chunk
feat/auto-scale
enhance/reduce-ci-tests
fix/cli-ci
enhance/removes-llm-result-prompt-messages
fix/disable-benchmark-logs
benchmark/local-runtime
chore/remove-useless-benchmark
feat/benchmark
feat/fetch-app-info
fix/windows-remap-assets
fix/skip-hidden-file
feat/stream-tool-blob-message
fix/path-travel
feat/template-add-ci
enhance/version-compare
feat/sign-apple-os-cli
feat/support-minimal-dify-version-required
refactor/stdip
feat/add-serverless-connector-launching-timeout
fix/remove-prompt_messages-from-llm-result-chunk
feat/standardize-plugin-sdk-versions
chore/update-docs-and-refine-wording
update/readme-cli
fix/infinity-environment-setup
fix/cbor-unmarshaling
fix/use-aws-iam-baseendpoint
fix/lost-query-params-in-endpoint
fix/tiktoken
cohre/update-readme
fix/redis-tests
fix/friendly-identity
fix/marshal-any-map
chore/upgrade-ants
fix/graceful-precompile
enhance/tiktoken
feat/graceful-shutdown
fix/close-serverless-response
fix/correct-cli-guide
fix/plugin-active-log
fix/remove-proxy-args-from-uv
fix/endpoint-hook-url
fix/ci-credentials
feat/disable-gevent
fix/add-gcc
fix/hardcoded-endpoint-timeout
fix/bump-cli-sdk-version
fix/deadloop-when-redis-disconnect
fix/enhence/speed-up-environment-setup
enhance/introduce-uv
fix/change-default-db
fix/deadlock
readme
chore/env.example
feat/add-action-in-url
fix/add-more-pip-args
fix/optimize-local-heartbeat
optimize/db-init
fix/optimize-internal-server-error
fix/increase-default-plugin-max-execution-timeout
fix/force-patch-older-version
enhance/increase-installing-process
LICENSE
fix/set-user-id-to-unrequired
fix/max-launching-concurrent
improve/error-handing-in-serverless
refactor/json-unmarshaler-enhancement
fix/add-pip-mirror-url
enhance/serverless-connector
0.6.5
0.6.4
0.6.3
0.6.2
0.6.1
0.6.0
0.5.9
0.5.8
0.5.7
0.5.6
0.5.5
0.5.4
0.5.3
0.5.2
0.5.1
0.5.0
0.4.1
0.4.0
0.3.3
0.3.2
0.3.1
0.3.0
0.3.0b1
0.2.0
0.1.3
0.1.2
0.1.1
0.1.0
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
0.0.1-beta.23
0.0.1-beta.22
0.0.1-beta.21
0.0.1-beta.20
0.0.1-beta.19
0.0.1-beta.18
0.0.1-beta.17
0.0.1-beta.16
0.0.1-beta.15
0.0.1-beta.14
0.0.1-beta.13
0.0.1-beta.12
0.0.1-beta.11
0.0.1-beta.10
0.0.1-beta.9
0.0.1-beta.8
0.0.1-beta.7
0.0.1-beta.6
0.0.1-beta.5
0.0.1-beta.4
0.0.1-beta.3
0.0.1-beta.2
0.0.1-beta.1
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: langgenius/dify-plugin-daemon#57
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mymian on GitHub (Mar 22, 2025).
Environment:
Operating System: Windows 11
Go Version: 1.24.1
dify-plugin-daemon: latest
dify1.1.1
Steps to Reproduce:
Create a .env file in the cmd/serve directory.
Run the command go run main.go in the terminal.
Successfully start the Dify project locally.
Attempt to download or upload a local plugin.
Expected Result:
The plugin should be downloaded/uploaded successfully without any errors.
Actual Result:
The following error occurs:
PluginDaemonBadRequestError: file not found: icon.svg failed to remap tool icon failed to remap assets failed to save package
Additional Information:
The plugin being downloaded/uploaded does contain the icon.svg file, as verified multiple times.
I'm wondering if there is a way to resolve this issue by modifying the .env file.
Request:
Could you please provide guidance on how to fix this error? Is there a specific configuration in the .env file that might be causing this issue?
@mymian commented on GitHub (Mar 26, 2025):
直接就写中文了。
在win11本地启动运行这个组件的时候踩了不少坑,最主要的问题就是双斜杠\ 识别不了的bug,在代码中找到对应的路径将 \ 改成 / 即可。
比如zip.go 中解压:原代码为 filename = filepath.Join(workingPath, filename) ,报错copy plugin to working directory error: open .git\COMMIT_EDITMSG: file does not exist open .git\COMMIT_EDITMSG: file does not exist extract plugin to working directory error
更改为: filename = strings.Replace(filepath.Join(workingPath, filename), "\", "/", -1) ,解决问题。
下面我提供一下解决的bug顺序,可以参考一下:
运行步骤:
我是在cmd/server目录下运行 go run main.go,启动的程序,.env文件也在该目录下,修改插件存放位置主要还是为了容易排查和管理,关键配置如下:
遇到并解决问题如下,仅供参考:
解决方法:assets.go 文件,添加路径前缀
解决方法:zip.go 文件,func (z *ZipPluginDecoder) ExtractTo(dst string) 方法,里面涉及到路径的 \ 都改成 / 解决。
解决方法: 检查.env中PYTHON_INTERPRETER_PATH的配置是否正确,如果正确,则pip install uv 。
failed to create virtual environment
解决方法: environment_python.go 文件, uvPath := strings.Replace(strings.TrimSpace(string(output)), "\", "/", -1)
failed to find python
解决方法:environment_python.go 文件, pythonPath, err := filepath.Abs(path.Join(p.State.WorkingPath, ".venv/Scripts/python.exe"))
注:在windows里面,venv命令生成的可执行文件在Scripts里面,而且.exe也需要添加进去
解决方法:检查.env中HTTP_PROXY或HTTP_PROXYS配置(我是留空就正常运行了),保证网络正常访问。
以上就是在本地部署dify安装工具时遇到的bug,还有[ERROR]list installed plugins failed: plugin_unique_identifier is not valid 还没解决思路,只不过显示是安装成功了。
@MagicBYang commented on GitHub (Mar 26, 2025):
感谢,解决了部分问题。svg路径那修改加上了"_assets/",但随后又报错:copy plugin to working directory error: open _assets\icon_l_en.svg: file does not exist open _assets\icon_l_en.svg: file does not exist extract plugin to working directory error
不太理解,按理说第一个svg找到了怎么第二个找不到?
@mymian commented on GitHub (Mar 26, 2025):
将 \ 改成 / 试试? 斜杠好多地方识别有问题
@MagicBYang commented on GitHub (Mar 26, 2025):
改完就好了,完全follow你的可行
@Kele2021 commented on GitHub (Mar 26, 2025):
还有[ERROR]list installed plugins failed: plugin_unique_identifier is not valid 还没解决思路
这个也是windows下兼容行的问题,原因是windows不支持含有 : 的文件名,所有写文件不符合预期且为空文件,代码位置在这儿
@Yamcanda commented on GitHub (Apr 4, 2025):
installed_bucket.go 文件调整:
Delete、Exists、Save 一并判断 windows
install_to_local.go 文件调整:
@listeng commented on GitHub (Apr 16, 2025):
大佬可否提交成pr,要不然每次都得改
@lcedaw commented on GitHub (Aug 19, 2025):
@imamiao commented on GitHub (Dec 22, 2025):
使用管理员身份开启CMD