Skip to content

TypeError: Cannot read properties of undefined (reading 'find') for MESSAGES_SNAPSHOT #688

@danciudev

Description

@danciudev

TanStack AI version

"@tanstack/ai": 0.26.1 "@tanstack/ai-client": 0.16.1 "@tanstack/ai-react": 0.15.1

Framework/Library version

"@tanstack/ai": 0.26.1 "@tanstack/ai-client": 0.16.1 "@tanstack/ai-react": 0.15.1

Describe the bug and the steps to reproduce it

An exception occurs when I receive a message of type MESSAGES_SNAPSHOT

data: {"type":"TEXT_MESSAGE_END","messageId":"30c8bcf9-8691-4a08-ac7e-05553cc32fd1"}

data: {"type":"MESSAGES_SNAPSHOT","messages":[{"id":"msg-1780386991166-22zrq","role":"user","content":"...","content":"Could you clarify what you want changed in this DataApp?"}]}

data: {"type":"RUN_FINISHED","threadId":"resp_015228a4252ea0b2006a1e8cb0728481939ad10b5ff635cb0b","runId":"resp_015228a4252ea0b2006a1e8cb0728481939ad10b5ff635cb0b"}

Fail with this error

Image Image

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

None

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions