-
Notifications
You must be signed in to change notification settings - Fork 32
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
Using SSL certificate in Karate-gRPC. Caught exception while waiting for rpc #19
Comments
If I remember right, I had similar error. Make sure Your have this: This file is generated using Your proto files located in: |
@s3naid Thanks for your response. I updated the protoSourceRoot to the path where all the .proto files are located for the project and was able to compile them successfully. With that , I got past the error Can't find service with name: DeterminationAPI. However, the service uses a .pem certificate for the API call and since I haven't added the certificate in the karate.feature file, possibly getting the below error now.
Is there a way I can include the .pem certificate in the call? Please find below my feature file code.
Regards |
@debayandesarkar Check karate dsl netty, it is possible to configure ssl certificate I didnt use this so I cant help You further, but if You manage to do it pls. post your solution here |
@s3naid I asked this question about using configure ssl certificate here https://stackoverflow.com/questions/67882647/how-to-configure-a-pem-certificate-in-karate-feature-file?noredirect=1#comment119988730_67882647. This won't work for karate-grpc. We checked the implementation of kara-grpc core and looks like the implementation doesn't support SSL . Refer https://github.com/pecker-io/karate-grpc/blob/master/karate-grpc-core/src/main/java/com/github/thinkerou/karate/grpc/ChannelFactory.java which uses .usePlaintext().build(); We tried to modify the method in this class as below to include the SSL certificate. However, getting error in calling the service.
Exception:
|
@debayandesarkar Also one more note, karate-grpc is not compatible with latest version of karate. You can use 0.9.6 karate version. I have incorporated karate and karate-grpc into my own code, so I cant easily share my code. But try 0.9.6 and if it works then You have to fix karate-grpc to make it compatible with karate 1.0.1. |
Hi @debayandesarkar, com.test.provider.feature:10 - javascript evaluation failed: client.call('com.xyz..ProviderAPI/RetrieveInfo',payload), Caught exception while waiting for rpc and my API communication needs a cert so used NettyChannelBuilder and pass the cert and than my problem resolved. public static ManagedChannel createSSLChannel(String host, int port) { |
Hi,
Thanks for sharing this implementation. I am trying to automate a gRPC service call following the example documented here. My feature file looks like below
Feature: DeterminationAPI GetTax
I have included the jar file which has the .proto file of the gRPC service (e.g. com.abc.tax.amounts.v1beta1.DeterminationAPI). However, I am getting the below error.
Can you please help troubleshooting this issue?
The text was updated successfully, but these errors were encountered: