DataValue {
value: Variant { dataType: 0, arrayType: 0, value: null, dimensions: null },
statusCode: ConstantStatusCode {
_value: 2150957056,
_description: 'The attribute is not supported for the specified Node.',
_name: 'BadAttributeIdInvalid'
},
sourceTimestamp: null,
sourcePicoseconds: 0,
serverTimestamp: 2022-08-26T15:21:08.710Z {
high_low: [ 30980447, 2006644838 ],
picoseconds: 615000000
},
serverPicoseconds: 615000000
}
DataValue {
value: Variant { dataType: 0, arrayType: 0, value: null, dimensions: null },
statusCode: ConstantStatusCode {
_value: 2150957056,
_description: 'The attribute is not supported for the specified Node.',
_name: 'BadAttributeIdInvalid'
},
sourceTimestamp: null,
sourcePicoseconds: 0,
serverTimestamp: 2022-08-26T15:22:15.452Z {
high_low: [ 30980447, -1620898998 ],
picoseconds: 961000000
},
serverPicoseconds: 961000000
}
Me again. I have a set of nodeset.xml files that I have exported from UAExpert. I am trying to set up my own server in node-opcua using the following code.
(async () => {
const server = new OPCUAServer({
port: Number(process.env.SERVER_PORT) || 4840,
nodeset_filename: [
'./nodesets/nodeset_0.xml',
'./nodesets/nodeset_1.xml',
'./nodesets/nodeset_2.xml',
'./nodesets/nodeset_3.xml',
'./nodesets/nodeset_4.xml',
'./nodesets/nodeset_5.xml',
'./nodesets/nodeset_6.xml'
]
});
await server.initialize();
const endpoint = server.endpoints[0].endpointDescriptions()[0].endpointUrl;
console.log(`OpcUA Server: ${endpoint}`);
await server.start();
})();
but I get this error...
TypeError: Cannot read properties of null (reading 'objects')
at prepareServerDiagnostics (/home/simon/Projects/portal-api/node_modules/node-opcua-server/source/server_engine.ts:1180:47)
at /home/simon/Projects/portal-api/node_modules/node-opcua-server/source/server_engine.ts:1242:13
at __node_internal_ (node:util:281:10)
at processTicksAndRejections (node:internal/process/task_queues:83:21)
How am I being stupid?
14:53:03.306Z :generateAddressSpaceRaw :32 generateAddressSpace: Loading xml file ./nodesets/nodeset_4.xml failed with error String cannot be coerced to a nodeId : BrAccessRightsDataType
const endpoint = server.endpoints[0].endpointDescriptions()[0].endpointUrl;
you can now use this as a short cut const endpoint = server.getEndpointUrl();
Hello guys :) tried to find the answer to this question online - but sadly i did not find it :(
I created a server with :
` allowAnonymous: false,
securityPolicies: [SecurityPolicy.Basic256Sha256],`
User/PW: abc/123
So i tried to connect : Via
None Anonymous - Like expected did not work
Basic256Sha256 Anonymous - Like expected did not work
Basic256Sha256 abc/123 - Like expected did work
But now i tried :
None abc/123 - And i got logged in - expected it to NOT work
What is happening here ?