Skip to main content

Troubleshooting Exploration

This guide provides solutions to common problems encountered when exploring OPC UA address spaces.

No Results Returned

Symptoms:

  • Empty payload
  • No structure returned
  • Undefined or null result

Possible Causes & Solutions:

1. Invalid NodeId

Check:

// Verify NodeId exists
// Use Read node to test NodeId first

Solution:

// Try known nodes first
nodeId: "i=85" // Objects folder (standard)
nodeId: "i=2253" // Server object (standard)
nodeId: "/Server/ServerStatus" // Browse path

2. Wrong Follow Organizes Setting

Problem: Not following the right references

Solution:

// Try both settings
msg.followOrganizes = true; // Include folders
msg.followOrganizes = false; // Only direct children

4. Connection Issues

Check:

  • Endpoint connection status (green indicator)
  • Server is running and accessible
  • Network connectivity

Solution:

  • Deploy the flow
  • Check endpoint configuration
  • Test with Read node first

Too Much Data

Symptoms:

  • Very large output
  • Slow response
  • Memory issues

Possible Causes & Solutions:

1. Exploring Too Broadly

Problem: Starting from root with high depth

Solution:

// Be more specific
// Instead of:
nodeId: "i=85" // Objects folder

// Use:
nodeId: "ns=2;s=Equipment.Reactor1" // Specific equipment

2. Not Excluding Empty Nodes

Problem: Output includes many empty folders

Solution:

msg.excludeEmpty = true;

3. Following All References

Problem: Following too many reference types

Solution:

msg.followOrganizes = false;  // Limit to direct children

Missing Variables

Symptoms:

  • Expected variables not in output
  • Incomplete structure
  • Some branches missing

Possible Causes & Solutions:

1. Not Following Organizes

Solution:

msg.followOrganizes = true;

2. Permission Issues

Check:

  • User has read permissions
  • Variables are accessible

Solution:

  • Check server security settings
  • Use appropriate credentials
  • Contact server administrator

Incorrect Output Format

Symptoms:

  • Getting NodeIds instead of values
  • Getting values instead of NodeIds
  • Unexpected output type

Solution:

// Verify outputType
msg.outputType = "Value"; // For values
msg.outputType = "NodeId"; // For NodeIds
msg.outputType = "DataValue"; // For metadata

// Check message vs configuration
// msg.outputType takes priority over node configuration

Performance Issues

Symptoms:

  • Slow exploration
  • Timeouts
  • High memory usage

Solutions:

1. Reduce Scope

// Explore smaller subtrees using specific NodeIds
msg.nodeId = "ns=2;s=Equipment.Reactor1";
msg.excludeEmpty = true;

2. Cache Results

// Don't explore repeatedly
const cached = flow.get('structure_cache');
if (cached) {
msg.payload = cached;
return msg;
}

3. Use Specific NodeId

// Instead of exploring from root
// Explore specific equipment
nodeId: "ns=2;s=Equipment.Reactor1"

Empty Subtree

Symptoms:

  • Structure has no leaf values
  • All values are empty objects

Possible Causes:

1. Wrong Output Type

Check: May be using NodeId output on a folder with no variables

Solution:

// Try different output type
msg.outputType = "Value";

2. No Variables in Subtree

Check: The explored node may only contain folders

Solution:

// Explore a child node or try followOrganizes
msg.followOrganizes = true;

Error Messages

"Cannot read properties of undefined"

Cause: Trying to access non-existent structure

Solution:

// Add validation
if (msg.payload && Object.keys(msg.payload).length > 0) {
// Process payload
} else {
node.error("No data returned from exploration");
}

"Maximum call stack size exceeded"

Cause: Circular references or very large structure

Solution:

// Use more specific NodeId
msg.nodeId = "ns=2;s=Equipment.SpecificDevice";

"Timeout"

Cause: Server taking too long to respond

Solution:

  • Reduce exploration scope
  • Increase timeout in endpoint configuration
  • Check server performance

Next Steps

See Also