Skip to content

GRPC.Stub.connect basic usage does not work after upgrading from 0.10.2 to 0.11.0 #448

@xshadowlegendx

Description

@xshadowlegendx

Describe the bug
client failed to connect in test environment and in iex

To Reproduce
on version 0.10.2, running GRPC.Stub.connect("localhost:24000") will work, when upgrade to 0.11.0 doesn't, and when downgrade back to 0.10.2 it will work as expected again

Expected behavior
return {:ok, channel}

Logs

# when running mix test --cover
** (exit) exited in: GenServer.call(GRPC.Client.Supervisor, {:start_child, {{GenServer, :start_link, [GRPC.Client.Connection, %GRPC.Client.Connection{virtual_channel: %GRPC.Channel{host: "localhost", port: 24000, scheme: "http", cred: nil, ref: #Reference<0.193739494.1766064131.16111>, adapter: GRPC.Client.Adapters.Gun, adapter_payload: %{conn_pid: #PID<0.3619.0>}, codec: GRPC.Codec.Proto, interceptors: [], compressor: nil, accepted_compressors: [], headers: []}, real_channels: %{"\"localhost\":24000" => %GRPC.Channel{host: "localhost", port: 24000, scheme: "http", cred: nil, ref: #Reference<0.193739494.1766064131.16111>, adapter: GRPC.Client.Adapters.Gun, adapter_payload: %{conn_pid: #PID<0.3619.0>}, codec: GRPC.Codec.Proto, interceptors: [], compressor: nil, accepted_compressors: [], headers: []}}, lb_mod: GRPC.Client.LoadBalancing.PickFirst, lb_state: %{current: %{port: 24000, address: "localhost"}, addresses: [%{port: 24000, address: "localhost"}]}, resolver: GRPC.Client.Resolver, adapter: GRPC.Client.Adapters.Gun}, [name: {:global, {GRPC.Client.Connection, #Reference<0.193739494.1766064131.16111>}}]]}, :transient, 5000, :worker, [GenServer]}}, :infinity)
         ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
# manual test running inside iex
iex(1)> GRPC.Stub.connect("localhost:24000")
** (exit) exited in: GenServer.call(GRPC.Client.Supervisor, {:start_child, {{GenServer, :start_link, [GRPC.Client.Connection, %GRPC.Client.Connection{virtual_channel: %GRPC.Channel{host: "localhost", port: 24000, scheme: "http", cred: nil, ref: #Reference<0.2295188456.2840068099.54656>, adapter: GRPC.Client.Adapters.Gun, adapter_payload: %{conn_pid: #PID<0.12258.0>}, codec: GRPC.Codec.Proto, interceptors: [], compressor: nil, accepted_compressors: [], headers: []}, real_channels: %{"\"localhost\":24000" => %GRPC.Channel{host: "localhost", port: 24000, scheme: "http", cred: nil, ref: #Reference<0.2295188456.2840068099.54656>, adapter: GRPC.Client.Adapters.Gun, adapter_payload: %{conn_pid: #PID<0.12258.0>}, codec: GRPC.Codec.Proto, interceptors: [], compressor: nil, accepted_compressors: [], headers: []}}, lb_mod: GRPC.Client.LoadBalancing.PickFirst, lb_state: %{current: %{port: 24000, address: "localhost"}, addresses: [%{port: 24000, address: "localhost"}]}, resolver: GRPC.Client.Resolver, adapter: GRPC.Client.Adapters.Gun}, [name: {:global, {GRPC.Client.Connection, #Reference<0.2295188456.2840068099.54656>}}]]}, :transient, 5000, :worker, [GenServer]}}, :infinity)
    ** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
    (elixir 1.18.1) lib/gen_server.ex:1121: GenServer.call/3
    (grpc 0.11.0) lib/grpc/client/connection.ex:160: GRPC.Client.Connection.connect/2
    iex:1: (file)

Protos
If applicable, add protos to help explain your problem.

Versions:

  • OS: macos 15.4.1
  • Erlang: 27
  • Elixir: 1.18.1
  • mix.lock(grpc, gun, cowboy, cowlib): 0.11.0, 2.2.0, 2.14.2, 2.16.0

Additional context
previous working mix.lock(grpc, gun, cowboy, cowlib): 0.10.2, 2.2.0, 2.13.0, 2.15.0

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