RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.56k stars 10.58k forks source link

[Bug] Download user data builds corrupted zip file #19139

Closed piotrkochan closed 4 years ago

piotrkochan commented 4 years ago

Description:

Download user data functionality does not work, it generates and sends .zip which is corrupted.

Steps to reproduce:

  1. Generate user data in user preferences
  2. Receive e-mail
  3. Download
  4. Zip can't be opened, extracted (also seems too small)
  5. Extra: in client - click generate again, there is popup with 'click here to download file' and it does not work until right click - open in new window.

Expected behavior:

Full, working history on email.

Actual behavior:

Described in Description above.

Server Setup Information:

Client Setup Information

Additional context

Relevant logs:

A lot of logs like below shows up:

I20201006-11:38:02.965(2) Exception in callback of async function: TypeError: Cannot read property 'description' of undefined     at exportMessageObject (app/user-data-download/server/cronProcessDownloads.js:207:34)     at app/user-data-download/server/cronProcessDownloads.js:245:24     at runWithEnvironment (packages/meteor.js:1286:24)     at packages/meteor.js:1299:14     at Array.forEach (<anonymous>)     at app/user-data-download/server/cronProcessDownloads.js:238:10     at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 
I20201006-11:38:02.966(2) Exception in callback of async function: TypeError: Cannot read property 'description' of undefined     at exportMessageObject (app/user-data-download/server/cronProcessDownloads.js:207:34)     at app/user-data-download/server/cronProcessDownloads.js:245:24     at runWithEnvironment (packages/meteor.js:1286:24)     at packages/meteor.js:1299:14     at Array.forEach (<anonymous>)     at app/user-data-download/server/cronProcessDownloads.js:238:10     at /opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40 
piotrkochan commented 4 years ago

log output similar to #17714