RocketChat / RocketChat/Rocket.Chat

Can not delete users in 4.6.1

Open
#25,245 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

Can't delete user. Several "undefined" pop ups appearing.

Steps to reproduce:
  1. Go to admin, users, select an active user ( several conversations, owner of some channels ... )
  2. Try to delete
Expected behavior:

The user should be deleted

Actual behavior:

The user wont be deleted and log shows.

Exception in callback of async function: TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
    at Object.stat (fs.js:1083:10)
    at LocalStore.delete (packages/jalik:ufs-local/ufs-local.js:111:12)
    at Object.<anonymous> (packages/jalik:ufs/ufs-store.js:378:5)
    at packages/matb33:collection-hooks/remove.js:28:30
    at Array.forEach (<anonymous>)
    at packages/matb33:collection-hooks/remove.js:27:14
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (packages/matb33:collection-hooks/remove.js:26:22)
    at Object.collection.<computed> [as remove] (packages/matb33:collection-hooks/collection-hooks.js:93:21)
    at ns.Collection.remove (packages/mongo/collection.js:653:31)
    at ns.Collection.Mongo.Collection.<computed> [as remove] (packages/dispatch_run-as-user.js:325:19)
    at packages/jalik:ufs-local/ufs-local.js:114:36
    at runWithEnvironment (packages/meteor.js:1320:24) {
  code: 'ERR_INVALID_ARG_TYPE'
}
Exception in callback of async function: TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string or an instance of Buffer or URL. Received undefined
    at Object.stat (fs.js:1083:10)
    at LocalStore.delete (packages/jalik:ufs-local/ufs-local.js:111:12)
    at Object.<anonymous> (packages/jalik:ufs/ufs-store.js:378:5)
    at packages/matb33:collection-hooks/remove.js:28:30
    at Array.forEach (<anonymous>)
    at packages/matb33:collection-hooks/remove.js:27:14
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (packages/matb33:collection-hooks/remove.js:26:22)
    at Object.collection.<computed> [as remove] (packages/matb33:collection-hooks/collection-hooks.js:93:21)
    at ns.Collection.remove (packages/mongo/collection.js:653:31)
    at ns.Collection.Mongo.Collection.<computed> [as remove] (packages/dispatch_run-as-user.js:325:19)
    at packages/jalik:ufs-local/ufs-local.js:114:36
    at runWithEnvironment (packages/meteor.js:1320:24) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Server Setup Information:
  • Version of Rocket.Chat Server: 4.6.1
  • Deployment Method:docker
  • Number of Running Instances: 3
Client Setup Information

Web Firefox

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at packages/jalik:ufs-local/ufs-local.js, especially LocalStore.delete, and trace the removal flow through packages/jalik:ufs/ufs-store.js and the collection remove hooks shown in the stack trace. Reproduce deletion of an active user and verify that the user is removed without undefined-path errors or callback exceptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.