RocketChat / RocketChat/Rocket.Chat

[ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

Open
#25,594 0 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:

[ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

Every 5 minutes - some Cornjob ?

Expected behavior:

no error

Actual behavior:

error

Server Setup Information:

Rocket.Chat Version: 4.7.2
NodeJS Version: 14.18.3 - x64
MongoDB Version: 4.4.14
MongoDB Engine: wiredTiger
ReplicaSet OpLog: Enabled |
Operating System: U18 fully updated

Client Setup Information

Web , android, ios

Additional context
Relevant logs:

May 21 10:40:00 chat rocketchat[1988]: TypeError [ERR_INVALID_ARG_TYPE] [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
May 21 10:40:00 chat rocketchat[1988]: at new NodeError (internal/errors.js:322:7)
May 21 10:40:00 chat rocketchat[1988]: at validateString (internal/validators.js:124:11)
May 21 10:40:00 chat rocketchat[1988]: at Object.join (path.js:1148:7)
May 21 10:40:00 chat rocketchat[1988]: at joinPath (server/lib/fileUtils.ts:10:14)
May 21 10:40:00 chat rocketchat[1988]: at generateUserFile (app/user-data-download/server/cronProcessDownloads.js:496:19)
May 21 10:40:00 chat rocketchat[1988]: at app/user-data-download/server/cronProcessDownloads.js:564:4
May 21 10:40:00 chat rocketchat[1988]: at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 {
May 21 10:40:00 chat rocketchat[1988]: code: 'ERR_INVALID_ARG_TYPE'
May 21 10:40:00 chat rocketchat[1988]: }

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 with server/lib/fileUtils.ts and the generateUserFile entry point in app/user-data-download/server/cronProcessDownloads.js, following the stack trace from joinPath to the scheduled process. Determine which path value is undefined during the cron job and verify that the scheduled download process completes without logging ERR_INVALID_ARG_TYPE.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.