Skip to content

CaseClauseError when multiple services are registered in reflection server (Elixir gRPC slack channel) #63

@sleipnir

Description

@sleipnir

Hello folks,
I’m one of the maintainers of the Elixir gRPC library and I’m forwarding an issue that was reported yesterday in the Elixir gRPC Slack channel. A user ran into a crash when enabling reflection with more than one service.

Below are the details.

Problem Description

Reflection works correctly when only a simple service (e.g., a health check) is registered.
However, when additional services are added to the reflection server, the server crashes with a CaseClauseError.

User-provided log:

2025-11-17T17:18:36.649 [info] Handled by Lore.ReflectionServer.V1.server_reflection_info
2025-11-17T17:18:36.649 [info] Received v1 reflection request: {:file_containing_symbol, "lore"}
2025-11-17T17:18:36.651 [error] ** (CaseClauseError) no case clause matching: {:error, {:function_clause, [{GrpcReflection.Service.Builder.Util, :types_from_descriptor,

The project generates descriptors and code through a Mix alias:

mix protobuf.generate \
  --include-path=priv/protos \
  --plugin=ProtobufGenerate.Plugins.GRPCWithoptions \
  --output-path=./lib \
  --generate-descriptors \
  priv/protos/messages.proto \
  priv/protos/services.proto \
  priv/protos/healthcheck.proto

The service definitions and message types are in separate .proto files.

The user also attempted generating them all in the same file as a test, but the problem persisted.

Questions

To help us narrow this down:

  1. Are there any known limitations around multiple-service reflection in the current implementation?
  2. Is there a specific expected structure for descriptors that the Elixir generator might not be producing?
  3. Are there examples of multi-service reflection setups that could serve as reference?
  4. Could this be related to descriptor ordering or file grouping?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingquestionFurther information is requested

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions