RocketChat / RocketChat/Rocket.Chat
Custom sounds won't play if used custom-sound folder on rocket chat.
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Rocket chat server 3.15.0
node v12.22.1
db version v4.0.23
OS: CentOS Linux 7 (Core)
Built-in sounds work fine.
Permit: drwxr-xr-x 2 rocketchat rocketchat 4,0K jun 18 15:50 UserSounds
Error when try to listen:
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:533:3) at ServerResponse.res.setHeader (/home/rocketchat/RocketChatServer/programs/server/npm/node_modules/meteor/simple_json-routes/node_modules/connect/lib/patch.js:132:22) at app/custom-sounds/server/startup/custom-sounds.js:75:7 at runWithEnvironment (packages/meteor.js:1286:24) at packages/meteor.js:1299:14 at /home/rocketchat/RocketChatServer/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 { code: 'ERR_HTTP_INVALID_HEADER_VALUE' }
The emoji are okay.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with app/custom-sounds/server/startup/custom-sounds.js around line 75 and reproduce the failure by trying to listen to a sound from the custom-sound folder. Compare this path with the working built-in sounds and verify that custom sounds return a valid Content-Type and play without the ERR_HTTP_INVALID_HEADER_VALUE error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100