Skip to content

Inconsistent plugin_id format between remote plugin listing and installation causes plugin detail page Internal Server Error #730

Description

@donnyzxt

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: main
  2. dify-api Version: 1.14.0

Describe the bug
There is an inconsistency in plugin_id generation/usage for remote debugging plugins:

  • In listing/query logic, plugin_id is derived from plugin_unique_identifier.PluginID().
  • For remote runtime, RemotePluginRuntime.Identity() rewrites author to tenant_id, so plugin_unique_identifier becomes ${tenant_id}/${plugin_name}:..., and plugin_id becomes ${tenant_id}/${plugin_name}.
  • During remote installation, curd.InstallPlugin forcibly overrides remote plugin_id to ${declaration.author}/${declaration.name}.

This creates a mismatch between:

  • what list/query APIs return (${tenant_id}/${plugin_name}),
  • and what installation-related tables store (${author_name}/${plugin_name}).

As a result, when clicking a plugin in the plugin page (which uses returned plugin_id for follow-up queries), backend lookup can fail and UI shows server internal error.

To Reproduce
Steps to reproduce the behavior:

  1. Enable remote plugin installing/debugging mode.
  2. Connect a remote debugging plugin with declaration.author != tenant_id.
  3. Open plugin list page and observe returned plugin_id (tenant-based form like ${tenant_id}/${plugin_name}).
  4. Click this plugin to open detail/config page.
  5. See error (server internal error) due to plugin_id mismatch in subsequent queries.

Expected behavior
plugin_id should be consistent across:

  • listing APIs,
  • installation records,
  • and detail/follow-up query APIs.

Remote plugins should use one canonical plugin_id format end-to-end (either tenant-based or declaration-author-based), without rewriting to a different format in another layer.

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

Additional context
Potentially relevant code paths:

  • internal/core/debugging_runtime/type.go
    RemotePluginRuntime.Identity() rewrites config.Author = tenantId, producing tenant-based identifier/plugin_id.
  • internal/service/manage_plugin.go
    ListPlugins() returns PluginID: pluginUniqueIdentifier.PluginID().
  • internal/types/models/curd/atomic.go
    InstallPlugin() for remote explicitly overrides pluginID = declaration.Author + "/" + declaration.Name.
  • internal/service/install_service/controlpanel.go
    remote connect path triggers install via InstallListener.OnDebuggingRuntimeConnected().

The mismatch appears after introducing remote plugin_id override in install flow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions