Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target uri should not have null authority #591

Open
onemore-creator opened this issue Feb 25, 2025 · 3 comments
Open

Target uri should not have null authority #591

onemore-creator opened this issue Feb 25, 2025 · 3 comments

Comments

@onemore-creator
Copy link

Hi there,

Been trying to create a simple client/server from one protobuf file. The server works as expected, but when I am trying to configure the client

pekko.grpc.client {
  "prime.PrimeNumberService" {
    host = "127.0.0.1"
    port = 9000
    use-tls = false
  }
}

I get the following error:

[IllegalArgumentException: requirement failed: target uri should not have null authority, got [http://///127.0.0.1:9000]]

And some more details:

@PekkoGrpcGenerated
28object PrimeNumberServiceClient {
29  def apply(settings: GrpcClientSettings)(implicit sys: ClassicActorSystemProvider): PrimeNumberServiceClient =
30    new DefaultPrimeNumberServiceClient(GrpcChannel(settings), isChannelOwned = true)
31
32
33  def apply(channel: GrpcChannel)(implicit sys: ClassicActorSystemProvider): PrimeNumberServiceClient =
34    new DefaultPrimeNumberServiceClient(channel, isChannelOwned = false)

Do you know if I made a typo in the configuration or should I use a different approach?

Thanks!

@onemore-creator
Copy link
Author

To add some more context - I am using Play 3.0.2, scala 3.3.3, play-grpc-generators 0.12.2

@onemore-creator
Copy link
Author

Update: got that fixed by switching from netty to pekko-http for pekko.grpc.client

@onemore-creator
Copy link
Author

pekko.grpc.client."*" {
backend = "pekko-http"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant