eclipse-thingweb / eclipse-thingweb/node-wot

Error when performing observeProperty with binding-coap

Open
#1,233 0 comments 0 reactions 1 assignee Claimed by @JKRhb View on GitHub
binding-coap bug
Dominant language
TypeScript
Stars
192
Forks
100
Avg merge
4d 4h
Merged PRs (30d)
8

Description

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. (/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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.