node-wot icon indicating copy to clipboard operation
node-wot copied to clipboard

Error when performing observeProperty with binding-coap

Open hidetak opened this issue 1 year ago • 0 comments

The following error occurred. I apologize for the inconvenience and would appreciate your confirmation.

Problem

In binding-coap, when observeProperty is performed on the client side, an error occurs on the server and it stops. The errors that occurred are as follows:

/***/test-node-wot/error-coap-observeProperty/node_modules/@node-wot/binding-coap/dist/coap-server.js:483
                error(`CoapServer on port ${this.port} failed on observe with: ${err.message}`);
                                                                                     ^
TypeError: Cannot read properties of undefined (reading 'message')
    at ObserveWriteStream.<anonymous> (/Users/***/test-node-wot/node_modules/@node-wot/binding-coap/src/coap-server.ts:706:82)
    at ObserveWriteStream.emit (node:events:526:35)
    at ObserveWriteStream.emit (node:domain:488:12)
    at finish (node:internal/streams/writable:937:10)
    at node:internal/streams/writable:918:13
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

environment

  • Mac(Apple siicon)
  • OS: Sonoma 14.1
  • nodejs: v18 or v20
  • node-wot: 0.8.12

Steps to reproduce

  1. get the following code https://github.com/hidetak/test-node-wot/tree/main/error-coap-observeProperty
  2. $ npm install
  3. $ npm run start:server
  4. open new terminal
  5. $ npm run start:client

hidetak avatar Feb 10 '24 16:02 hidetak