You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ui] Rust UI Simulation: Error Handling in API Message Processing: Cannot read properties of undefined and Invalid state: Controller is already closed
#160
Closed
will-break-it opened this issue
Jan 22, 2025
· 2 comments
While running the UI web app with the latest from main, an error occurs during the processing of messages in the API. The error logs indicate issues with undefined properties and invalid state management in the message processing logic.
Additional Information
The issue occurs in the src/app/api/messages/batch/utils.ts and src/app/api/messages/batch/route.ts files.
The error impacts the /api/messages/batch endpoint.
Stacktrace
⨯ Error: failed to pipe response
at pipeToNodeResponse (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/pipe-readable.ts:144:10)
at async sendResponse (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/send-response.ts:69:6)
at async doRender (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/base-server.ts:2618:12)
at async responseGenerator (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/base-server.ts:3066:21)
at async DevServer.renderToResponseWithComponentsImpl (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/base-server.ts:3121:23)
at async DevServer.renderPageComponent (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/base-server.ts:3676:15)
at async DevServer.renderToResponseImpl (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/base-server.ts:3738:23)
at async DevServer.pipeImpl (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/base-server.ts:1738:20)
at async NextNodeServer.handleCatchallRenderRequest (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/next-server.ts:1032:6)
at async DevServer.handleRequestImpl (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/base-server.ts:1498:8)
at async (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/dev/next-dev-server.ts:514:13)
at async Span.traceAsyncFn (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/trace/trace.ts:143:13)
at async DevServer.handleRequest (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/dev/next-dev-server.ts:512:19)
at async invokeRender (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/lib/router-server.ts:284:10)
at async handleRequest (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/lib/router-server.ts:530:15)
at async requestHandlerImpl (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/lib/router-server.ts:576:6)
at async Server.requestListener (file:///Users/will/Workspace/io/ouroboros-leios/ui/node_modules/next/src/server/lib/start-server.ts:146:6) {
[cause]: TypeError: Cannot read properties of undefined (reading 'toString')
at processMessage (turbopack://[project]/src/app/api/messages/batch/utils.ts:130:20)
at Timeout._onTimeout (turbopack://[project]/src/app/api/messages/batch/route.ts:156:29)
128 | incrementNodeAggregationData(
129 | aggregatedData.nodes,
> 130 | message.id.id.toString(),
| ^
131 | "votesGenerated",
132 | );
133 | } else if (message.type === EMessageType.VotesSent) {
}
The text was updated successfully, but these errors were encountered:
There had been a bug in the format of the VotesGenerated message, which I accidentally fixed yesterday while switching to human-readable IDs (I hadn't noticed the bug or the fix). Updated the UI to depend on the data format we intended to send.
Description
While running the UI web app with the latest from
main
, an error occurs during the processing of messages in the API. The error logs indicate issues with undefined properties and invalid state management in the message processing logic.Additional Information
The issue occurs in the src/app/api/messages/batch/utils.ts and src/app/api/messages/batch/route.ts files.
The error impacts the /api/messages/batch endpoint.
Stacktrace
The text was updated successfully, but these errors were encountered: