Rocket.chat: cronProcessDownloads: Cannot read property 'filter' of undefined

Created on 21 May 2020  路  5Comments  路  Source: RocketChat/Rocket.Chat

Description:

Seeing the log message below repeatedly.

Steps to reproduce:

No steps, noticed this while viewing the log.

Expected behavior:

Actual behavior:

Server Setup Information:

  • Version of Rocket.Chat Server: 3.1.1
  • Operating System: RHEL 7
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: enabled
  • NodeJS Version: 12.16.1
  • MongoDB Version: 4.0.9

Relevant logs:

=== UnHandledPromiseRejection ===
TypeError: Cannot read property 'filter' of undefined
at app/user-data-download/server/cronProcessDownloads.js:50:57
at SynchronousCursor.forEach (packages/mongo/mongo_driver.js:1102:16)
at Cursor. [as forEach] (packages/mongo/mongo_driver.js:882:44)
at loadUserSubscriptions (app/user-data-download/server/cronProcessDownloads.js:46:9)
at app/user-data-download/server/cronProcessDownloads.js:498:3
at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
=> awaited here:
at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
at app/user-data-download/server/cronProcessDownloads.js:567:2
at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40

bug

All 5 comments

Also what is this CRON job even for?

this cron job is in charge of processing users' "download my data" requests..

Fixed by #17577

I'm facing a similar issue after upgrading to 3.5.0.

 === UnHandledPromiseRejection ===
 TypeError: Cannot read property 'filter' of undefined
 at app/user-data-download/server/cronProcessDownloads.js:51:59
 at SynchronousCursor.forEach (packages/mongo/mongo_driver.js:1138:16)
 at Cursor.<computed> [as forEach] (packages/mongo/mongo_driver.js:918:44)
 at loadUserSubscriptions (app/user-data-download/server/cronProcessDownloads.js:47:9)
 at app/user-data-download/server/cronProcessDownloads.js:499:3
 at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
 => awaited here:
 at Function.Promise.await (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
 at app/user-data-download/server/cronProcessDownloads.js:577:2
 at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
 ---------------------------------
 Errors like this can cause oplog processing errors.
 Setting EXIT_UNHANDLEDPROMISEREJECTION will cause the process to exit allowing your service to automatically restart the process
 Future node.js versions will automatically exit the process
 =================================

@maiconbaumx what version were you using before upgrading? the uids field was created by https://github.com/RocketChat/Rocket.Chat/pull/16761/ released on version 3.1.0 .. I wonder if you missed a migration 馃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marceloschmidt picture marceloschmidt  路  3Comments

lunitic picture lunitic  路  3Comments

neha1deshmukh picture neha1deshmukh  路  3Comments

mddvul22 picture mddvul22  路  3Comments

Buzzele picture Buzzele  路  3Comments