BUG: API parse error: Error: ENOENT: no such file or directory, open '/tmp/google/api/field_behavior.proto'

1,303 views
Skip to first unread message

Diego Baldi

unread,
Oct 11, 2019, 3:32:27 AM10/11/19
to Google Cloud Endpoints
Hi all,

I'm trying to upload an API (GRPC + REST) descriptor to cloud endpoints but I'm getting the following error:
API parse error: Error: ENOENT: no such file or directory, open '/tmp/google/api/field_behavior.proto'

I'm using some field / method options from google (I don't know if the bug is related to "beta" state of some protobuf definitions): https://github.com/googleapis/googleapis/tree/master/google/api

To create the descriptor I'm using the following command:
protoc  service.proto --proto_path=api/proto --proto_path=third_party --include_source_info --include_imports --descriptor_set_out=descriptor.pb


In particular I'm getting the same error if I import the following packages (all other imports work fine):
import "google/api/field_behavior.proto";
import "google/protobuf/field_mask.proto";

Thank you.

Best Regards,
Diego

Wayne Zhang

unread,
Oct 21, 2019, 5:19:33 PM10/21/19
to Google Cloud Endpoints
You can try to play with the flag "--proto_path".  Try to point to the path where your local folder for github googleapis repo. "protoc" is very dumb on finding the import paths. 
Reply all
Reply to author
Forward
0 new messages