Skip to content

plugin Connection Fails After Upgrading Dify from 1.8.x to 1.9.1 #476

@xinkuang

Description

@xinkuang

Issue Report

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (I have read and agree with the Language Policy).
  • [FOR CHINESE USERS] I understand that issues submitted in Chinese will be closed. Thank you! :)
  • Please do not modify this template :) and fill in all the required fields.

Versions

  1. dify-plugin-daemon Version: 0.4.5 (also tested with 0.5.0)
  2. dify-api Version: 1.9.1 (upgraded from 1.8.x)

Describe the bug

After upgrading Dify from version 1.8.x to 1.9.1, a previously working custom plugin can no longer establish a proper connection with the plugin daemon.

Inside the docker-plugin_daemon-1 container, running pip show dify_plugin returns:

Version: 0.4.5

Attempts to upgrade the plugin SDK from 0.4.5 to 0.5.0 result in the same error.

To Reproduce

  1. Upgrade Dify from 1.8.x to 1.9.1
  2. Start the plugin daemon container
  3. Launch a custom plugin that worked before the upgrade
  4. Observe connection errors in the logs

Expected behavior

The plugin should connect successfully to the daemon and operate as it did under Dify 1.8.x.

Logs

environment_python.go:363: [ERROR] failed to get the version of the plugin sdk: failed to find the version of the plugin sdk

INFO:dify_plugin.plugin:Installed agent: mcp_agent
ERROR:dify_plugin.core.server.tcp.request_reader:Failed to read data from localhost:5003
Traceback (most recent call last):
  File "D:\anaconda3\Lib\site-packages\dify_plugin\core\server\tcp\request_reader.py", line 169, in _read_stream
    raise Exception("Connection is closed")
Exception: Connection is closed

Additional context

  • The plugin functioned correctly under Dify 1.8.x.
  • The issue occurs immediately after upgrading to Dify 1.9.1.
  • Both dify-plugin-sdk versions 0.4.5 and 0.5.0 produce identical errors.
  • The error suggests the daemon fails to detect or communicate with the plugin SDK properly, possibly due to a compatibility or initialization issue introduced in 1.9.1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions