You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There seems to be an issue with the gRPC API wrapper in the latest version of CORE. More specifically, on the method that serializes Node objects to Protobuf.
The nodes wouldn't be correctly instantiated, so the sessions created via the gRPC API would be left hanging in the DEFINTION of CONFIGURATION states and didn't have links correctly set up. When following the CORE tutorials, I quickly faced this issue, and wasn' t able to run either the snippets online, or the available file examples.
To Reproduce
Steps to reproduce the behavior:
Install CORE v9.0.2 from source on an Ubuntu 20.04
Expected behavior
Being able to run the example scripts and create sessions via the gRPC API -- the Python API was working flawlessly.
Screenshots
The first bug, when trying to serialize the node type to Protobuf:
Since the node type is an enum/integer, there no need for the .value method, so I dropped it and got a second error:
Weirdly enough, the Position object type should have a .to_proto method , but it wasn't being called. So I ... dropped the .to_proto(), et voila, everything working. I could verify this by opening the CORE GUI and being able to load the sessions created via gRPC:
I tested it with different Node types and positions... and everything seems to work perfectly. And without the aforementioned modifications, the sessions wouldn't be configured properly, the links between nodes wouldn't be correctly set up, and the sessions would be left in the DEFINITION or CONFIGURATION state. Whereas after my modifications, the gRPC API was able to start everything correctly and proceed to RUNTIME.
Desktop (please complete the following information):
OS: Ubuntu Server 20.04.5 LTS (cloud image)
CORE Version 9.0.2
EMANE Version 1.3.3
Additional context
You can find the diff of my changes here. If the CORE team confirms this is an issue, I can submit a PR with the fixes.
The text was updated successfully, but these errors were encountered:
After testing other functions of CORE, it looks like the change in my previous comment does fix the gRPC API from Python, but then it breaks the CORE GUI. So please disregard it!
After investigating this matter a little more, it looks like the root cause of the problem were the gRPC examples incorrectly loading certain data classes and enums from the core_pb2 instead of the gRPC wrappers:
This import from NodeType and Position from the core_pb2 seem to evaluate the NodeType as an integer instead of an enum, and the Position as something that doesn't have the .to_proto method defined -- leading to the errors in my previous comment.
In short, gRPC API examples are not consistent, and over half of them will lead to the errors I found, due to the incorrect import of objects from the serialized protobuf object definition instead of the gRPC wrappers.
If the maintainers confirm this is a problem, I can submit fixes for both the GitHub.IO page and file examples.
Describe the bug
There seems to be an issue with the gRPC API wrapper in the latest version of CORE. More specifically, on the method that serializes Node objects to Protobuf.
The nodes wouldn't be correctly instantiated, so the sessions created via the gRPC API would be left hanging in the DEFINTION of CONFIGURATION states and didn't have links correctly set up. When following the CORE tutorials, I quickly faced this issue, and wasn' t able to run either the snippets online, or the available file examples.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Being able to run the example scripts and create sessions via the gRPC API -- the Python API was working flawlessly.
Screenshots
The first bug, when trying to serialize the node type to Protobuf:
Since the node type is an enum/integer, there no need for the .value method, so I dropped it and got a second error:
Weirdly enough, the Position object type should have a .to_proto method , but it wasn't being called. So I ... dropped the .to_proto(), et voila, everything working. I could verify this by opening the CORE GUI and being able to load the sessions created via gRPC:
I tested it with different Node types and positions... and everything seems to work perfectly. And without the aforementioned modifications, the sessions wouldn't be configured properly, the links between nodes wouldn't be correctly set up, and the sessions would be left in the DEFINITION or CONFIGURATION state. Whereas after my modifications, the gRPC API was able to start everything correctly and proceed to RUNTIME.
Desktop (please complete the following information):
Additional context
You can find the diff of my changes here. If the CORE team confirms this is an issue, I can submit a PR with the fixes.
The text was updated successfully, but these errors were encountered: