Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When asked to describe an attachment image i get error: failed to pipe response #457

Open
sunny0183 opened this issue Oct 25, 2024 · 0 comments

Comments

@sunny0183
Copy link

This is after project upgraded to Next 15 and React 19rc

In a chat when a document (image or pdf) is uploaded and asked to describe it, it responses with good description and looks like it finished streaming responding but then at the end of the response it throws the error.

the error happens at the api/chat/route.ts at the return result.toDataStreamResponse({});

the error is

Internal error: Error: failed to pipe response
at pipeToNodeResponse (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\pipe-readable.js:126:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async sendResponse (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\send-response.js:53:13)
at async doRender (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\base-server.js:1523:25)
at async responseGenerator (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\base-server.js:1834:28)
at async DevServer.renderToResponseWithComponentsImpl (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\base-server.js:1878:28)
at async DevServer.renderPageComponent (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\base-server.js:2292:24)
at async DevServer.renderToResponseImpl (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\base-server.js:2330:32)
at async DevServer.pipeImpl (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\base-server.js:984:25)
at async NextNodeServer.handleCatchallRenderRequest (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\next-server.js:281:17)
at async DevServer.handleRequestImpl (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\base-server.js:877:17)
at async C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\dev\next-dev-server.js:373:20
at async Span.traceAsyncFn (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\trace\trace.js:157:20)
at async DevServer.handleRequest (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\dev\next-dev-server.js:370:24)
at async invokeRender (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\lib\router-server.js:183:21)
at async handleRequest (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\lib\router-server.js:360:24)
at async requestHandlerImpl (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\lib\router-server.js:384:13)
at async Server.requestListener (C:\Dev\projects\ai-chatbot\node_modules.pnpm\next@15.0.1_@opentelemetry[email protected][email protected][email protected]_se5l25zy3tomv3kmj2ezfnnzg4\node_modules\next\dist\server\lib\start-server.js:142:13)
Cause: TypeError: terminated
at Fetch.onAborted (node:internal/deps/undici/undici:10473:53)
at Fetch.emit (node:events:519:28)
at Fetch.terminate (node:internal/deps/undici/undici:9641:14)
at Object.onError (node:internal/deps/undici/undici:10587:38)
at Request.onError (node:internal/deps/undici/undici:6381:31)
at Object.errorRequest (node:internal/deps/undici/undici:1063:17)
at TLSSocket. (node:internal/deps/undici/undici:7639:16)
at TLSSocket.emit (node:events:531:35)
at node:net:338:12
at TCP.done (node:_tls_wrap:657:7)
at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
[cause]: Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:218:20)
at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -4077,
code: 'ECONNRESET',
syscall: 'read'
}
}
POST /api/chat 500 in 6165ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant