grpc
grpc copied to clipboard
Supervisor does not accept cred option on startup
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
I have the same issue 😅
@sleipnir did we end up adding that new keyword opt and release it?
@polvalent we just added it to main, we haven't released anything yet...
Em qui., 12 de jun. de 2025 às 11:15, Paulo Valente < @.***> escreveu:
polvalente left a comment (elixir-grpc/grpc#424) https://github.com/elixir-grpc/grpc/issues/424#issuecomment-2967010637
@sleipnir https://github.com/sleipnir did we end up adding that new keyword opt and release it?
— Reply to this email directly, view it on GitHub https://github.com/elixir-grpc/grpc/issues/424#issuecomment-2967010637, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACTTZTHEI7KNEJKIORUCPT3DGDRZAVCNFSM6AAAAAB7FRLJESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNRXGAYTANRTG4 . You are receiving this because you were mentioned.Message ID: @.***>
Let's release it as 0.10.2 and retire the previous patches?
Ok. I can take a look this tomorrow
Em qui., 12 de jun. de 2025 às 23:59, Paulo Valente < @.***> escreveu:
polvalente left a comment (elixir-grpc/grpc#424) https://github.com/elixir-grpc/grpc/issues/424#issuecomment-2968834975
Let's release it as 0.10.2 and retire the previous patches?
— Reply to this email directly, view it on GitHub https://github.com/elixir-grpc/grpc/issues/424#issuecomment-2968834975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACTTZVICJ7MU7FHKEWPZU33DI47HAVCNFSM6AAAAAB7FRLJESVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSNRYHAZTIOJXGU . You are receiving this because you were mentioned.Message ID: @.***>
Hi guys @tmthn @xImMonti @polvalente !
Sorry for the delay, a lot of work lately. Just released the v0.10.2 tag and hex package https://hex.pm/packages/grpc/0.10.2
Please test this version by passing any adapter options via adapter_opts option.