googleapis / googleapis/google-cloud-node

[@google-cloud/kms] Error while calling KeyManagementServiceClient getLocation using Fallback Rest

Offen
#4,366 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
priority: p2 type: bug
Vorherrschende Sprache
TypeScript
Sterne
3.2k
Forks
712
Ø Merge
2 T. 9 Std.
Gemergte PRs (30 T.)
104

Beschreibung

Hi Team, We are trying to call `getLocation` method exposed by **kms KeyManagementServiceClient** using fallback as `rest`

#### Environment details

- which product (packages/*): @google-cloud/kms@3.5.0
- OS: Ubuntu (WSL) 20.04.4 LTS (Focal Fossa)
- Node.js version: 18.14.2
- npm version: 9.5.0
- google-cloud-node version: 3.5.0

#### Steps to reproduce

- Code Snippet

```javascript

import * as kms from "@google-cloud/kms";

const keyManagementServiceClient = new kms.KeyManagementServiceClient({
credentials: {
client_email: "test@project-id.iam.gserviceaccount.com",
private_key: "very long private key",
},
projectId: "project-id",
fallback: "rest",
});

keyManagementServiceClient
.getLocation({
name: "projects/project-id/locations/us-central1",
})
.then(console.log)
.catch(console.error);

```

- Output

```
Error: googleProtobufAnyFromProto3JSON: cannot find type google.cloud.kms.v1.LocationMetadata: Error: no such type: google.cloud.kms.v1.LocationMetadata
at googleProtobufAnyFromProto3JSON (/home/sirohi/work/qualys/tc-gcp-sdk/node_modules/proto3-json-serializer/typescript/src/any.ts:93:11)
at fromProto3JSONToInternalRepresentation (/home/sirohi/work/qualys/tc-gcp-sdk/node_modules/proto3-json-serializer/typescript/src/fromproto3json.ts:78:43)
at fromProto3JSONToInternalRepresentation (/home/sirohi/work/qualys/tc-gcp-sdk/node_modules/proto3-json-serializer/typescript/src/fromproto3json.ts:202:33)
at Object.fromProto3JSON (/home/sirohi/work/qualys/tc-gcp-sdk/node_modules/proto3-json-serializer/typescript/src/fromproto3json.ts:214:24)
at decodeResponse (/home/sirohi/work/qualys/tc-gcp-sdk/node_modules/google-gax/src/fallbackRest.ts:98:30)
at /home/sirohi/work/qualys/tc-gcp-sdk/node_modules/google-gax/src/fallbackServiceStub.ts:177:34
at processTicksAndRejections (node:internal/process/task_queues:95:5)

```

I am expecting a quick resolution from the team.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Reproduce the call with @google-cloud/kms@3.5.0 and fallback set to REST, then trace the response through google-gax/src/fallbackRest.ts and proto3-json-serializer/typescript/src/any.ts, as shown in the stack trace. Done means getLocation returns successfully through REST without the missing google.cloud.kms.v1.LocationMetadata error.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
google-cloud, nodejs, typescript
Bereich
api, backend, cloud
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
42/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.