insomnia
insomnia copied to clipboard
GRPC not working with https
Expected Behavior
Be able to call GRPC server with https endpoint.
Actual Behavior
When running GRPC server in .NET the endpoint will be https://localhost:XXXX
, the current parser does not allow to specify https and the connection fails.
Error invoking remote method 'grpc.loadMethodsFromReflection': Error: 14 UNAVAILABLE: Name resolution failed for target dns:https://localhost:51811
The server is running properly since Postman has no issues, insomnia can't connect at all. Replacing https with grpcs does not work.
Reproduction Steps
No response
Is there an existing issue for this?
- [X] I have searched the issue tracker for this problem.
Additional Information
No response
Insomnia Version
8.6.1
What operating system are you using?
Windows
Operating System Version
Windows 11
Installation method
insomnia.rest
Last Known Working Insomnia version
No response
This seems to be more of a DNS problem that a TLS problem. Can you try to consume https://127.0.0.1:51811
?
I've tried that, but gave it another try
any update on this?
AFAIK it's atypical to use a http protocol to connect to a grpc server. Without a proxy, a regular gRPC server is expecting grpc://
.
Please provide screenshots of both postman and insomnia including the request and response panes
There isn't much to show, it simply works with Postman
The implementation is done by Microsoft under https://github.com/grpc/grpc-dotnet
Tried with
127.0.0.1:51811
Error: 1 CANCELLED: Call cancelled
https://127.0.0.1:51811
Error: 14 UNAVAILABLE: Name resolution failed for target dns:https://127.0.0.1:51811
grpcs://127.0.0.1:51811
Error: 14 UNAVAILABLE: No connection established. Last error: unable to verify the first certificate (2024-04-26T21:44:31.816Z)
Same problem. I'm exposing a .NET Web API on 5002 (HTTP) and (5052 (HTTPS), after creating a project from the .NET GRPC service template.
HTTP works. HTTPS doesn't.
In Postman both just works.
Setup:
HTTP response:
HTTPS response:
Postman is a closed source project. So I can't compare their implementation to insomnia, if you could try grpcurl or grpcui and let us know if it works for you that would be a huge help for us to solve this for you.
@modestotech could you take a look at the .NET logs and see if this comment looks familar https://github.com/grpc/grpc-node/issues/2340#issuecomment-1664644017
here's the endpoint tried via grpcurl
here's the endpoint tried via postman,
here's the error in insomnia,
I have the same issue. It tries to resolve https:// as far as I understand this. There is no setting to change to TLS in insomnia.
After some testing: use grpcs:// insted of https! This solved my problem.
@jackkav any feedback based on the last comments?