upgrading to @grpc/proto-loader; hit with new error!

2,241 views
Skip to first unread message

Don Viszneki

unread,
Jun 28, 2018, 9:30:34 PM6/28/18
to Protocol Buffers
Hi all :)

I have finally heeded the deprecation warning coming from the `grpc`
npm package:

```
(node:84472) DeprecationWarning: grpc.load: Use the @grpc/proto-loader
module with grpc.loadPackageDefinition instead
```

However, the newer version of protobufs employed by
`@grpc/proto-loader` does not like my custom options:

```
Error: unresolvable extensions: 'extend google.protobuf.FileOptions'
in .chat, 'extend google.protobuf.MessageOptions' in .chat, 'extend
google.protobuf.FieldOptions' in .chat
```

Lines 5-14 of `chat.proto` are included here and at the link below:

```
import "google/protobuf/descriptor.proto";
extend google.protobuf.FileOptions {
string tin_module_validation = 4000;
}
extend google.protobuf.MessageOptions {
string tin_message_validation = 4000;
}
extend google.protobuf.FieldOptions {
string tin_field_validation = 4000;
}
```

https://github.com/dvisztempacct/bs-grpc-server-example/blob/7e5729f787c7678be00954798664b95014b2b303/chat.proto#L5-L14

Any help would be greatly appreciated!

Adam Cozzette

unread,
Jun 29, 2018, 7:32:18 PM6/29/18
to dvis...@influential.co, Protocol Buffers
I believe gRPC for Node actually uses Protobuf.js, which is an independent protobuf implementation that we don't maintain ourselves. Your best bet might be to file an issue with https://github.com/grpc/grpc-node since the gRPC folks should be able to figure out whether it's a gRPC issue or a Protobuf.js issue.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Tyler Jackson

unread,
Aug 28, 2018, 1:48:54 PM8/28/18
to Protocol Buffers
Did you ever resolve this? I have just hit this exact problem but haven't seen any open or closed issues addressing it.

Thanks!
Reply all
Reply to author
Forward
0 new messages