Rocket.Chat
Rocket.Chat copied to clipboard
Can't play custom sound in 5.0.1-5.0.2 version [Error: Exception while invoking method uploadCustomSound]
Description: Can't play custom sound in 5.0.1-5.0.2 version
Steps to reproduce:
- Upload custom sound file
- Play sound
Expected behavior: Any client can play the custom sound and select custom sound.
Actual behavior: Any client select custom sound can't play, admin page can upload but can't play too.
Server Setup Information:
- Version of Rocket.Chat Server: 5.0.2
- Operating System: Debain 11
- Deployment Method: Rocketchatctl
- Number of Running Instances: 1
- NodeJS Version: 14.19.3 - x64
- MongoDB Version: 5.0.10
- MongoDB Engine: wiredTiger
- Platform: linux
- Process Port: 3000
- Site URL: https://website.com (Nginx SSL reverse proxy with Port 443)
- ReplicaSet OpLog: Enabled
Client Setup Information
- Desktop App or Browser Version:
- iOS: 4.29.0.34197
- Android: 4.29.0.34199
- PC: 3.8.7
- Operating System:
- iOS: 15.3.1
- Android: 12
- PC: Windows 11 22H2
Additional context
I've tried putting files into channels and private chats and it can play for anyone (except iOS devices ref: #26500) So the problem should not be about the audio file.
Relevant logs:
Error channel notifications
Exception while invoking method uploadCustomSound
TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received an instance of Timeout
Exception in callback of async function:
TypeError [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "Content-Type"
Admin panel logs
{"level":50,"time":"2022-08-09T12:40:00.504Z","pid":3073,"hostname":"RocketChat-HK","name":"System","msg":"Exception while invoking method uploadCustomSound 'The \"listener\" argument must be of type function. Received an instance of Timeout'"}
I20220809-20:40:01.037(8) Version 9 of Highlight.js has reached EOL and is no longer supported. Please upgrade or ask whatever dependency you are using to upgrade. https://github.com/highlightjs/highlight.js/issues/2877
I20220809-20:40:01.091(8) Exception in callback of async function: TypeError [ERR_HTTP_INVALID_HEADER_VALUE] [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "Content-Type" at ServerResponse.setHeader (_http_outgoing.js:564:3) at app/custom-sounds/server/startup/custom-sounds.js:78:8 at runWithEnvironment (packages/meteor.js:1320:24) at packages/meteor.js:1333:14 at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 { code: 'ERR_HTTP_INVALID_HEADER_VALUE' }
I20220809-20:40:01.453(8) Exception in callback of async function: TypeError [ERR_HTTP_INVALID_HEADER_VALUE] [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "Content-Type" at ServerResponse.setHeader (_http_outgoing.js:564:3) at app/custom-sounds/server/startup/custom-sounds.js:78:8 at runWithEnvironment (packages/meteor.js:1320:24) at packages/meteor.js:1333:14 at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 { code: 'ERR_HTTP_INVALID_HEADER_VALUE' }
I20220809-20:40:21.012(8) Exception in callback of async function: TypeError [ERR_HTTP_INVALID_HEADER_VALUE] [ERR_HTTP_INVALID_HEADER_VALUE]: Invalid value "undefined" for header "Content-Type" at ServerResponse.setHeader (_http_outgoing.js:564:3) at app/custom-sounds/server/startup/custom-sounds.js:78:8 at runWithEnvironment (packages/meteor.js:1320:24) at packages/meteor.js:1333:14 at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 { code: 'ERR_HTTP_INVALID_HEADER_VALUE' }