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

Help required: Error: 13 INTERNAL: Received RST_STREAM with code 0

Greetings, 

I'm currently using a demo account to test how this service works before deploying on a larger scale. My problem: I have deployed a text-bison@001 endpoint to figure out how to create and access endpoints. It is deployed on us-central1. 

When trying to access the endpoint using the PredictionServiceClient from the node pkg Google-cloud/aiplatform I am receiving this error in the console: 
```
Error: 13 INTERNAL: Received RST_STREAM with code 0
at callErrorFromStatus ([...]/node_modules/@grpc/grpc-js/build/src/call.js:31:19)
at Object.onReceiveStatus ([...]/node_modules/@grpc/grpc-js/build/src/client.js:192:76)
at Object.onReceiveStatus ([...]/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141)
at Object.onReceiveStatus ([...]/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181)
at [...]/node_modules/@grpc/grpc-js/build/src/resolving-call.js:99:78
at process.processTicksAndRejections (node:internal/process/task_queues:77:11)
for call at
at ServiceClientImpl.makeUnaryRequest ([...]/node_modules/@grpc/grpc-js/build/src/client.js:160:32)
at ServiceClientImpl.<anonymous> ([...]/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
at [...]/node_modules/@google-cloud/aiplatform/build/src/v1/prediction_service_client.js:237:29
at [...]/node_modules/google-gax/build/src/normalCalls/timeout.js:44:16
at OngoingCallPromise.call ([...]/node_modules/google-gax/build/src/call.js:67:27)
at NormalApiCaller.call ([...]/node_modules/google-gax/build/src/normalCalls/normalApiCaller.js:34:19)
at [...]/node_modules/google-gax/build/src/createApiCall.js:84:30
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 13,
details: 'Received RST_STREAM with code 0',
metadata: Metadata { internalRepr: Map(0) {}, options: {} }
}
```
I am making the request in this way: 
```

const { PredictionServiceClient } = require('@google-cloud/aiplatform').v1;
const API_ENDPOINT = [...];
const PROJECT_ID = [...];
 
const aiPlatformClient = new PredictionServiceClient({ credentials: tempAuthKey});
    const response = await aiPlatformClient.predict({
        endpoint: `https://us-central1-aiplatform.googleapis.com/v1/projects/${PROJECT_ID}/locations/us-central1/endpoints/${ENDPOINT_ID}:predict`,
        instances: [
            {
                content: query,
            }
        ],
        parameters: {
              [...]
        }
    });
```
The link and values for PROJECT_ID etc are taken from the sample prompt. 
The tempAuthKey is a JSON object generated for a subuser, which should have all permissions for endpoint useage. 

I would highly appreciate any help to figure out what I am doing wrong here. 
0 1 3,095
1 REPLY 1

Hello haha self

Your account wrong.you cannot use as account.

best wishes