dify icon indicating copy to clipboard operation
dify copied to clipboard

Local Plugin Upgrade Fails Due to Unintended Marketplace Download Attempt

Open hzcoolwind opened this issue 10 months ago • 1 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] 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

hzcoolwind avatar Feb 24 '25 14:02 hzcoolwind

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

dosubot[bot] avatar Feb 24 '25 15:02 dosubot[bot]