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

Error in Log #299

Closed
skroob opened this issue Oct 4, 2023 · 8 comments
Closed

Error in Log #299

skroob opened this issue Oct 4, 2023 · 8 comments

Comments

@skroob
Copy link

skroob commented Oct 4, 2023

Describe the bug
Somtimes I found an error in the logs

To Reproduce
I have nothing found to reproduce.

Expected behavior
Mostly once a day I get this error message in the log. The Heos 5 is started via a blokly script with the command "play" and volume "17". This seems to be where the error occurs. But unfortunately not always. My IoBroker is shuting down at night so that a backup of the VM (Bookworm) can be created. I have recently updated to js-controller 5.12 and since then this error message. The adapter reconnected after the message then works normally until the next day.

Screenshots & Logfiles

2023-10-04 05:33:41.841 - error: heos.0 (798) 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-10-04 05:33:41.841 - error: heos.0 (798) unhandled promise rejection: undefined is not a valid state value
2023-10-04 05:33:41.842 - error: heos.0 (798) Error: undefined is not a valid state value
at Object.maybeCallbackWithError (/opt/iobroker/node_modules/@iobroker/js-controller-common/build/lib/common/maybeCallback.js:35:17)
at Heos._setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5439:49)
at Heos.setState (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/lib/adapter/adapter.js:5400:21)
at HeosPlayer.parseResponse (/opt/iobroker/node_modules/iobroker.heos/lib/heos-player.js:1826:21)
at Heos.parseResponse (/opt/iobroker/node_modules/iobroker.heos/main.js:1814:17)
at Heos.onData (/opt/iobroker/node_modules/iobroker.heos/main.js:749:14)
at Socket. (/opt/iobroker/node_modules/iobroker.heos/main.js:2442:45)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:335:12)
at readableAddChunk (node:internal/streams/readable:308:9)
at Readable.push (node:internal/streams/readable:245:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
2023-10-04 05:33:41.843 - error: heos.0 (798) undefined is not a valid state value
2023-10-04 05:33:41.843 - info: heos.0 (798) disconnecting from HEOS ...
2023-10-04 05:33:41.844 - info: heos.0 (798) [Buero - Heos 5] disconnect HEOS player Buero - Heos 5 (141082291)
2023-10-04 05:33:41.981 - info: heos.0 (798) [Denon AVR-X4400H] disconnect HEOS player Denon AVR-X4400H (347439546)
2023-10-04 05:33:42.121 - info: heos.0 (798) [Kueche - Heos 5] disconnect HEOS player Kueche - Heos 5 (1570209935)
2023-10-04 05:33:42.214 - info: heos.0 (798) [Garage - Heos 1] disconnect HEOS player Garage - Heos 1 (-175607758)
2023-10-04 05:33:42.305 - info: heos.0 (798) [Dachboden - Heos 1] disconnect HEOS player Dachboden - Heos 1 (-1801497287)
2023-10-04 05:33:42.343 - info: heos.0 (798) terminating
2023-10-04 05:33:42.343 - warn: heos.0 (798) Terminated (UNCAUGHT_EXCEPTION): Without reason
2023-10-04 05:33:42.489 - info: heos.0 (798) disconnected from HEOS
2023-10-04 05:33:42.859 - error: host.ioBroker-MA instance system.adapter.heos.0 terminated with code 6 (UNCAUGHT_EXCEPTION)
2023-10-04 05:33:42.859 - info: host.ioBroker-MA Restart adapter system.adapter.heos.0 because enabled

Versions:

  • Adapter version: 2.1.0
  • JS-Controller version: 5.12
  • Node version: 9.8.1 / 18.18.0
  • Operating system: Proxmox VM debian (bookworm)
@withstu
Copy link
Owner

withstu commented Oct 6, 2023

The error appears in the following lines. So it seams that the HEOS player is answering with unexpected data. It says that the type of the media is "station", however the payload does not contain the station name. What kind of media source are you using? Is it just TuneIn radio? Maybe I need to add an extra check, if the station is defined, however I want to understand the root cause first and maybe track the logs on my side.
https://github.com/withstu/ioBroker.heos/blob/6550d821961ad68e4ac1da507f5447e6d90ea7b1/lib/heos-player.js#L1825C10-L1827C11

@skroob
Copy link
Author

skroob commented Oct 6, 2023

Yes your are right, it is a radio station named "Radio Zürisee 107.4 (Adult Hits)". In my heos app is the station saved in preset 1. I start playing with a vis button and set the state point to "play". Thank yo for your support.

withstu pushed a commit that referenced this issue Oct 8, 2023
withstu pushed a commit that referenced this issue Oct 8, 2023
withstu pushed a commit that referenced this issue Oct 8, 2023
@skroob
Copy link
Author

skroob commented Jan 1, 2024

Hi withstu,

Thank you for adding the check. It working now for 2 months without any problems.
A few days ago I updated to the latest npm / nodejs (NPM: 10.2.3 / Node.js:20.10.0). And now has the adapter a problem with my AVR. One warning spams my log (see picture).

2024-01-01_102707

Only the switching off the AVR does not function any others executed normally. And the warning that spams the log.

Settings:
2024-01-01_102908
2024-01-01_102821

2024-01-01_102855

Thank you for your support and I wish you a happy new year!

withstu pushed a commit that referenced this issue Jan 6, 2024
* (withstu) update dependencies
* (withstu) add admin 5 UI support
* (withstu) improve preferred IP handling
* (withstu) improve undefined station handling #299
* (withstu) reduce upnp requests
@withstu
Copy link
Owner

withstu commented Jan 6, 2024

Happy new year. I've just released a new version, which is reducing the upnp requests to the devices. Can you give it a try?

@skroob
Copy link
Author

skroob commented Jan 7, 2024

Hello withstu,

Thanks for the support. I have tried, but the adapter still has the same problem.

2024-01-07_101052

Then I roll back to the v18.19.0 and everyting is fine.

2024-01-07_102121

For your info, I have also the Denon-Adapter installed. He has no problem with both versions. Give me a short feedback, when I can do somthing.

Thanks and have a nice day!

@skroob
Copy link
Author

skroob commented Jan 7, 2024

I forgot, only the AVR has this problem, the other HEOS devices function without problem.

withstu pushed a commit that referenced this issue Jan 14, 2024
@withstu
Copy link
Owner

withstu commented Jan 14, 2024

This is a known bug in node 19+. By now it has not been fixed in all dependencies e.g. axios. I've just added a workaround to the code.

@withstu withstu closed this as completed Jan 14, 2024
withstu pushed a commit that referenced this issue Jan 14, 2024
* (withstu) add workaround for node 19+ ECONNRESET bug #299
@skroob
Copy link
Author

skroob commented Jan 19, 2024

Hi withstu,
Thank's for fixing this. After few days testing, I don't have any errors and everything working fine.

have a nice day

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

2 participants