我正在使用节点 OPC-UA 客户端并收到以下错误
Error: cannot coerce value=4 to Enum
at _decode_enumeration (/Users/xxx/apps/node-opcua-sample/node_modules/node-opcua-factory/src/factories_enumerations.js:52:23)
at UserTokenPolicy.decode (/Users/xxx/apps/node-opcua-sample/node_modules/node-opcua-service-endpoints/_generated_/_auto_generated_UserTokenPolicy.js:139:22)
at /Users/xxx/apps/node-opcua-sample/node_modules/node-opcua-service-endpoints/_generated_/_auto_generated_EndpointDescription.js:181:12
at exports.decodeArray (/Users/xxx/apps/node-opcua-sample/node_modules/node-opcua-basic-types/src/array.js:40:18)
at EndpointDescription.decode (/Users/xxx/apps/node-opcua-sample/node_modules/node-opcua-service-endpoints/_generated_/_auto_generated_EndpointDescription.js:179:31)
at /Users/xxx/apps/node-opcua-sample/node_modules/node-opcua-service-endpoints/_generated_/_auto_generated_GetEndpointsResponse.js:105:12
at exports.decodeArray (/Users/xxx/apps/node-opcua-sample/node_modules/node-opcua-basic-types/src/array.js:40:18)
at GetEndpointsResponse.decode (/Users/xxx/apps/node-opcua-sample/node_modules/node-opcua-service-endpoints/_generated_/_auto_generated_GetEndpointsResponse.js:103:22)
at MessageBuilder._safe_decode_message_body (/Users/xxx/apps/node-opcua-sample/node_modules/node-opcua-secure-channel/src/message_builder.js:403:20)
at MessageBuilder._decode_message_body (/Users/xxx/apps/node-opcua-sample/node_modules/node-opcua-secure-channel/src/message_builder.js:450:18)
我一直在将此 opc UCA ( https://github.com/node-opcua/node-opcua ) 用于其他 ocpUA 服务器,它们工作正常。
UserTokenPolicy 令牌似乎有问题,但它不是应该默认匿名登录吗?可能是什么其他问题?
请注意,它适用于 prosys opcua 客户端。