Self Checks
RAGFlow workspace code commit ID
NA
RAGFlow image version
RAGFlow v0.26.1
Other environment information
Actual behavior
Observed Behavior:
Conversation crashes during execution
Likely triggered when Switch Flow changes path dynamically
One of the component IDs (cpn_id) resolves to None or missing in self.components
Description:
While interacting with an Agent that uses a Switch Flow connector, the conversation fails with a runtime exception. The error appears to occur during execution of the agent canvas when iterating through components.
Error Log:
2026-06-18 14:00:55,461 ERROR 49 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/ragflow/api/apps/restful_apis/agent_api.py", line 269, in sse
async for ans in canvas.run(**run_kwargs):
...<19 lines>...
yield "data:" + json.dumps(ans, ensure_ascii=False) + "\n\n"
File "/ragflow/agent/canvas.py", line 641, in run
if any([self.get_component_obj(c).component_name.lower() == "userfillup" for c in self.path[idx:]]):
~~~~~~~~~~~~~~~~~~~~~~^^^
File "/ragflow/agent/canvas.py", line 157, in get_component_obj
return self.components.get(cpn_id)["obj"]
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
TypeError: 'NoneType' object is not subscriptable
@dosu - FYI.
Expected behavior
- Agent should handle missing or invalid components gracefully
- Switch Flow should not produce broken component references
Steps to reproduce
Create Agent with Switch Flow connector
Configure multiple branches
Start conversation
Trigger a branch condition that leads to missing component
Observe crash
Additional information
No response
Self Checks
RAGFlow workspace code commit ID
NA
RAGFlow image version
RAGFlow v0.26.1
Other environment information
Actual behavior
Observed Behavior:
Conversation crashes during execution
Likely triggered when Switch Flow changes path dynamically
One of the component IDs (cpn_id) resolves to None or missing in self.components
Description:
While interacting with an Agent that uses a Switch Flow connector, the conversation fails with a runtime exception. The error appears to occur during execution of the agent canvas when iterating through components.
Error Log:
2026-06-18 14:00:55,461 ERROR 49 'NoneType' object is not subscriptable
Traceback (most recent call last):
File "/ragflow/api/apps/restful_apis/agent_api.py", line 269, in sse
async for ans in canvas.run(**run_kwargs):
...<19 lines>...
yield "data:" + json.dumps(ans, ensure_ascii=False) + "\n\n"
File "/ragflow/agent/canvas.py", line 641, in run
if any([self.get_component_obj(c).component_name.lower() == "userfillup" for c in self.path[idx:]]):
~~~~~~~~~~~~~~~~~~~~~~^^^
File "/ragflow/agent/canvas.py", line 157, in get_component_obj
return self.components.get(cpn_id)["obj"]
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
TypeError: 'NoneType' object is not subscriptable
@dosu - FYI.
Expected behavior
Steps to reproduce
Additional information
No response