No connection established on gRPC with server-side TLS, self-signed certs
Expected Behavior
A gRPC call goes through and either succeeds or a descriptive error is returned.
Actual Behavior
Error 14 No connection established is returned with no further messages or logs.
The only log from main.log that appeared after the request:
[2023-08-13 16:43:46.269] [info] [gRPC] connecting to url=localhost:50055 with TLS
Reproduction Steps
- Set up basic gRPC server with server-side TLS configured using my repo.
- Create a new collection and a gRPC request.
- Prefix the url with
grpcs://e.ggrpcs://localhost:50055. - Add the CA cert in the collection settings.
- Send the request.
Is there an existing issue for this?
- [X] I have searched the issue tracker for this problem.
Additional Information
I've encountered this issue when testing locally my own gRPC server written in Go.
Everything was working as expected until I configured server-side TLS using self-signed certificates.
I can confirm the request is handled just fine when using a different client like grpcurl.
A minimal example including the certs I've used is here.
Insomnia Version
2023.4.0
What operating system are you using?
Windows
Operating System Version
Windows_NT x64 10.0.19045
Installation method
Downloaded from insomnia.rest
Last Known Working Insomnia version
No response
I have the same problem.
I also met this problem today
Hi, Is there a timeline when this can be fixed?
issue still happening in Insomnia v10.3.0
@cah-charbel-helayel can you describe your steps to reproduce?
I forked the original repro repo with new certs, and the requests resolve properly: https://github.com/kong-test/insomnia_issue_6267
@ryan-willis yes sure
I added my certificate to Insomnia and appended grpcs:// to my url
when I exectue the call, I get the following exception
Error: 2 UNKNOWN: at callErrorFromStatus (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/@grpc/grpc-js/build/src/call.js:31:19) at Object.onReceiveStatus (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/@grpc/grpc-js/build/src/client.js:193:76) at Object.onReceiveStatus (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:360:141) at Object.onReceiveStatus (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:323:181) at /Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/@grpc/grpc-js/build/src/resolving-call.js:129:78 at process.processTicksAndRejections (node:internal/process/task_queues:77:11) for call at at ServiceClientImpl.makeUnaryRequest (/Applications/Insomnia.app/Contents/Resources/app.asar/node_modules/@grpc/grpc-js/build/src/client.js:161:32) at /Applications/Insomnia.app/Contents/Resources/app.asar/main.min.js:73178:36
This calls works fine on postman when adding the certificate and enabling TLS and on grpcUI
@cah-charbel-helayel thank you!
I believe the error you're seeing is unrelated to the original issue at hand (14 - No connection etablished), but I can't know for sure until I can reproduce this myself. It looks like the server is responding with 2 as its status code (instead of 0 for OK). Would you be willing to share more details about the server and/or proto files? We can take this out of the public eye to DMs on our Slack server if you'd like to keep details private: https://chat.insomnia.rest
@ryan-willis thank you for pointing out the response! I was able to figure it out, the issue was with one of the headers that was written differently on Insomnia.