Skip to content

Supervisor does not accept cred option on startup #424

Open
@tmthn

Description

@tmthn

Describe the bug
The GRPC server fails to start due to an ArgumentError indicating that the :cred key is no longer supported in the server configuration. The error occurs when trying to pass SSL credentials using the :cred parameter, which appears to be a breaking change in the GRPC library.

To Reproduce

  • Configure a GRPC server with SSL credentials using the :cred key
  • Start the application with the GRPC server supervisor
  • The application crashes during startup with an ArgumentError

Expected behavior
The GRPC server should start successfully with SSL configuration, or there should be clear migration documentation for the new API if :cred has been deprecated.

Logs

[notice] Application grpc_api exited: GrpcApi.Application.start(:normal, []) returned an error: shutdown: failed to start child: GRPC.Server.Supervisor
    ** (EXIT) an exception was raised:
        ** (ArgumentError) unknown keys [:cred] in [cred: %GRPC.Credential{ssl: [certfile: "/Users/tom/Repos/imes-icore/portal_umbrella/apps/grpc_api/priv/cert/server.crt", keyfile: "/Users/tom/Repos/acme/portal_umbrella/apps/grpc_api/priv/cert/server.key"]}, endpoint: GrpcApi.Endpoint, port: 4400, start_server: true], the allowed keys are: [:endpoint, :servers, :start_server, :port]
            (elixir 1.18.4) lib/keyword.ex:362: Keyword.validate!/2
            (grpc 0.10.1) lib/grpc/server/supervisor.ex:63: GRPC.Server.Supervisor.init/1
            (stdlib 6.2.2) supervisor.erl:869: :supervisor.init/1
            (stdlib 6.2.2) gen_server.erl:2229: :gen_server.init_it/2
            (stdlib 6.2.2) gen_server.erl:2184: :gen_server.init_it/6
            (stdlib 6.2.2) proc_lib.erl:329: :proc_lib.init_p_do_apply/3

Versions:

  • OS: macOS 15.5
  • Erlang: 27.3.4
  • Elixir: 1.18.4
  • mix.lock(grpc, gun, cowboy, cowlib):
    • grpc: 0.10.1
    • cowboy: 2.13.0
    • cowlib: 2.15.0

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions