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

[Bug]: Unhandled promise rejection #918

Open
3 tasks done
Diginix opened this issue Dec 22, 2023 · 6 comments
Open
3 tasks done

[Bug]: Unhandled promise rejection #918

Diginix opened this issue Dec 22, 2023 · 6 comments
Assignees

Comments

@Diginix
Copy link

Diginix commented Dec 22, 2023

I'm sure that

  • This issue is still present in the current beta version of this adapter
  • There is no other (open) issue with the same topic (used the search)
  • This issue is not described in the adapter documentation / FAQ

Shelly device

No response

Protocol

CoAP / CoIoT

The problem

each instance restart leads to the following log errors. the instance is green and seems to run.

edit: after downgrade to 6.6.1 i get the same error with this version. such log error never exists in all old log files until 9th december with some shelly 6.6.1 restarts.

iobroker.current.log (in debug mode!)

2023-12-22 13:33:18.727 - warn: shelly.0 (1037952) get state error: Connection is closed.
2023-12-22 13:33:18.733 - error: shelly.0 (1037952) 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().
2023-12-22 13:33:18.733 - error: shelly.0 (1037952) unhandled promise rejection: DB closed
2023-12-22 13:33:18.895 - error: shelly.0 (1037952) Error: DB closed
at Redis.sendCommand (/opt/iobroker/node_modules/ioredis/built/redis/index.js:636:24)
at Redis.get (/opt/iobroker/node_modules/ioredis/built/commander.js:122:25)
at StateRedisClient.setState (/opt/iobroker/node_modules/@iobroker/db-states-redis/src/lib/states/statesInRedisClient.ts:726:40)
at Shelly._setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/src/lib/adapter/adapter.ts:7710:33)
2023-12-22 13:33:18.895 - error: shelly.0 (1037952) DB closed

Version of nodejs

18.17.1

Version of ioBroker js-controller

5.0.17

Version of adapter

6.7.0

Copy link

Thanks for reporting a new issue @Diginix!

  1. Please make sure your topic is not covered in the documentation
  2. Ensure that you use the latest beta version (not the current stable version): 6.7.0
  3. Please attach all necessary log files (in debug mode!), screenshots and other information to reproduce this issue
  4. Search for the issue topic in other/closed issues to avoid duplicates!

Otherwise this issue will be closed.

@klein0r
Copy link
Contributor

klein0r commented Dec 22, 2023

Redis? Maybe not enough memory left?

@Diginix
Copy link
Author

Diginix commented Dec 22, 2023

No redis and memory usage of proxmox VM: 86.90% (6.95 GiB of 8.00 GiB)
I can ignore this as long as all is working fine. But as I understand there is a try-catch missing and with this it would be better?

@klein0r
Copy link
Contributor

klein0r commented Dec 22, 2023

This is an issue with the states DB. What should happen if the getState / setState failed? It's not just catching an exception. What happens afterwards if the value is missing.

@Diginix
Copy link
Author

Diginix commented Dec 22, 2023

I have tested some relay switches r/w from iobroker and in Shelly app. All was updated on both sides in realtime.
Seems to be not related to the latest version if it happens also with 6.6.1. So, maybe it is a temporary local thing on my machine.

@Brainbug01
Copy link

Brainbug01 commented Dec 23, 2023

Nach Update auf v6.7.0 im Log:

shelly.0
2023-12-23 09:16:00.433	error	DB closed
shelly.0
2023-12-23 09:16:00.433	error	Error: DB closed at Redis.sendCommand (/opt/iobroker/node_modules/ioredis/built/redis/index.js:636:24) at Redis.get (/opt/iobroker/node_modules/ioredis/built/commander.js:122:25) at StateRedisClient.setState (/opt/iobroker/node_modules/@iobroker/db-states-redis/src/lib/states/statesInRedisClient.ts:726:40) at Shelly._setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/src/lib/adapter/adapter.ts:7710:33)
shelly.0
2023-12-23 09:16:00.306	error	unhandled promise rejection: DB closed

Ist aber nur einmal nach dem Update im Log.

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

No branches or pull requests

3 participants