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.

Exception occurred in retry method that was not classified as transient

See original GitHub issue

Hello,

I’ve been successfully using this library since last June, and I haven’t had any problems until now.

I have a Firebase Cloud Function (Node 10) that is giving me this error:

{
  "code":1,
  "details":"The operation was cancelled.",
  "metadata":{
    "internalRepr":{},
    "options":{}
  },
  "note":"Exception occurred in retry method that was not classified as transient"
}

But everything works fine (as it always has) on my local machine.

Local Environment details (this works fine)

  • OS: MacOS 10.15.3
  • Node.js version: 10.15.3 (not a typo)
  • yarn version: 1.22.0
  • @google-cloud/vision version: both 1.10.0 and 1.11.0

Firebase Cloud Function Environment details (this fails)

  • OS: ?
  • Node.js version: 10.15.3
  • npm version: ?
  • @google-cloud/vision version: both 1.10.0 and 1.11.0

Steps to reproduce

Here’s my code. As I said, it works on my Mac, but not on Firebase Cloud Functions.

const vision = require('@google-cloud/vision').v1;


export default async ( ) => {

    const client = new vision.ImageAnnotatorClient({
      projectId: 'my-project-id',
      keyFilename: './service-account.json'
    });

    const req = {
      image: {
        source: {
          imageUri: 'gs:my-project-id.appspot.com/path/file.jpg'
        }
      },
      features: [
        {
          maxResults: 10,
          type: 'LABEL_DETECTION'
        },
        {
          maxResults: 10,
          type: 'IMAGE_PROPERTIES'
        },
        {
          maxResults: 10,
          type: 'TEXT_DETECTION'
        }
      ]
    };

   // error gets thrown here:
    const [result] = await client.annotateImage(req);
   // can't make it here

};

Does anybody know how to solve this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
alexander-fenstercommented, Apr 9, 2020

Folks, for a temporary workaround, please just update your dependency tree. The latest @grpc/grpc-js will work. We are working on fixing it for old installations as well.

$ npm ls @grpc/grpc-js
@google-cloud/vision@1.11.0 /Users/fenster/nodejs-packages/nodejs-vision
└─┬ google-gax@2.0.2
  └── @grpc/grpc-js@0.7.8 
3reactions
alexander-fenstercommented, Apr 10, 2020

It should all be fixed by now in the backend (regardless of the gRPC version you have). If you still experience problems, please let us know. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exception occurred in retry method that was not classified as ...
No. [following statement is might be wrong] this error happens only after idle function is invoked after longer period of time.
Read more >
Exception occurred in retry method that was not classified as ...
In my use of google.cloud.firestore. I have a "blinking" error: RetryError: RetryError(Exception occurred in retry method that was not ...
Read more >
Retry asynchronous functions | Cloud Functions for Firebase
Use retry to handle transient errors​​ Because your function is retried continuously until successful execution, permanent errors like bugs should be eliminated ...
Read more >
Too many Deadline Exceeded errors - Google Groups
I am running into lot of these errors in my project (mailrecipe-dev). This is severely impacting the production.
Read more >
Exception occurred in retry method that was not classified as ...
Developers - Exception occurred in retry method that was not classified as transient -
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