RocketChat / RocketChat/Rocket.Chat
Can't open channel settings because of an exception in msToTimeUnit (invalid timespan)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
When I try to edit the channel settings, an error is displayed. The reason seems to be an invalid timespan in msToTimeUnit. It happens on our new Rocket.Chat 8.7.0 installation and all the channels are affected.
Steps to reproduce:
- Go to an existing channel.
- Open the channel info sidebar.
- Click on Edit (pencil icon).
- Instead of the settings form the error "Something went wrong" is displayed.
Expected behavior:
The channel settings form should appear so the settings can be changed.
Actual behavior:
An error is displayed and the console shows:
So there seems to be a problem with msToTimeUnit (invalid timespan) in convertTimeUnit.ts, used by EditRoomInfo.tsx.
Server Setup Information:
- Version of Rocket.Chat Server: 8.7.0
- License Type: Community
- Number of Users: 2
- Operating System: Linux
- Deployment Method: Docker
- Number of Running Instances: 1
- DB Replicaset Oplog:
- NodeJS Version: v22.22.3
- MongoDB Version: 8.0.28
Client Setup Information
- Desktop App or Browser Version: Chromium 151.0.7922.71 and Firefox 140.13.0esr
- Operating System: Debian GNU/Linux 12
Relevant logs:
From browser console (see also screenshot above):
Error: msToTimeUnit - invalid timespan:63072000000.0
o /client/lib/convertTimeUnit.ts:1
module /client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx:1
React 15
l5
o_
oq
iw
ik
ik
ii
iZ
iq
iY
iW
iW
iu
a5
a6
onClickEdit /client/views/room/contextualBar/Info/RoomInfoRouter.tsx:1
React 11
i6
st
nE
st
cd
cc
sn
i9
se
se
createRoot
module /client/startup/appRoot.tsx:1
s https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:375
g https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:5
require https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:5
require https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:7
i https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:7
module /client/startup/index.ts:1
s https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:375
g https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:5
require https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:5
require https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:7
i https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:7
dynamicImport https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:375
promise callback*client.js/s.prototype.dynamicImport https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:375
ts https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:520
promise callback*main.ts https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:520
g https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:5
require https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:5
require https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:7
n https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:5
<anonymous> https://chat.example.com/bb09ac2e5f6f33ebed8513db7fa126a54a92e629.js?meteor_js_resource=true:520
/node_modules/react-dom/cjs/react-dom-client.production.js:1:68112
React 200
od
oh
callback
lF
lD
o3
ui
uk
ui
uk
ui
uk
ui
[...]
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 client/lib/convertTimeUnit.ts and its use in client/views/room/contextualBar/Info/EditRoomInfo/EditRoomInfo.tsx, then reproduce the error by opening an existing channel's edit settings. Trace the invalid timespan reported in the console and verify that the channel settings form opens without the exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100