12-19-2023 02:19 PM
When running gRPC template creation utility, the error is generated when encountering
import "google/protobuf/empty.proto";
and similar (e.g. "google/protobuf..." ) imports:
Error 5015 occurred at gRPC Template Creation Utility-release.lvlib:Error 5015.vi
Possible reason(s):
Proto file import - messages ref error
google/protobuf/emtpy.proto: -1 - File not found.
AddressBook.proto: 16 - Import "google/protobuf/emtpy.proto" was not found or had errors.
Win 10, LabView 2023 Q3, gRPC library 1.0.1.1
I've just started learning gRPC, If anybody tried dealing with this issue any and all help is greatly appreciated.
Solved! Go to Solution.
12-19-2023 03:20 PM
Can you share the proto file that you are using for generation? It sounds like it has imports that you don't have on your local machine (or the imports are in the wrong location). Google typically keeps its proto files on github. For example, empty.proto is here.
12-19-2023 03:32 PM
That is probably true and it might be a limitation of the code generator as other tools know how to resolve it. For example, BloomRPC doesn't have any problems loading the AddressBook.proto.
I've created external file 'person.proto' just to make sure LabView can find it from 'AddressBook.proto' and indeed it can. When I add the line: import 'google.protobuf...' it throws an error. Customer gave me a huge .proto file, referencing 20 other proto files each containing several 'imports' of the google types.
12-19-2023 04:01 PM
For measurementlink-labview, we keep the google proto files next to the NI proto files that require them. This allows grpc-labview to find them and import them. https://github.com/ni/measurementlink-labview/tree/main/Source/Protos/google/protobuf
12-19-2023 04:05 PM
Are you downloading them to the local hard drive?
12-19-2023 04:08 PM
When you clone the repo, all of the proto files get synced to the local machine. They don't get synced from google's github repo, though. We keep a copy of the google proto files in our repo.