gnostic
gnostic copied to clipboard
Plugin error: [proto: cannot parse invalid wire-format data]
Might be an exotic use-case due to these factors:
- Gnostic is running in a docker container
- The input OpenAPI spec file is on a mounted bind volume
- 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
- 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/
A frequent cause of this is plugins inadvertently writing log messages to standard output. I'll investigate further to be sure.