Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slack import fails due to file size greater than 0 #9577

Closed
kneufeld opened this issue Feb 2, 2018 · 7 comments · Fixed by #9850
Closed

slack import fails due to file size greater than 0 #9577

kneufeld opened this issue Feb 2, 2018 · 7 comments · Fixed by #9850
Milestone

Comments

@kneufeld
Copy link

kneufeld commented Feb 2, 2018

Description:

Server Setup Information:

  • Version of Rocket.Chat Server: 0.61.0
  • Operating System: 4.4.0-112-generic
  • Deployment Method(snap/docker/tar/etc): docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: disabled
  • Node Version: v8.9.3

Steps to Reproduce:

  1. try to import a slack zip file
  2. pick a single channel (no users)

Expected behavior:

Messages get imported

Actual behavior:

There are errors in the log and no messages are imported.

Relevant logs:

2/1/2018 5:06:11 PMException in callback of async function: Error: File exceeds allowed size of 0 B. [error-file-too-large]
2/1/2018 5:06:11 PM    at Filter.validateFileUpload [as onCheck] (/app/bundle/programs/server/packages/rocketchat_file-upload.js:119:10)
2/1/2018 5:06:11 PM    at Filter.check (/app/bundle/programs/server/packages/jalik_ufs.js:558:57)
2/1/2018 5:06:11 PM    at FileUploadClass.insert (/app/bundle/programs/server/packages/rocketchat_file-upload.js:587:11)
2/1/2018 5:06:11 PM    at res.on.Meteor.bindEnvironment (/app/bundle/programs/server/packages/rocketchat_importer.js:366:15)
2/1/2018 5:06:11 PM    at runWithEnvironment (packages/meteor.js:1240:24)
@kneufeld
Copy link
Author

kneufeld commented Feb 2, 2018

The import process changes the File Upload.Maximum File Upload Size to 0 before starting the import and then seems to complain when it's 0.

@kneufeld
Copy link
Author

kneufeld commented Feb 2, 2018

Rocket.Chat/packages/rocketchat-file-upload/lib/FileUpload.js

if on line 33 will always hit as you set maxFileSize to 0 at the top of the file.

@graywolf336
Copy link
Contributor

Relevant Importer commit: ca5b24f

@geekgonecrazy
Copy link
Contributor

Seeing a few more cases of this.

@twardnw
Copy link

twardnw commented Feb 22, 2018

Yes, I am being stuck by this currently, logs look the same as those above, but happy to provide if you would like

@tjhorner
Copy link

I am experiencing this on version 0.62.2, except it's saying -1 instead of 0. 31ead9a says that -1 should be unlimited, but it seems it's taking it literally as -1.

image

This can be worked around by setting the max upload size to something huge mid-import.

@graywolf336
Copy link
Contributor

@tjhorner can you open a new issue for that? It should be working as it worked locally for me, but I will have to test it more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants