Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to create new object. #340

Open
arevh opened this issue Jan 17, 2024 · 1 comment
Open

Unable to create new object. #340

arevh opened this issue Jan 17, 2024 · 1 comment

Comments

@arevh
Copy link

arevh commented Jan 17, 2024

When more than one proto files are provided to the gRPC Template Creation Utility, which both include the same imported file, the Utility is not being able to build the library and stops its execution with the following error.

LabVIEW: (Hex 0x425) Unable to create new object.

Is this a bug, or should I provide the imported files some other way, then mentioning them in the proto files?

The files are imported as follows:

import "common.proto";
import "error.proto";

All imported files are located in the same directory as main proto files, and the utility is able to read them.

AB#2626689

@StefanCals
Copy link

I'm currently having the same problem.
I would like to elaborate on this issue so that hopefully it gets fixed soon.

For example :

common.proto

message Response {
	string response = 1;
}

messenger.proto

import "common.proto"

service Messenger { 
	rpc SendMessage(Request) returns (Response);
}

message Request {
	string request = 1;
}

greeter.proto

import "common.proto"

service Greeter { 
	rpc SendGreeting(Greeting) returns (Response);
}

message Greeting {
	string greeting = 1;
}

Both the messenger.proto and greeter.proto use the Response message.

Using the gRPC Template Creation Utility :

  • I can script messenger.proto separately SUCCESFULLY.
  • I can script greeter.proto separately SUCCESFULLY.
  • I cannot script both the messenger.proto and greeter.proto together.
    could it be that the scripting is done sequentially and the Request TypeDef is made for the 1st proto file, and then when trying to make that same TypeDef (with same name) for the 2nd proto file, it cannot at it to the Library (because there already exists a TypeDef with the same name)?

These used-case (multiple proto files that use the same common.proto) is not uncommon when using gRPC in other lanuages like for example C#.
So hopefully this can be fixed in the future.
Could anyone tell me if this is on the roadmap to be fixed soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants