googleapis / googleapis/google-cloud-node

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

オープン
#4,366 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
priority: p2 type: bug
主要言語
TypeScript
スター
3.2k
フォーク
712
平均マージ
2日 9時間
マージ済み PR(30日)
104

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

@google-cloud/kms@3.5.0 を使って呼び出しを再現し、fallback を REST に設定してから、stack trace に示されているとおり、google-gax/src/fallbackRest.ts と proto3-json-serializer/typescript/src/any.ts を通じてレスポンスを追跡します。getLocation が、欠落している google.cloud.kms.v1.LocationMetadata エラーなしに REST 経由で正常に返ることが完了条件です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
google-cloud, nodejs, typescript
領域
api, backend, cloud
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。