Skip to content

phone_state not found error. Portal is enabled as a11y tree. Same issue with and without tcp transport #175

Description

@Timo972

09:50:30 ERROR: ❌ Error during DroidAgent execution: Error in step 'handle_llm_input': Path 'phone_state' not found in state

09:50:30 ERROR: Traceback (most recent call last):

File "/Users/timo/Development/work/droidrun/droidrun-task-api/.venv/lib/python3.11/site-packages/workflows/events.py", line 95, in getattr

return self._data[__name]
       ~~~~~~~~~~^^^^^^^^

KeyError: 'phone_state'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/Users/timo/Development/work/droidrun/droidrun-task-api/.venv/lib/python3.11/site-packages/workflows/context/state_store.py", line 213, in get

value = self._traverse_step(value, segment)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/timo/Development/work/droidrun/droidrun-task-api/.venv/lib/python3.11/site-packages/workflows/context/state_store.py", line 268, in _traverse_step

return getattr(obj, segment)
       ^^^^^^^^^^^^^^^^^^^^^

File "/Users/timo/Development/work/droidrun/droidrun-task-api/.venv/lib/python3.11/site-packages/workflows/events.py", line 97, in getattr

raise AttributeError(

AttributeError: 'DictState' object has no attribute 'phone_state'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/Users/timo/Development/work/droidrun/droidrun-task-api/.venv/lib/python3.11/site-packages/workflows/context/context.py", line 689, in _step_worker

new_ev = await instrumented_step(**kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/timo/Development/work/droidrun/droidrun-task-api/.venv/lib/python3.11/site-packages/llama_index_instrumentation/dispatcher.py", line 368, in async_wrapper

result = await func(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/timo/Development/work/droidrun/droidrun-task-api/droidrun/droidrun/agent/planner/planner_agent.py", line 151, in handle_llm_input

response = await self._get_llm_response(ctx, chat_history)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/timo/Development/work/droidrun/droidrun-task-api/droidrun/droidrun/agent/planner/planner_agent.py", line 304, in _get_llm_response

raise e

File "/Users/timo/Development/work/droidrun/droidrun-task-api/droidrun/droidrun/agent/planner/planner_agent.py", line 286, in _get_llm_response

chat_history = await chat_utils.add_phone_state_block(await ctx.get("phone_state"), chat_history)
                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/timo/Development/work/droidrun/droidrun-task-api/.venv/lib/python3.11/site-packages/workflows/context/context.py", line 353, in get

return await self.store.get(key, default=default)
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/Users/timo/Development/work/droidrun/droidrun-task-api/.venv/lib/python3.11/site-packages/workflows/context/state_store.py", line 219, in get

raise ValueError(msg)

ValueError: Path 'phone_state' not found in state

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

File "/Users/timo/Development/work/droidrun/droidrun-task-api/droidrun/droidrun/agent/droid/droid_agent.py", line 375, in handle_reasoning_logic

result = await handler
         ^^^^^^^^^^^^^

File "/Users/timo/Development/work/droidrun/droidrun-task-api/.venv/lib/python3.11/site-packages/workflows/workflow.py", line 416, in _run_workflow

raise exception_raised

File "/Users/timo/Development/work/droidrun/droidrun-task-api/.venv/lib/python3.11/site-packages/workflows/context/context.py", line 698, in _step_worker

raise WorkflowRuntimeError(

workflows.errors.WorkflowRuntimeError: Error in step 'handle_llm_input': Path 'phone_state' not found in state

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions