Plugin Daemon returns an empty response to POST requests to dispatch_event from the API. #205

Closed
opened 2026-02-16 00:20:29 -05:00 by yindo · 2 comments
Owner

Originally created by @kurokobo on GitHub (Nov 2, 2025).

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: 0.4.0-local
  2. dify-api Version: 1.10.0-rc.1

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy 1.10.0-rc.1 of Dify
  2. Install Gmail Trigger pluign
  3. Configure plugin
  4. Send new mail to configured Gmail account

Expected behavior

  • New event is dispatched and proceeding workflow is triggered.
  • No error logs in API container.

Screenshots

Errors in API container:

2025-11-02 13:50:18.362 INFO [Dummy-151] [_client.py:1038] - HTTP Request: GET http://plugin_daemon:5002/plugin/8164d574-75c4-4182-9886-8017be5d6f72/management/trigger?provider=gmail_trigger&plugin_id=langgenius%2Fgmail_trigger "HTTP/1.1 200 OK"
2025-11-02 13:50:18.620 INFO [Dummy-151] [_client.py:1038] - HTTP Request: POST http://plugin_daemon:5002/plugin/8164d574-75c4-4182-9886-8017be5d6f72/dispatch/trigger/dispatch_event "HTTP/1.1 200 OK"
2025-11-02 13:50:18.624 ERROR [Dummy-151] [trigger.py:40] - Endpoint processing failed for {endpoint_id}: {e}
Traceback (most recent call last):
  File "/app/api/core/plugin/impl/base.py", line 258, in _request_with_plugin_daemon_response_stream
    rep = PluginDaemonBasicResponse[type_].model_validate_json(line)  # type: ignore
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/.venv/lib/python3.12/site-packages/pydantic/main.py", line 746, in model_validate_json
    return cls.__pydantic_validator__.validate_json(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for PluginDaemonBasicResponse[TriggerDispatchResponse]
data.response
  Value error, Failed to deserialize response from hex string [type=value_error, input_value='', input_type=str]
    For further information visit https://errors.pydantic.dev/2.11/v/value_error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/api/controllers/trigger/trigger.py", line 32, in trigger_endpoint
    response = handler(endpoint_id, request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/services/trigger/trigger_service.py", line 105, in process_endpoint
    dispatch_response: TriggerDispatchResponse = controller.dispatch(
                                                 ^^^^^^^^^^^^^^^^^^^^
  File "/app/api/core/trigger/provider.py", line 288, in dispatch
    response: TriggerDispatchResponse = manager.dispatch_event(
                                        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/core/plugin/impl/trigger.py", line 189, in dispatch_event
    for resp in response:
                ^^^^^^^^
  File "/app/api/core/plugin/impl/base.py", line 268, in _request_with_plugin_daemon_response_stream
    raise ValueError(line_data.get("error", line))
ValueError: {"code":0,"message":"success","data":{"user_id":"","events":["gmail_message_added","gmail_label_removed"],"response":""}}

Additional context

On the API side, during reading a response as a TriggerDispatchResponse type, it seems that convert_response fails to deserialize the HEX string because the response from the plugin daemon is an empty string.

However, this issue does not occur when running the plugin with remote debugging.
When running the Gmail Trigger plugin with remote debugging, events are dispatched correctly, and I can confirm that proceeding workflow successfully triggered.
This problem only happens when the plugin is installed using the usual procedure.

This is the screen when the trigger works correctly during remote debugging.
Image

Originally created by @kurokobo on GitHub (Nov 2, 2025). **Self Checks** To make sure we get to you in time, please check the following :) - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify-plugin-daemon/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] "Please do not modify this template :) and fill in all the required fields." **Versions** 1. dify-plugin-daemon Version: **0.4.0-local** 2. dify-api Version: **1.10.0-rc.1** **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Deploy 1.10.0-rc.1 of Dify 2. Install Gmail Trigger pluign - Apply this PR https://github.com/langgenius/dify-plugin-sdks/pull/233 first, - Then package `gmail_trigger` plugin and install it 3. Configure plugin 4. Send new mail to configured Gmail account **Expected behavior** - New event is dispatched and proceeding workflow is triggered. - No error logs in API container. **Screenshots** Errors in API container: ```bash 2025-11-02 13:50:18.362 INFO [Dummy-151] [_client.py:1038] - HTTP Request: GET http://plugin_daemon:5002/plugin/8164d574-75c4-4182-9886-8017be5d6f72/management/trigger?provider=gmail_trigger&plugin_id=langgenius%2Fgmail_trigger "HTTP/1.1 200 OK" 2025-11-02 13:50:18.620 INFO [Dummy-151] [_client.py:1038] - HTTP Request: POST http://plugin_daemon:5002/plugin/8164d574-75c4-4182-9886-8017be5d6f72/dispatch/trigger/dispatch_event "HTTP/1.1 200 OK" 2025-11-02 13:50:18.624 ERROR [Dummy-151] [trigger.py:40] - Endpoint processing failed for {endpoint_id}: {e} Traceback (most recent call last): File "/app/api/core/plugin/impl/base.py", line 258, in _request_with_plugin_daemon_response_stream rep = PluginDaemonBasicResponse[type_].model_validate_json(line) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/.venv/lib/python3.12/site-packages/pydantic/main.py", line 746, in model_validate_json return cls.__pydantic_validator__.validate_json( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pydantic_core._pydantic_core.ValidationError: 1 validation error for PluginDaemonBasicResponse[TriggerDispatchResponse] data.response Value error, Failed to deserialize response from hex string [type=value_error, input_value='', input_type=str] For further information visit https://errors.pydantic.dev/2.11/v/value_error During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/app/api/controllers/trigger/trigger.py", line 32, in trigger_endpoint response = handler(endpoint_id, request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/services/trigger/trigger_service.py", line 105, in process_endpoint dispatch_response: TriggerDispatchResponse = controller.dispatch( ^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/trigger/provider.py", line 288, in dispatch response: TriggerDispatchResponse = manager.dispatch_event( ^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/plugin/impl/trigger.py", line 189, in dispatch_event for resp in response: ^^^^^^^^ File "/app/api/core/plugin/impl/base.py", line 268, in _request_with_plugin_daemon_response_stream raise ValueError(line_data.get("error", line)) ValueError: {"code":0,"message":"success","data":{"user_id":"","events":["gmail_message_added","gmail_label_removed"],"response":""}} ``` **Additional context** On the API side, during reading a response as a `TriggerDispatchResponse` type, it seems that `convert_response` fails to deserialize the HEX string because the response from the plugin daemon is an empty string. However, this issue **does not occur when running the plugin with remote debugging**. When running the Gmail Trigger plugin with remote debugging, events are dispatched correctly, and I can confirm that proceeding workflow successfully triggered. This problem only happens when the plugin is installed using the usual procedure. This is the screen when the trigger works correctly during remote debugging. <img width="613" height="992" alt="Image" src="https://github.com/user-attachments/assets/d299becc-d190-41e7-af40-245191514521" />
yindo closed this issue 2026-02-16 00:20:29 -05:00
Author
Owner

@kurokobo commented on GitHub (Nov 2, 2025):

@Mairuis @Yeuoly @Stream29
I'm not completely sure that the cause of this issue is the plugin daemon, but since it seems more likely to be a problem with the daemon rather than the SDK or API, I'm opening this issue in this repository.

I haven't tried other trigger plugins yet, so I don't know if this is gmail-trigger-related issue or not.

Do you have any idea what might be causing this?

@kurokobo commented on GitHub (Nov 2, 2025): @Mairuis @Yeuoly @Stream29 I'm not completely sure that the cause of this issue is the plugin daemon, but since it seems more likely to be a problem with the daemon rather than the SDK or API, I'm opening this issue in this repository. I haven't tried other trigger plugins yet, so I don't know if this is gmail-trigger-related issue or not. Do you have any idea what might be causing this?
Author
Owner

@kurokobo commented on GitHub (Nov 2, 2025):

@Mairuis @Yeuoly @Stream29
Ah sorry, my bad, bumping SDK version for Gmail trigger plugin solves the issue!
Closing this issue and update my PR! Thanks!

@kurokobo commented on GitHub (Nov 2, 2025): @Mairuis @Yeuoly @Stream29 Ah sorry, my bad, bumping SDK version for Gmail trigger plugin solves the issue! Closing this issue and update my PR! Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#205