pact-foundation / pact-plugins

🏰 Architecture to support Plugins 🔌 with Pact 🔗
MIT License
19 stars 11 forks source link

Error when trying to invoke protoc binary #53

Closed edward-tink closed 5 months ago

edward-tink commented 9 months ago

Hello,

I'm getting an error trying to use the Protobuf Plugin with Pact. The error message is:

14:02:34.224 [Test worker] DEBUG io.pact.plugins.jvm.core.DefaultPluginManager - Got response: error: "Failed to process protobuf: Failed to invoke protoc binary: exit code exit status: 1"

I am using the following versions:

consumer % ./pact-plugin-cli --version
pact-plugin-cli 0.1.1
ehaigh@WM-F77547CXHH consumer % ./pact-plugin-cli list installed
┌──────────┬─────────┬───────────────────┬────────────────────────────────────────────┬─────────┐
│ Name     ┆ Version ┆ Interface Version ┆ Directory                                  ┆ Status  │
╞══════════╪═════════╪═══════════════════╪════════════════════════════════════════════╪═════════╡
│ protobuf ┆ 0.3.9   ┆ 1                 ┆ /Users/ehaigh/.pact/plugins/protobuf-0.3.9 ┆ enabled │
└──────────┴─────────┴───────────────────┴────────────────────────────────────────────┴─────────┘

and have a local version of protoc installed:

ehaigh@WM-F77547CXHH consumer % protoc --version
libprotoc 25.2

My pact-plugin.json looks like this:

{"pluginInterfaceVersion":1,"name":"protobuf","version":"0.3.9","executableType":"exec","minimumRequiredVersion":null,"entryPoint":"pact-protobuf-plugin","entryPoints":{},"args":null,"dependencies":null,"pluginConfig":{"hostToBindTo":"127.0.0.1","downloadUrl":"https://github.com/protocolbuffers/protobuf/releases","protocVersion":"3.11.3"}}

Can you suggest anything I could do to try and get this to work? I'm happy to use a local protoc install rather than download one if possible.

YOU54F commented 9 months ago

If you try and run the plugin directly at /Users/ehaigh/.pact/plugins/protobuf-0.3.9 what happens?

What system are you running it on, macos (arm / intel)? My current version on an m1 mac sonoma is libprotoc 23.4 (I doubt that is the issue though)

YOU54F commented 5 months ago

Closing due to lack of response. Happy to reopen with more info