Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Unable to use Google Well Known Types with @grpc/reflection and @grpc/proto-loader

オープン
#2,958 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

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

調査の方向性

まず、google/protobuf/duration.proto、@grpc/proto-loader、ReflectionService、grpcurl を import する、示されている proto で失敗を再現します。ReflectionService が packageDefinition をどのように使用し、Google Well-Known Types をどのように処理するかを調べます。reflection が実行時に google.protobuf.Duration を解決できれば作業完了です。

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

説明

package: @grpc/proto-loader package: @grpc/reflection
Problem description

When using @grpc/proto-loader to load a .proto file that imports Google Well-Known Types (for example, google/protobuf/struct.proto), the server reflection fails to recognize those types at runtime.

Although proto-loader correctly builds and adds the Google WKTs to the packageDefinition object, running grpcurl with service reflection enabled produces the following error:

cannot resolve type: "*.google.protobuf.Duration" not found
A similar issue has been discussed here: https://github.com/fullstorydev/grpcurl/issues/459

Reproduction Steps

Proto:

syntax = "proto3";

package multiply_function;

import "google/protobuf/duration.proto";

message Request {
  int32 op1 = 1;
  int32 op2 = 2;
}

message Response {
  int32 prod = 1;
  google.protobuf.Duration processing_time = 3;  // How long the calculation took
}

service Multiply {
  rpc multiply (Request) returns (Response);
}
// Load a .proto file that imports a Google well-known type
const packageDefinition = await load(protoFile);

// Create and register the ReflectionService
const reflectionService = new ReflectionService(packageDefinition);
reflectionService.addToServer(grpcServer);

Environment

Node.js: v22.14.0

Dependencies:
@grpc/grpc-js: 1.13.3
@grpc/proto-loader: 0.7.15
@grpc/reflection: 1.0.4

Additional context

I’ve also tried supplying complete file descriptors—including the Google WKTs, but the issue persists. Any help would be greatly appreciated!

主要言語
TypeScript
スター
4.8k
フォーク
716
平均マージ
1日 18時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

grpc/grpc-node のほかの issue

grpc/grpc-node の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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