Skip to content

[Bug]: 企业微信+langbot+Dify:启用插件系统时Markdowm2ing插件处理Dify知识库Markdown格式图片信息超时,ActionCallTimeoutError导致消息无法发送 #1848

@6mvp6

Description

@6mvp6

Runtime environment

v4.6.2, Ubuntu 24.04 x64 Python 3.12.7, Docker version 27.5.1

Exception

主要问题:

  1. 使用Markdowm2ing插件时,处理Dify知识库返回的Markdown图片格式时出现ActionCallTimeoutError
  2. Dify知识库返回的图片链接存在签名时效性问题,直接在浏览器打开时返回404错误

详细错误日志:

[12-05 18:16:54.596] pipelinemgr.py (253) - [ERROR] : Error processing query 0 stage=ResponseWrapper : ActionCallError: ActionCallTimeoutError: Action emit_event call timed out
[12-05 18:16:54.602] pipelinemgr.py (254) - [ERROR] : Traceback: Traceback (most recent call last):
  File "/app/.venv/lib/python3.12/site-packages/langbot_plugin/runtime/io/handler.py", line 175, in call_action
    raise ActionCallError(f"{response.message}")
langbot_plugin.entities.io.errors.ActionCallError: ActionCallTimeoutError: Action emit_event call timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/src/langbot/pkg/pipeline/pipelinemgr.py", line 250, in process_query
    await self._execute_from_stage(0, query)
  File "/app/src/langbot/pkg/pipeline/pipelinemgr.py", line 217, in _execute_from_stage
    await self._execute_from_stage(i + 1, query)
  File "/app/src/langbot/pkg/pipeline/pipelinemgr.py", line 206, in _execute_from_stage
    async for sub_result in result:
  File "/app/src/langbot/pkg/pipeline/wrapper/wrapper.py", line 77, in process
    event_ctx = await self.ap.plugin_connector.emit_event(event, bound_plugins)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/langbot/pkg/plugin/connector.py", line 405, in emit_event
    event_ctx_result = await self.handler.emit_event(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/langbot/pkg/plugin/handler.py", line 560, in emit_event
    result = await self.call_action(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/langbot_plugin/runtime/io/handler.py", line 180, in call_action
    raise ActionCallError(f"{e.__class__.__name__}: {str(e)}")
langbot_plugin.entities.io.errors.ActionCallError: ActionCallError: ActionCallTimeoutError: Action emit_event call timed out

补充现象:

  • 在浏览器直接打开Dify知识库返回的Markdown图片链接时,返回:
  {"code":"not_found","message":"File not found or signature is invalid","status":404}
  • 在Langbot流水线对话调试中:
    • 关闭所有插件时:Dify知识库的Markdown格式图片信息正确渲染
    • 开启所有插件时(包括添加或不添加Markdowm2ing插件,只点击开启按钮):同样报ActionCallTimeoutError错误

Reproduction steps

环境配置:

  1. Dify和Langbot部署在同一台 Ubuntu 服务器上,均使用Docker容器运行
    2 已安装playwright和chromium依赖:
    • 执行了 playwright install chromium
    • 安装了Markdowm2ing插件的requirements.txt依赖

重现步骤:

  1. 企业微信机器人配置:

    • 机器人通过Langbot调用Dify智能体
    • Dify知识库中包含Markdown格式的图片:![image](https://域名:端口/files/xxx/file-preview?timestamp=xxx&nonce=xxx&sign=xxx)
  2. 加载Markdowm2ing插件并在扩展集成启用插件开关:
    a. 在Langbot插件市场安装并启用Markdowm2ing插件
    b. 企业微信用户提问,触发Dify知识库回复包含Markdown图片
    c. Langbot处理时出现ActionCallTimeoutError

[12-06 09:46:30.290] pipelinemgr.py (253) - [ERROR] : Error processing query 4 stage=ResponseWrapper : ActionCallError: ActionCallTimeoutError: Action emit_event call timed out
[12-06 09:46:30.293] pipelinemgr.py (254) - [ERROR] : Traceback: Traceback (most recent call last):
  File "/app/.venv/lib/python3.12/site-packages/langbot_plugin/runtime/io/handler.py", line 175, in call_action
    raise ActionCallError(f"{response.message}")
langbot_plugin.entities.io.errors.ActionCallError: ActionCallTimeoutError: Action emit_event call timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/src/langbot/pkg/pipeline/pipelinemgr.py", line 250, in process_query
    await self._execute_from_stage(0, query)
  File "/app/src/langbot/pkg/pipeline/pipelinemgr.py", line 217, in _execute_from_stage
    await self._execute_from_stage(i + 1, query)
  File "/app/src/langbot/pkg/pipeline/pipelinemgr.py", line 206, in _execute_from_stage
    async for sub_result in result:
  File "/app/src/langbot/pkg/pipeline/wrapper/wrapper.py", line 77, in process
    event_ctx = await self.ap.plugin_connector.emit_event(event, bound_plugins)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/langbot/pkg/plugin/connector.py", line 405, in emit_event
    event_ctx_result = await self.handler.emit_event(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/langbot/pkg/plugin/handler.py", line 560, in emit_event
    result = await self.call_action(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/langbot_plugin/runtime/io/handler.py", line 180, in call_action
    raise ActionCallError(f"{e.__class__.__name__}: {str(e)}")
langbot_plugin.entities.io.errors.ActionCallError: ActionCallError: ActionCallTimeoutError: Action emit_event call timed out
  1. 不加载任何插件但在扩展集成启用插件开关:
    a. 在Langbot流水线-插件集成中,启用"启用所有插件"开关
    b. 不启用任何具体插件(包括不启用Markdowm2ing)
    c. 同样出现ActionCallTimeoutError错误
[12-06 09:43:31.317] pipelinemgr.py (253) - [ERROR] : Error processing query 3 stage=ResponseWrapper : ActionCallError: ActionCallTimeoutError: Action emit_event call timed out
[12-06 09:43:31.321] pipelinemgr.py (254) - [ERROR] : Traceback: Traceback (most recent call last):
  File "/app/.venv/lib/python3.12/site-packages/langbot_plugin/runtime/io/handler.py", line 175, in call_action
    raise ActionCallError(f"{response.message}")
langbot_plugin.entities.io.errors.ActionCallError: ActionCallTimeoutError: Action emit_event call timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/app/src/langbot/pkg/pipeline/pipelinemgr.py", line 250, in process_query
    await self._execute_from_stage(0, query)
  File "/app/src/langbot/pkg/pipeline/pipelinemgr.py", line 217, in _execute_from_stage
    await self._execute_from_stage(i + 1, query)
  File "/app/src/langbot/pkg/pipeline/pipelinemgr.py", line 206, in _execute_from_stage
    async for sub_result in result:
  File "/app/src/langbot/pkg/pipeline/wrapper/wrapper.py", line 77, in process
    event_ctx = await self.ap.plugin_connector.emit_event(event, bound_plugins)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/langbot/pkg/plugin/connector.py", line 405, in emit_event
    event_ctx_result = await self.handler.emit_event(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/src/langbot/pkg/plugin/handler.py", line 560, in emit_event
    result = await self.call_action(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/.venv/lib/python3.12/site-packages/langbot_plugin/runtime/io/handler.py", line 180, in call_action
    raise ActionCallError(f"{e.__class__.__name__}: {str(e)}")
langbot_plugin.entities.io.errors.ActionCallError: ActionCallError: ActionCallTimeoutError: Action emit_event call timed out

docker restart langbot 时日志启动时警告信息:
[12-06 09:53:44.633] longtext.py (50) - [WARNING] : Font file not found, and system font cannot be used, switch to forward message component to send long messages, you can adjust the related settings in the configuration file.
  1. 完全在扩展集成关闭插件开关:
    a. 在Langbot流水线-插件集成中,关闭"启用所有插件"开关
    b. 返回Dify知识库的Markdown格式图片信息:![image](https://域名:端口/files/xxx/file-preview?timestamp=xxx&nonce=xxx&sign=xxx)

  2. 签名验证问题:
    a. 从Dify知识库获取的图片链接,直接在浏览器打开时返回404
    b. 错误信息:{"code":"not_found","message":"File not found or signature is invalid","status":404}

关键观察:问题不仅出现在Markdowm2ing插件,而是整个插件系统启用时都会出现ActionCallTimeoutError

Enabled plugins

插件状态配置:

  1. MarkDown2ing插件:

docker环境库

docker exec langbot pip list
Package            Version
------------------ ---------------
aiofiles           25.1.0
annotated-types    0.7.0
anyio              4.12.0
certifi            2025.11.12
charset-normalizer 3.4.4
dotenv             0.9.9
greenlet           3.3.0
h11                0.16.0
html2image         2.0.7
httpcore           1.0.9
httpx              0.28.1
idna               3.11
iniconfig          2.3.0
Jinja2             3.1.6
langbot-plugin     0.2.0
linkify-it-py      2.0.3
Markdown           3.10
markdown-it-py     4.0.0
MarkupSafe         3.0.3
mdit-py-plugins    0.5.0
mdurl              0.1.2
packaging          25.0
pip                25.3
platformdirs       4.5.1
playwright         1.56.0
pluggy             1.6.0
pydantic           2.12.5
pydantic_core      2.41.5
pydantic-settings  2.12.0
pyee               13.0.0
Pygments           2.19.2
pymdown-extensions 10.17.2
pytest             9.0.1
python-dotenv      1.2.1
PyYAML             6.0.3
requests           2.32.5
rich               14.2.0
textual            6.7.1
types-aiofiles     25.1.0.20251011
types-PyYAML       6.0.12.20250915
typing_extensions  4.15.0
typing-inspection  0.4.2
uc-micro-py        1.0.3
urllib3            2.5.0
uv                 0.9.15
watchdog           6.0.0
websocket-client   1.9.0
websockets         15.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    External Plugin插件问题或新增插件 / Issues on plugin itselfIM: wecom企业微信 适配器相关 / WeCom and WeComCS adapter relatedbug?Bug或Bug修复相关 / maybe a bugm: Plugins插件加载及管理模块 / Plugins loading and management

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions