Plugin error: [proto: cannot parse invalid wire-format data]
- Dominant language
- Go
- Stars
- 2.3k
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Description
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
```sh
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](https://github.com/petermetz/cactus/blob/gnostic-repro-steps-docker-volumes/tools/docker/gnostic/Dockerfile)
```sh
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/
```
Contributor guide
Assessment
This issue has not been assessed yet.