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

Loading enums from nodeset.xml files does not work for enums with negative values #937

Closed
Magnulas opened this issue Jan 19, 2021 · 2 comments
Labels
bug Fixed: requesting verification The bug has been resolved and is expecting extra validation by the community t

Comments

@Magnulas
Copy link

Current behavior

When loading a nodeset from a xml file, and the xml file contains a enum with negative values a error will be thrown, saying "Error: Invalid Extension Object". See attached project/zip for a example of the error.

Describe the bug

In part 6 of the OPC UA specification, section 5.2.4, enumrations are defined as Int32 values:

Enumerations are encoded as Int32 values.

As such it should be able to handle negative values up to -2147483648.

To Reproduce

Load a nodeset xml with a enum which has a value in the range [-2147483648,-1]. See attached project/zip for a running example.

Expected behavior

The nodeset should load successfully, as negative values in the range [-2147483648,-1] should be allowed according to the OPC UA specification.

Gist
node-opcua does not handle enumerations as Int32 values, but instead as UInt32, when the enum definition is loaded from a nodeset xml file

  • ( ) my request is related to node-opcua acting as an OPCUA CLIENT

  • (X ) my request is related to node-opcua acting as an OPCUA SERVER

    • ( ) I have installed node-opcua from source ( using git clone)

    • (X ) I have installed node-opcua as a package ( using npm install )

    • ( ) I am using an application that uses node-opcua

      • ( ) node-red
      • ( ) other : please specify
    • Device: PC

    • OS version: Windows 10

      • (X ) Windows : version : 10.0.18363 Build18363
      • ( ) Linux : version : **_**
      • ( ) MacOs : version : **_**
      • ( ) Raspbian: version : **_**
      • ( ) Other : specify :
  • node-opcua version: :
    2.30.0

  • Node:
    node --version = v14.15.1
    NodeOpcuaError.zip

@erossignon erossignon added the bug label Mar 2, 2021
@erossignon erossignon added the please subscribe to support.sterfive.com for help ( go https://support.sterfive.com for professional support if no answer from community) label Feb 27, 2022
@erossignon erossignon added Fixed: requesting verification The bug has been resolved and is expecting extra validation by the community t and removed please subscribe to support.sterfive.com for help ( go https://support.sterfive.com for professional support if no answer from community) labels Jun 3, 2023
@erossignon
Copy link
Member

was fixed in node-opcua@2.66.0

erossignon added a commit that referenced this issue Jun 3, 2023
erossignon added a commit that referenced this issue Jun 5, 2023
@erossignon
Copy link
Member

definitely fixed and verified in node-opcua@2.104.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixed: requesting verification The bug has been resolved and is expecting extra validation by the community t
Projects
None yet
Development

No branches or pull requests

2 participants