Dhamma-Sobhana / gong

System for playing gong sounds in multiple locations.
MIT License
4 stars 1 forks source link

PARequest timed out. #10

Closed gotling closed 9 months ago

gotling commented 1 year ago

This error has been seen in both the production and staging environment.

I suspect it has to do with the volume control that sets volume to 50% when playing the first gong and raises it to 100% for subsequent ones. It is done by a library in the player container that talks to PulseAudio in the audio container over the pulse socket. It seems to loose connection and is not able to restore it.

Effect seams to be that volume is not adjusted up and down when playing.

Library https://github.com/balena-io-modules/balena-audio

Stack trace https://dhamma-sobhana-f7a823593.sentry.io/share/issue/32bd5d2b3ecb4e1fb337d6ce942c854b/

[player] Playing in locations 'all'
2023-10-30T17:18:05+01:00  player  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:
2023-10-30T17:18:05+01:00  player  Error: PARequest timed out.
2023-10-30T17:18:05+01:00  player      at Timeout._onTimeout (/usr/src/app/node_modules/@tmigone/pulseaudio/build/request.js:15:28)
2023-10-30T17:18:05+01:00  player      at listOnTimeout (node:internal/timers:559:17)
2023-10-30T17:18:05+01:00  player      at processTimers (node:internal/timers:502:7)
2023-10-30T17:18:10+01:00  player  [player] Stopping playback
gotling commented 9 months ago

This issue has not been seen since the bug was reported. Hopefully it was solved by testing connection to Audio block before volume call as well as setting subToEvents to false when instantiating the Audio block.

See commit: https://github.com/Dhamma-Sobhana/gong/commit/2f1674f2c629eb3bcc6b7328aa75a60193463ec4

Reopen this issue if problem reappears.