Discussion:
[protobuf] upgrading to @grpc/proto-loader; hit with new error!
Don Viszneki
7 years ago
Permalink
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!
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
'Adam Cozzette' via Protocol Buffers
7 years ago
Permalink
I believe gRPC for Node actually uses Protobuf.js
<https://github.com/dcodeIO/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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Tyler Jackson
7 years ago
Permalink
Did you ever resolve this? I have just hit this exact problem but haven't
seen any open or closed issues addressing it.

Thanks!
...
--
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+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
Loading...