RocketChat / RocketChat/Rocket.Chat
Error on deleting file: path must be a string
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 Version: 0.56
Running Instances: docker
DB Replicaset OpLog: enabled
Node Version: 4.8.1
I have this error on deleting file in chat.
Exception in callback of async function: TypeError: path must be a string
at TypeError (native)
at Object.fs.stat (fs.js:830:11)
at LocalStore._this.delete (/app/bundle/programs/server/packages/jalik_ufs-local.js:156:20)
at Object.<anonymous> (/app/bundle/programs/server/packages/jalik_ufs.js:2070:28)
at packages/matb33_collection-hooks.js:558:28
at Array.forEach (native)
at Function._.each._.forEach (packages/underscore.js:139:11)
at packages/matb33_collection-hooks.js:557:11
at Array.forEach (native)
at Function._.each._.forEach (packages/underscore.js:139:11)
at Object.<anonymous> (packages/matb33_collection-hooks.js:556:9)
at Object.collection.(anonymous function) [as remove] (packages/matb33_collection-hooks.js:146:21)
at [object Object].remove (/app/bundle/programs/server/packages/mongo.js:3936:31)
at ModelsBaseDb.remove (/app/bundle/programs/server/packages/rocketchat_lib.js:9752:32)
at [object Object].model.remove (/app/bundle/programs/server/packages/rocketchat_lib.js:9405:24)
at /app/bundle/programs/server/packages/jalik_ufs-local.js:159:50
at runWithEnvironment (packages/meteor.js:1176:24)
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 the deletion stack trace in packages/jalik_ufs-local.js, especially LocalStore.delete and its fs.stat call, then inspect the surrounding collection removal flow in packages/jalik_ufs.js. Reproduce file deletion with the reported Docker, MongoDB replica-set, and Node versions if possible; done means deletion completes without the path TypeError and the relevant regression is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100