nodejs-speech icon indicating copy to clipboard operation
nodejs-speech copied to clipboard

got "Internal error encountered." with `adaptationClient.createCustomClass({/*...*/})`

Open okunishinishi opened this issue 3 years ago • 4 comments

Environment details

  • OS: macOS
  • Node.js version: v14.18.2
  • npm version: 6.14.15
  • @google-cloud/speech version: 4.9.0

Steps to reproduce

await adaptationClient.createCustomClass({
     parent: `projects/${projectId}/locations/global/customClasses`,
     customClassId: 'helloworld',
     customClass: {
          items: [{ value: 'hello' }],
     }
})

and i got

Error: 13 INTERNAL: Internal error encountered.
    at Object.callErrorFromStatus (/Users/okuni/Projects/raisin-worker/packages/bot/node_modules/@google-cloud/speech/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/Users/okuni/Projects/raisin-worker/packages/bot/node_modules/@google-cloud/speech/node_modules/@grpc/grpc-js/build/src/client.js:180:52)
    at Object.onReceiveStatus (/Users/okuni/Projects/raisin-worker/packages/bot/node_modules/@google-cloud/speech/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:365:141)
    at Object.onReceiveStatus (/Users/okuni/Projects/raisin-worker/packages/bot/node_modules/@google-cloud/speech/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
    at /Users/okuni/Projects/raisin-worker/packages/bot/node_modules/@google-cloud/speech/node_modules/@grpc/grpc-js/build/src/call-stream.js:182:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 13,
  details: 'Internal error encountered.',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} }
}

what is wrong?

okunishinishi avatar Feb 03 '22 12:02 okunishinishi

I suggest trying out the Model Adaptation test, which invokes this sample code. If you are able to run that successfully, then try to adapt it to your configuration.

kweinmeister avatar Feb 03 '22 20:02 kweinmeister

@kweinmeister

I tried Model Adaptation test, and got 7 PERMISSION_DENIED: Permission is denied.

Screen Shot 2022-02-05 at 10 13 39

But i can create custom classes from browser with GUI. Enough permissions, i guess

Screen Shot 2022-02-05 at 10 15 15

okunishinishi avatar Feb 05 '22 01:02 okunishinishi

parent option is defined as

which is correct ?

Screen Shot 2022-02-05 at 10 22 12

Screen Shot 2022-02-05 at 10 22 01

okunishinishi avatar Feb 05 '22 01:02 okunishinishi

Do you get the same error result using both parent strings with your original code above?

kweinmeister avatar Feb 10 '22 17:02 kweinmeister