File upload integration doesn't work (The dollar ($) prefixed field is not valid for storage)

Open
#10,617 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
mongodb, typescript
Domain
api, backend

Research direction

Start by reproducing the file-upload path for an outgoing integration on the reported Rocket.Chat version, then trace where the integration request data containing room.$loki is persisted. No source file or test is named in the report. Done means the upload reaches Matterbridge or the configured integration without the MongoDB dollar-prefixed-field error.

Written by the indexing model from the issue text.

Description

Freshly updated to rocket.chat 0.64. Not sure whether is was in earlier versions. I've setup outgoing integration for uploading a file in channel. But when I upload file in the channgel nothing is received in software serving the integration (matterbridge) and I see in rocket chat logs:

[34mI20180428-23:11:05.256(0) Exception in defer callback: MongoError: The dollar ($) prefixed field '$loki' in 'httpCallData.room.$loki' is not valid for storage. at Function.MongoError.create (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:31:11) at toError (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:139:22) at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1059:67 at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:469:18 at _combinedTickCallback (internal/process/next_tick.js:131:7) at process._tickDomainCallback (internal/process/next_tick.js:218:9)

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

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.

More from RocketChat/Rocket.Chat

All issues in RocketChat/Rocket.Chat

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.