View Issue Details

IDProjectCategoryView StatusLast Update
0005576Compliance Test Tool (CTT) Unified Architecture1 - Script Issuepublic2020-06-03 17:43
ReporterAdrian Scholl Assigned ToSebastian Allmendinger  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformDesktopOSWindows 10 x64OS Version1909
Product Version1.03.341.390 
Fixed in Version1.03.341.396 
Summary0005576: Exception in many initialize.js if a server returns multiple endpoints with security policy none.
Description

There is an exception in many initialize.js if an OPC UA server returns multiple endpoints with security policy none. The bug is illustrated with "Base Info Core Structure/001.js". Within the initialize.js (line 18) the script tries to get the endpoint with security policy none. This is done by a call to UaEndpointDescription.Find. This call returns a list of endpoints in this case. If the server returns only one matching endpoint the endpoint is returned directly by this function.

The subsequent check of the UserIdentityToken (line 23) expects a single endpoint, not a list. If the function returned a list there is a type mismatch and the script generates an exception.

The the applied patch is more a first idea. I do not know which side effects are generated by this change.

Steps To Reproduce

Use an OPC UA server that returns multiple endpoints with security policy none, Configure an OPC UA server to have multiple enpoints with security policy none.
Configure the CTT to connect to this server
Run e.g. Base Info Core Structure/001.js
-> Exception in initialize.js. Subsequent faults in 001.js

TagsNo tags attached.
Attached Files
Error.png (31,234 bytes)   
Error.png (31,234 bytes)   
UaE.js.patch (413 bytes)   
Index: UaE.js
===================================================================
--- UaE.js	(revision 34096)
+++ UaE.js	(working copy)
@@ -103,7 +103,7 @@
     
     if( matches.length !== undefined && matches.length == 1 ) return( matches[0] );
     if ( matches.length < 1 ) return( null );
-    else return( matches );
+    else return( matches[0] );
 }
 
 UaEventFilter.New = function( args ) {
UaE.js.patch (413 bytes)   
Files Affected

Activities

Sebastian Allmendinger

2020-04-23 07:41

developer   ~0011975

The issue was reproducable. Because the function is used in several places we decided to enhance the function itself. A new parameter 'ReturnAll', which is set to false by default, has been introduced.
If ReturnAll is not set to true when calling the function, the function returns one endpoint. That's exactly the expectation in the exisiting test scripts.
We decided to introduce this parameter because there might be use cases when we want to receive all existing endpoints which match the criteria.

Paul Hunkar

2020-06-03 17:43

administrator   ~0012177

reviewed in CMP Call

Issue History

Date Modified Username Field Change
2020-04-09 05:10 Adrian Scholl New Issue
2020-04-09 05:10 Adrian Scholl File Added: Error.png
2020-04-09 05:10 Adrian Scholl File Added: UaE.js.patch
2020-04-10 15:17 Paul Hunkar Assigned To => Alexander Allmendinger
2020-04-10 15:17 Paul Hunkar Status new => assigned
2020-04-23 07:41 Sebastian Allmendinger Assigned To Alexander Allmendinger => Sebastian Allmendinger
2020-04-23 07:41 Sebastian Allmendinger Status assigned => resolved
2020-04-23 07:41 Sebastian Allmendinger Resolution open => fixed
2020-04-23 07:41 Sebastian Allmendinger Fixed in Version => 1.03.341.396
2020-04-23 07:41 Sebastian Allmendinger Note Added: 0011975
2020-06-03 17:43 Paul Hunkar Status resolved => closed
2020-06-03 17:43 Paul Hunkar Note Added: 0012177