Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Browse Tags in BACnet device causes a crash #114

Closed
madmax76 opened this issue Mar 4, 2021 · 14 comments
Closed

Browse Tags in BACnet device causes a crash #114

madmax76 opened this issue Mar 4, 2021 · 14 comments
Labels
need investigation need investigation

Comments

@madmax76
Copy link

madmax76 commented Mar 4, 2021

Platform: OSX 11.2.2
Node: v15.10.0
FUXA: v1.0.9

2021-03-04T07:54:31.576Z [ERR] 	'bacnet2' _askName error! Error: ERR_TIMEOUT
    at Timeout._onTimeout (/usr/local/lib/node_modules/@frangoteam/fuxa/_pkg/bacstack/lib/client.js:76:16)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7)
2021-03-04T07:54:31.577Z [ERR] 	UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "undefined".

I have made some pcaps, but I am unable to share them on a public forum. Someone willing and able to help on this?

@unocelli
Copy link
Member

unocelli commented Mar 5, 2021

Hi,
can you tell me if you have the same error also with node v14 or 12?

@matrix926
Copy link

matrix926 commented Mar 7, 2021

Hi,
can you tell me if you have the same error also with node v14 or 12?

node v12.21.0
(node:1297) UnhandledPromiseRejectionWarning: undefined
(node:1297) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:1297) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
2021-03-07T14:54:08.147Z [ERR] 'Bacnet' working (connection || polling) overload!

@madmax76
Copy link
Author

madmax76 commented Mar 9, 2021

@unocelli :

Version: v12.21.0

POST /api/projectData 200 27.081 ms - -
2021-03-09T21:10:45.673Z [ERR] 	'virtualbox' _askName error! Error: ERR_TIMEOUT
    at Timeout._onTimeout (/usr/local/lib/node_modules/@frangoteam/fuxa/_pkg/bacstack/lib/client.js:76:16)
    at listOnTimeout (internal/timers.js:554:17)
    at processTimers (internal/timers.js:497:7)
(node:65659) UnhandledPromiseRejectionWarning: undefined
(node:65659) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:65659) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Version: v14.16.0
With this version getting a bit further, it lists the objects, but while expanding them, the following message appears:

GET /api/plugins 304 9.167 ms - -
2021-03-09T21:19:34.359Z [ERR] 	'virtualbox' working (connection || polling) overload!
2021-03-09T21:19:36.361Z [ERR] 	'virtualbox' working (connection || polling) overload!
2021-03-09T21:19:38.365Z [ERR] 	'virtualbox' working (connection || polling) overload!
2021-03-09T21:19:40.368Z [ERR] 	'virtualbox' working (connection || polling) overload!
2021-03-09T21:19:42.369Z [ERR] 	'virtualbox' working (connection || polling) overload!
2021-03-09T21:19:44.374Z [ERR] 	'virtualbox' working (connection || polling) overload!
2021-03-09T21:19:46.379Z [ERR] 	'virtualbox' working (connection || polling) overload!

It is not crashing, but the overload message keeps repeating itself. Will a pcap help with the investigation?

image

Is using the more recent fork from node-bacstack @ https://github.com/BiancoRoyal/node-bacstack perhaps a better option as a plugin?

unocelli added a commit that referenced this issue Mar 14, 2021
@unocelli
Copy link
Member

Hi,
I think I fixed it.
@madmax76: better options as plugin... you have an idea?

@madmax76
Copy link
Author

@unocelli : The good news: It seems no longer to terminally crash, good work. The bad news, from what I see:

  1. application does a readProperty -> object-name (77)
  2. BACnet device answers -> reject - unrecognized - service (67)
  3. application does not catch the exception of the BACnet not handling the service.
  4. application jumps out of the loop reading the objects.
2021-03-15T07:38:21.986Z [ERR] 	'test' _askName error! Error: BacnetError - Class:5 - Code:67
    at processError (/Users/*****/code/beta-fuxa/FUXA/server/_pkg/bacstack/lib/client.js:96:30)
    at handlePdu (/Users/*****/code/beta-fuxa/FUXA/server/_pkg/bacstack/lib/client.js:309:9)
    at handleNpdu (/Users/*****/code/beta-fuxa/FUXA/server/_pkg/bacstack/lib/client.js:343:5)
    at self.receiveData (/Users/*****/code/beta-fuxa/FUXA/server/_pkg/bacstack/lib/client.js:354:7)
    at Socket.<anonymous> (/Users/*****/code/beta-fuxa/FUXA/server/_pkg/bacstack/lib/transport.js:14:25)
    at Socket.emit (events.js:314:20)
    at UDP.onMessage [as onmessage] (dgram.js:921:8)
(node:34622) UnhandledPromiseRejectionWarning: undefined
(node:34622) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

tested with node versions 10, 12 & 14
alternative bacnet stack: Node-bacstack by BiancoRoyal

@unocelli
Copy link
Member

Hi,
my resources are limited to test it because I don't use BACnet in my devices. I tested with ProtoSense BACnet device simulator where it works and I can't reproduce the error. You know some freeware simulator to better test and reproduce the error ?
I'll try the BiancoRoyal, it looking more popular...Thanks

@madmax76
Copy link
Author

Hi,
my resources are limited to test it because I don't use BACnet in my devices. I tested with ProtoSense BACnet device simulator where it works and I can't reproduce the error. You know some freeware simulator to better test and reproduce the error ?
I'll try the BiancoRoyal, it looking more popular...Thanks

I am using YABE - Yet Another Bacnet Explorer It needs windows, but after installing there is a room-thermostat simulator and two other simulators in c:\Program Files\YABE\Addons.

Thank you for the ProtoSense hint.

unocelli added a commit that referenced this issue Mar 23, 2021
@unocelli
Copy link
Member

@madmax76 Thanks, with the YABE simulator I was able to reproduce the error.
I fixed, the error on browse (askName), I would be grateful if I could confirm me ;)

@madmax76
Copy link
Author

@unocelli Yes, it works now, thank you. Great work, it works really well now and the project is coming alive to me. Continuing with creating some HMI's and then continue with S7 & OPC UA testing.

@Sirezul
Copy link

Sirezul commented Apr 27, 2021

Hi, first of all awesome Project! :)

After adding my bacnet device, I'm also facing crashes while browsing it:

2021-04-27T14:56:46.690Z [ERR]  'test' _askName error! Error: ERR_TIMEOUT
    at Timeout._onTimeout (D:\Projekte\Fuxa\FUXA-1.0.10\server\_pkg\bacstack\lib\client.js:76:16)
    at listOnTimeout (internal/timers.js:551:17)
    at processTimers (internal/timers.js:494:7)
(node:2796) UnhandledPromiseRejectionWarning: undefined
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2796) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:2796) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@unocelli unocelli added the need investigation need investigation label Apr 27, 2021
@unocelli
Copy link
Member

with which version of FUXA are you trying? the last one of master branch? 6b54e46

@Sirezul
Copy link

Sirezul commented May 4, 2021

Hi, sorry for the late reply. I've used the latest release version.
With the fix from this issue. Ah okay your commit was on 23rd March, so this could be my fault😅

@Sirezul
Copy link

Sirezul commented May 4, 2021

Okay It was my fault! 😐 After cloning it new, it works! Thank you.

@unocelli
Copy link
Member

unocelli commented May 4, 2021

@Sirezul Thank you for the feedback.
I'm going to close this as resolved. let me know if you have any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need investigation need investigation
Projects
None yet
Development

No branches or pull requests

4 participants