Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local Plugin Upgrade Fails Due to Unintended Marketplace Download Attempt #14276

Open
5 tasks done
hzcoolwind opened this issue Feb 24, 2025 · 1 comment
Open
5 tasks done
Labels
🐞 bug Something isn't working

Comments

@hzcoolwind
Copy link

Self Checks

  • 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 (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.0.0-beta

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Install a locally developed plugin (v0.0.3) via WEB
  2. Attempt to upgrade the locally developed plugin to v0.0.4 via WEB
  3. Observe unexpected behavior.

✔️ Expected Behavior

Plugin upgrades locally without contacting remote marketplace.

❌ Actual Behavior

Upgrade fails with WARNING/ERROR:

INFO [Dummy-767] [_client.py:1038] - HTTP Request: GET https://marketplace-plugin.dify.dev/api/v1/plugins/download?unique_identifier=xxxx/yyyyyy:0.0.4@000a41ad19ca549159..... "HTTP/1.1 500 Internal Server Error"

WARNING [Dummy-767] [ssrf_proxy.py:63] - Received status code 500 for URL
https://marketplace-plugin.dify.dev/api/v1/plugins/download?unique_identifier=xxxx/yyyyyy0.0.4@000a41ad... which is in the force list

@dosubot dosubot bot added the 🐞 bug Something isn't working label Feb 24, 2025
Copy link

dosubot bot commented Feb 24, 2025

The issue you're experiencing, where a local plugin upgrade attempts to contact the marketplace, might be related to how Dify differentiates between local and marketplace plugins. Dify uses different methods for upgrading plugins based on their source. For local plugins, it should use the install_from_local_pkg method, which relies on the PluginInstallationSource.Package source type, while marketplace plugins use the PluginInstallationSource.Marketplace source type [1].

To address this issue, you might want to check the following:

  1. Plugin Source Configuration: Ensure that the plugin is correctly identified as a local plugin. Verify that the configuration settings, such as MARKETPLACE_ENABLED and MARKETPLACE_API_URL, are set appropriately in your environment to prevent unintended marketplace interactions [2].

  2. Upgrade Logic: Review the logic in your upgrade process to ensure that it correctly identifies and handles local plugins without attempting to fetch updates from the marketplace. This might involve checking the conditions under which the HTTP request to the marketplace is triggered and ensuring they are not met for local plugins [3].

If the issue persists, it might be helpful to look into the specific conditions or configurations that could inadvertently trigger a marketplace check during a local plugin upgrade.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@crazywoola crazywoola added this to the 1.0.0 Marketplace milestone Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants