Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Failed to parse final chunk of stream, message: Internal error encountered, status: INTERNAL

PP9
Bronze 1
Bronze 1

Hello community,
I am currently working on a program in VS Code that outputs a summary or something similar for a text that I previously select. I am controlling a model with the API of Vertex AI and passing my prompt to it. My program used to work flawlessly until a few weeks ago, but at some point, I received this error:


rejected promise not handled within 1 second: GoogleGenerativeAIError: [VertexAI.GoogleGenerativeAIError]: Failed to parse final chunk of stream: { "error": { "code": 500, "message": "Internal error encountered.", "status": "INTERNAL" } }
extensionHostProcess.js:148

stack trace: GoogleGenerativeAIError: [VertexAI.GoogleGenerativeAIError]: Failed to parse final chunk of stream: { "error": {"code": 500, "message": "Internal error encountered.", "status": "INTERNAL" } }

and I was advised that the problem lies at this point in the node-modules: "@google-cloud\vertexai\src\functions\post_fetch_processing.ts:133:17 at processTicksAndRejections (node:internal/process/task_queues:95:5)"

It can't really be my code, since I haven't changed it and even use the same text to generate a summary. The only thing I have found out is that it might have to do with the size of the text that I pass to the model. If the text is rather small (about 1,000 tokens) everything still works, but if the text gets bigger (about 27,000 tokens) I get the error.

Can someone help me out?

2 3 1,483
3 REPLIES 3