Closed shotor closed 4 years ago
Sorry for that. Installing gRPC is a pain in the butt! I tried to compiled gRPC inside the docker to not face these kind of issues. Let me dig into it.
No worries! Maybe wait a little bit with that. I was reading about grpc + react-native and I might have to do grpc calls differently, using native swift and java module instead of js so those might just work out of the box.
Also reading grpc repo they seem to recommend Bazel to install it. Is this something you would be interested in? From what I can see it’s dependency management similar to npm/yarn for c++. I can try to migrate the repo to that.
I do remember I had tough times while writing the docker. It tried some recommended ways, but finally I decided to compile it manually inside the docker. which works fine right now. I think docker has no issue, because I tested it with go lang client before. I don't know why I didn't publish the code. and unfortunately I can't find it right now. Maybe because it was so dirty code!
yeah there's definitely something wrong with the libraries I used to generate the client.
I used yet another library to implement a mock grpc server and using the client that it also generated I can successfully call the mock api as well as the docker api: https://github.com/tihu-nlp/tihu-native/blob/master/mock-server/test/integration.test.ts
The two broken libraries I tried before, give the same error when running against the mock server
I'm closing this issue, I don't think it's worth it to go through the pain of getting grpc to work locally when it works fine with docker.
I'll update the other repo when I get grpc working through react-native
Hi @b00f
I'm trying to get the grpc server to run locally so I can find out why the generated js client doesn't work. I think it has to do with docker networking and what the generated client is using internally to do the grpc calls. So I want to run it locally to confirm but I get a segmentation fault when I try to run the server:
Steps that I took:
Following instructions from the Dockerfile on an ubuntu 18.04 machine:
Protobuf installation first. No errors.
When building grpc I got the error:
I solved that by modifying the makefile as suggested here: https://github.com/grpc/grpc/issues/9549#issuecomment-281294118
After that installation runs without error and I have libprotoc.so.18 in /usr/local/lib
Running make on the tihu repo goes fine except for this warning when running
make grpc
:I tried to follow the warning and uninstalled protobuf then installed protobuf 2.7.0 so I get libprotoc.so.10. But that doesn't seem to be the answer:
I don't know how to proceed from here