I got this error when working with protobuf plugin...
# pact-plugins
t
I got this error when working with protobuf plugin:
Copy code
pact_ffi::plugins: Failed to call out to plugin - Request to configure interaction failed: Failed to process protobuf: Failed to invoke protoc binary: exit code exit status: 1
According to this https://github.com/pactflow/pact-protobuf-plugin#logging, how can I set env
LOG_LEVEL
exactly? I checked
/path/to/plugins/protobuf/log/*.log.Y-M-D
, all files are empty, and I can't see the real problem. I tried this but it doesn't work:
Copy code
LOG_LEVEL=debug PACT_LOGLEVEL=trace phpunit example/async-message/consumer/tests/Contract/
u
This needs to be configured in the Pact-PHP integration. The default is to use the
LOG_LEVEL
environment variable, but just note that this is a Node.js/Ruby specific way. But there are FFI functions to setup the logging.
But, even then,
Failed to invoke protoc binary: exit code exit status: 1
means the protoc command failed with an error, and the log level will not control that tools output. I think it writes to stderr.
t
Currently in Pact-PHP I only call
pactffi_init_with_log_level('debug')
. I don't know what I am missing.
u
That will enable debug logs to standout, but not change the protoc error output. You can try trace to see if it makes a difference.
t
I did try
trace
before but it doesn't help.
btw, don't worry about the error
Failed to invoke protoc binary: exit code exit status: 1
. It's just because a typo that make the path to proto file invalid
Currently
/path/to/plugins/protobuf/log/*.log.Y-M-D files are empty
is the problem I am facing
u
I can see the protoc entries in
t
yes, me too, but all of them are empty
u
Something is going wrong with the log level then, it is meant to set the
LOG_LEVEL
for the plugin process based on what you have setup. Do you see any entries in the console for the tests?
t
it is meant to set the
LOG_LEVEL
for the plugin process based on what you have setup
ahhh, yess?? I am wondering how to do that