Jey-Cee / ioBroker.net-tools

ioBroker network tools for ping, wake-on-lan and port scan.
Other
3 stars 3 forks source link

[Bug]: Adapter crashes if a device is in a different ip subnet than the iobroker #16

Closed mrstackit closed 2 years ago

mrstackit commented 2 years ago

Contact Details

No response

What happened?

I have many subnets in my network. When i will ad a device in a other ip subnet as iobroker then the adapter is crash with this report:

host.IOB01 | 2022-04-10 13:18:27.739 | warn | Do not restart adapter system.adapter.net-tools.0 because restart loop detected -- | -- | -- | -- host.IOB01 | 2022-04-10 13:18:27.739 | info | Restart adapter system.adapter.net-tools.0 because enabled host.IOB01 | 2022-04-10 13:18:27.738 | error | instance system.adapter.net-tools.0 terminated with code 6 (UNCAUGHT_EXCEPTION) net-tools.0 | 2022-04-10 13:18:27.206 | warn | Terminated (UNCAUGHT_EXCEPTION): Without reason net-tools.0 | 2022-04-10 13:18:27.206 | info | terminating net-tools.0 | 2022-04-10 13:18:26.704 | error | Cannot read properties of undefined (reading 'toLowerCase') net-tools.0 | 2022-04-10 13:18:26.704 | error | TypeError: Cannot read properties of undefined (reading 'toLowerCase') at addDevice (/opt/iobroker/node_modules/iobroker.net-tools/main.js:283:19) at async processMessage (/opt/iobroker/node_modules/iobroker.net-tools/main.js:93:13) net-tools.0 | 2022-04-10 13:18:26.704 | error | unhandled promise rejection: Cannot read properties of undefined (reading 'toLowerCase') net-tools.0 | 2022-04-10 13:18:26.703 | error | 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().

Adapter Version

0.1.7

JS-Controller Version

4.0.21

Node JS Version

16.14.0

NPM Version

8.5.0

Operating System

Debian

Relevant log output

No response

Anything else?

No response

Jey-Cee commented 2 years ago

You have to enter the MAC for the device, this should prevent the crash.

Jey-Cee commented 2 years ago

Is the same as #11

Jey-Cee commented 2 years ago

Please test the new version, 0.2.0.