question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enums in proto files fail.

See original GitHub issue

Testing enum types in proto messages I got the following errors:

https://github.com/maurogonzalez/rpctest/tree/enums

Using protocol.proto And srcGen to generate scala code.

  • grpc client returns:
ERROR:
  Code: Internal
  Message: grpc: failed to unmarshal the received message type_enum field HelloResponse.message is not compatible with nil value
  • mu client logs:
// ClientApp
 ...
client.sayHello(Test.HELLO)

// Server Log: INFO GreeterServiceHandler - Request: HelloRequest(GOODBYE)
// Client Log: INFO GreeterServiceClient - Request: HELLO - Result: HelloResponse(GOODBYE)
  • Not sure if it is related with Scala objects and Java’s io.grpc.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cb372commented, Jan 17, 2020

This issue should be fixed in the latest version (v0.20.1) of mu-scala. We’ve largely rewritten the protobuf serialization library and fixed a lot of bugs, as well as improving support for protobuf enums. The mu-scala codegen will now encode enums in Scala as enumeratum IntEnumEntrys, meaning the serialization library can serialize them to protobuf with the correct ordinal.

If you have any more problems with enums, please open a new issue.

1reaction
toddburnsidecommented, Jun 26, 2019

https://github.com/higherkindness/skeuomorph/issues/100 was created to continue discussion on this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enums in proto files fail. · Issue #611 · higherkindness/mu-scala
Testing enum types in proto messages I got the following errors: ... code. grpc client returns: ERROR: Code: Internal Message: grpc: failed.
Read more >
Protocol Buffer: Enum issue - java - Stack Overflow
When I try to comile it using protoc , I get the following error : proto.proto:19:5: "X" is already defined proto.proto:19:5: Note that...
Read more >
Language Guide (proto3) | Protocol Buffers - Google Developers
This guide describes how to use the protocol buffer language to structure your protocol buffer data, including .proto file syntax and how to...
Read more >
Protobuf: failed to parse .proto file contains negative enum ...
If a '.proto' file contains negative enum values or option values of number type in your 'Protobuf search paths', when you open any...
Read more >
[protobuf] Is possible to use enum from external class in .proto ...
I want to avoid definition of same enum in every class and to avoid sync between, I have that enum in regular external...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found