question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: 13 INTERNAL: Received RST_STREAM with code 2

See original GitHub issue

Yo, I’ve been having this random error lately, and I have no idea why.

Error: 13 INTERNAL: Received RST_STREAM with code 2

details: ‘Received RST_STREAM with code 2’, metadata: Metadata { internalRepr: Map {}, options: {} }, note: 'Exception occurred in retry method that was not classified as transient

Code:

const vision = require('@google-cloud/vision');
const client = new vision.ImageAnnotatorClient({projectId: "...", keyFilename: "....json"});
...
const [result] = await gclient.textDetection(image);
const texts = result.fullTextAnnotation;
console.log(texts)

The image is a remote url.

And thanks in advance.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
david-tagguncommented, Mar 12, 2021

@alexander-fenster Still getting these errors mate.

 "@google-cloud/vision": "^2.3.1",
 "@grpc/grpc-js": "1.2.10"

Node: v12.16.1
MacOS: 10.15.7

This issue is still occurring when processing large volumes of images. We’re getting the original error it’s only started happening today prior to the upgrade we were running vision ^1.9.0

Error: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)
    at Object.callErrorFromStatus (node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (node_modules/@grpc/grpc-js/build/src/client.js:176:52)
    at Object.onReceiveStatus (node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at node_modules/@grpc/grpc-js/build/src/call-stream.js:145:78
    at processTicksAndRejections (internal/process/task_queues.js:79:11)

as well as

Error: 8 RESOURCE_EXHAUSTED: Bandwidth exhausted
    at Object.callErrorFromStatus (node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (node_modules/@grpc/grpc-js/build/src/client.js:176:52)
    at Object.onReceiveStatus (node_modules/@grpc/grpc-js/build/src/client-interceptors.js:336:141)
    at Object.onReceiveStatus (node_modules/@grpc/grpc-js/build/src/client-interceptors.js:299:181)
    at node_modules/@grpc/grpc-js/build/src/call-stream.js:145:78
    at processTicksAndRejections (internal/process/task_queues.js:79:11)
1reaction
awxlfycommented, Mar 25, 2021

Bump because I’m also having this issue. Similar to @david-taggun I’m getting this error when sending larger quantities of images (not that crazy or anything)

Error: 13 INTERNAL: Received RST_STREAM with code 2 triggered by internal client error: read ECONNRESET     
    at Object.callErrorFromStatus (node_modules\@grpc\grpc-js\build\src\call.js:31:26)
    at Object.onReceiveStatus (node_modules\@grpc\grpc-js\build\src\client.js:176:52)
    at Object.onReceiveStatus (node_modules\@grpc\grpc-js\build\src\client-interceptors.js:336:141)
    at Object.onReceiveStatus (node_modules\@grpc\grpc-js\build\src\client-interceptors.js:299:181)
    at node_modules\@grpc\grpc-js\build\src\call-stream.js:145:78
    at processTicksAndRejections (internal/process/task_queues.js:75:11)

Seems to be happening whenever I send around 30+ images within a couple minutes. Whenever I’m not getting the error it is taking painfully long to get a response (like 2-3 minutes for 8-10 images). Also, the images aren’t crazy intricate or anything. They’re fairly basic images such as a simple picture of a bus with nothing else.

"@google-cloud/vision": "^2.3.1"
"@grpc/grpc-js": "^1.2.12"
Node: `v14.15.5`
Windows: 10.0.19042 Build 19042
Read more comments on GitHub >

github_iconTop Results From Across the Web

13 INTERNAL: Received RST_STREAM with code 2 triggered ...
i reuse a connection for all request , sometime seems connection will disconnect when idle for a long times (client error: read ECONNRESET), ......
Read more >
Error: 13 INTERNAL: Received RST_STREAM with code 2 ...
"Protocol error" generally indicates that the client got something other than a valid HTTP/2 response from the server or proxy that it was ......
Read more >
Received RST_STREAM with code 2 (Internal server error)
Hi, I've received another server-generated grpc error on my hosted slash.dgraph.io instance. This time it's different:
Read more >
grpc/grpc - Gitter
Anyone have experience w mutual TLS in node.js? I'm getting Received RST_STREAM with code 2 (Internal server error) which I think means auth...
Read more >
Received RST_STREAM with error code 2 - Google Groups
You received this message because you are subscribed to the Google Groups "UniMRCP" group. To unsubscribe from this group and stop receiving emails...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found