gnostic icon indicating copy to clipboard operation
gnostic copied to clipboard

Plugin error: [proto: cannot parse invalid wire-format data]

Open petermetz opened this issue 4 years ago • 1 comments

Might be an exotic use-case due to these factors:

  1. Gnostic is running in a docker container
  2. The input OpenAPI spec file is on a mounted bind volume
  3. Only happens with the gnostic-grpc plugin, the gnostic-text plugin works 100% okay even within the above circumstances.

Logs

Errors reading /local/packages/cactus-plugin-keychain-vault/src/main/json/openapi.json
Plugin error: [proto: cannot parse invalid wire-format data]

To reproduce

  1. Run the containerized gnostic that was built from this Dockerfile
git clone https://github.com/petermetz/cactus.git
cd cactus
git checkout gnostic-repro-steps-docker-volumes

docker run --rm -it --mount type=bind,src=$(pwd),dst=/local/ petermetz/cactus-gnostic bash

gnostic /local/packages/cactus-plugin-keychain-vault/src/main/json/openapi.json  --grpc-out=/tmp/
# this fails with the error shown above in the logs section

cp /local/packages/cactus-plugin-keychain-vault/src/main/json/openapi.json  /tmp/
# this succeeds
gnostic /tmp/openapi.json --grpc-out=/tmp/

petermetz avatar Jan 19 '21 00:01 petermetz

A frequent cause of this is plugins inadvertently writing log messages to standard output. I'll investigate further to be sure.

timburks avatar Feb 02 '21 01:02 timburks