agent
agent copied to clipboard
TypeError: Cannot read properties of undefined (reading 'Symbol(Symbol.asyncIterator)')
Hi there 👋,
First, thank you for creating this amazing library!
I encountered an error when using the fromTextStream function. Here’s the stack trace:
TypeError: Cannot read properties of undefined (reading 'Symbol(Symbol.asyncIterator)')
at eval (webpack-internal:///(action-browser)/./node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]__svelt_ugsjaykaivjxi2ewh7imf5h4te/node_modules/@statelyai/agent/dist/index.mjs:204:39)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
⨯ unhandledRejection: TypeError: Cannot read properties of undefined (reading 'Symbol(Symbol.asyncIterator)')
at eval (webpack-internal:///(action-browser)/./node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]__svelt_ugsjaykaivjxi2ewh7imf5h4te/node_modules/@statelyai/agent/dist/index.mjs:204:39)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
⨯ unhandledRejection: TypeError: Cannot read properties of undefined (reading 'Symbol(Symbol.asyncIterator)')
at eval (webpack-internal:///(action-browser)/./node_modules/.pnpm/@[email protected][email protected][email protected][email protected][email protected][email protected]__svelt_ugsjaykaivjxi2ewh7imf5h4te/node_modules/@statelyai/agent/dist/index.mjs:204:39)
The error occurs when trying to read Symbol(Symbol.asyncIterator), which appears to be undefined.
Steps to reproduce:
- Launch the Tic-Tac-Toe example.
- Invoke the
gameReporter. - It throws the error mentioned above.
Additionally, I get the same error when using the agent.streamText() method.
What’s interesting is that calling streamText from the vercel 'ai' package works correctly.
Do you have any suggestions on how to resolve this, or is this potentially a bug?
Thanks again for your time and support!
This may be a bug. The latest release is not up-to-date with the latest AI SDK, which may be what is causing problems.
Does it happen all the time?
I identified the issue and have submitted a pull request to resolve it. (Note: this was originally reported using my other account.)