insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

No connection established on gRPC with server-side TLS, self-signed certs

Open krixlion opened this issue 2 years ago • 3 comments

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

image image

Reproduction Steps

  1. Set up basic gRPC server with server-side TLS configured using my repo.
  2. Create a new collection and a gRPC request.
  3. Prefix the url with grpcs:// e.g grpcs://localhost:50055.
  4. Add the CA cert in the collection settings.
  5. Send the request.

Is there an existing issue for this?

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

krixlion avatar Aug 13 '23 14:08 krixlion

I have the same problem.

afluegge avatar Oct 13 '23 14:10 afluegge

I also met this problem today

zhutoutou avatar Aug 29 '24 12:08 zhutoutou

Hi, Is there a timeline when this can be fixed?

apptio-speravali avatar Sep 10 '24 16:09 apptio-speravali

issue still happening in Insomnia v10.3.0

cah-charbel-helayel avatar Jan 10 '25 10:01 cah-charbel-helayel

@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 avatar Jan 10 '25 19:01 ryan-willis

@ryan-willis yes sure

I added my certificate to Insomnia and appended grpcs:// to my url image

image

when I exectue the call, I get the following exception image

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 avatar Jan 13 '25 07:01 cah-charbel-helayel

@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 avatar Jan 13 '25 22:01 ryan-willis

@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.

cah-charbel-helayel avatar Jan 14 '25 08:01 cah-charbel-helayel