pactflow / pact-protobuf-plugin

Pact plugin for Protobufs and gRPC
MIT License
16 stars 8 forks source link

No logs written in ~/.pact/plugins/protobuf-X/logs #50

Open jadencodes opened 5 months ago

jadencodes commented 5 months ago

Hi there, we are evaluating using this across a microservice environment that relies on GRPC communcations.

We were able to quickly get up a demo in our kotlin services but are struggling with the typescript/js repositories. While a learning curve is expected, we get no logs in the protobuf plugin directory from the js libraries which we got and relied on from the java library. This makes triaging what the problem is (i suspect building or importing our protobuf) pretty much trial and error.

I also cloned the example from: https://github.com/pact-foundation/pact-plugins/blob/main/examples/gRPC/area_calculator/js/test/grpc.consumer.spec.ts and still see no logs. The log files themselves are created, but never written to.

I have increased the log level to debug and trace to see if that helps but it doesn't seem to have an effect.

The error we saw in kotlin console that was triagable from the protobuf plugin logs is the same as the error we see in js:

Failed to process protobuf: Failed to invoke protoc binary: exit code exit status: 1

We are on npm 8, nodejs 16

YOU54F commented 5 months ago

:wave:

that usually indicates the plugin couldn't start, you can try invoking the binary manually from the plugin directory.

I am going to assume its because protoc isn't installed on the machine in question

https://google.github.io/proto-lens/installing-protoc.html

jadencodes commented 5 months ago

Hi there, thanks for the fast response.

protoc is installed: as I said the kotlin library works and the linked example using the js library works. However when we use an apparently bad protobuf, it doesn't work and no logs are produced to indicate why.