Rocket.chat: Slack import does not recognize the source file

Created on 27 Apr 2016  Â·  35Comments  Â·  Source: RocketChat/Rocket.Chat

Your Rocket.Chat version: 0.31

The slack export bundle contains JSON-files only, but the servers returns "invalid import file type" error.

image

import bug

Most helpful comment

Worked great, thank you all so much for fixing this!

All 35 comments

Hello, @graywolf336, @geekgonecrazy. Tell me, please, is there a way to import slack history in it's current format (only json-files)?

@zxweed the import expects the zip file that is given to you by a slack export

@geekgonecrazy, I have tried the zip bundle with same results too:
image

there are no error message in the log:

[methods] setupImporter -> userId: Efjsx7m6u4mrfcm7A , arguments: { '0': 'slack' }
[methods] getImportProgress -> userId: Efjsx7m6u4mrfcm7A , arguments: { '0': 'slack' }

@zxweed i'm out of ideas on this one. @graywolf336 might know more.

@zxweed the file must be an untouched zip file which Slack provides. The importer expects a particular layout of the files insides the zip. Try the importer again with the zip from Slack and get back with us.

@graywolf336, I have reexport the fresh bundle from slack and try to import it with the same effect - import processes was not initiated.

@zxweed mind trying out the newest release? Version 0.30 contains some changes to the slack importer.

@graywolf336, I have upgrade to 0.30.0 - the problem still exists. The log file contains new line:

[methods] setupImporter -> userId: EA4wsW6TmAf5aPShs , arguments:  { '0': 'slack' }
rocketchat_importer-slack server.coffee:6 Slack Importer âž” debug Constructed a new Slack Importer.
[methods] getImportProgress -> userId: EA4wsW6TmAf5aPShs , arguments:  { '0': 'slack' }

0.31 version the same

@zxweed Hit me up on the demo server so we can talk about this and get the issue resolved, as we need to look into the file's structure

Same problem here. There are some solution ?

0.34 - problem exists

on 0.33 and same problem

v.0.37.1. Same problem there.

0.38 - problem exists

I have run into the same issue. I found that doing the users first, then
doing the channels one by one seemed to let me get through it till the end.

I needed to restart the server a few times but it eventually all went
through. Very strange.

On Monday, September 5, 2016, zxweed [email protected] wrote:

0.38 - problem exists

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/RocketChat/Rocket.Chat/issues/3050#issuecomment-244726701,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA1QD_uqOP29lQDzoiGGV1FZeba0VSX2ks5qm_92gaJpZM4IQwZH
.

Sorry I forgot to mention, it worked much better when I was logged in as a
user that did not exist in the slack import. Not sure if related or just a
coincidence though.

I'll give the import a try in a new instance now..

I may still have a export from a few weeks ago when it was all working
fine. I'll try and do a compare as well and report back my findings.

On Monday, September 5, 2016, zxweed [email protected] wrote:

0.38 - problem exists

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/RocketChat/Rocket.Chat/issues/3050#issuecomment-244726701,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA1QD_uqOP29lQDzoiGGV1FZeba0VSX2ks5qm_92gaJpZM4IQwZH
.

@jszaszvari that might actually be an important piece. I can see things struggling a bit if you are logged in as a user present in the import.

@graywolf336 thoughts? Think this would be a difference between it working and not working?

Hi, I encountered this issue on 0.41.0.

Debugging on my side leads me to event.target.files[x].type being empty.
The check that throw the exception is there in the source.

Hope it'll help

EDIT : I tried various browser just in case... I was surprised of results of mime type detection of zip files :

  • Chrome 53.0.2785.116 : KO
  • Internet Explorer 11.589.xxx : KO
  • Edge 25.10586.0.0 : KO
  • FireFox 49.0.1 : OK

I tried with some jpg and png files, it as working. It seems that zip files mime type detection only works on FF.

EDIT 2 : I confirm that I passed this first error on FF for importing Slack exported zip (but encountered #4388 just after).
Seems that import of zip files should not rely on Blob.type, because of mime type detection of the client browser.

@whren what would you suggest relying on then?

@graywolf336 I'll suggest to rely on file signature + extension if Blob.type is empty.

@graywolf336 is this still a problem?

@engelgabriel I think so, I never could replicate it sadly.

The 0.46 release still have this problem

@zxweed Any chance we can talk on the demo server?

@graywolf336 sure, we have already discussed this issue

Same issue here. version 0.48.2 using snap under ubuntu server

This should now be fixed in the develop branch, if someone feels like
testing it to verify that would be greatly appreciated!

On Tue, Jan 3, 2017, 9:16 PM Gabriel Engel notifications@github.com wrote:

Closed #3050 https://github.com/RocketChat/Rocket.Chat/issues/3050 via

5407 https://github.com/RocketChat/Rocket.Chat/pull/5407.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/RocketChat/Rocket.Chat/issues/3050#event-910527649,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAz518Tcr0ekP0F6J7uDXcSz26DNVnIwks5rOtbVgaJpZM4IQwZH
.

@graywolf336
I am running the snap container, is there a way to use the dev in snap or do I need to wait?

@geekgonecrazy can you answer the above question?

@morbidpete if you are in a production environment don't try this. There are a lot of things changing between 0.48.2 and what will be 0.49.0.

Run the following in your dev environment:
sudo snap install rocketchat-server --channel edge

@geekgonecrazy No production yet, Just seeing if this is a viable option to replace slack for our use. Thank you for the quick reply.

Worked great, thank you all so much for fixing this!

Awesome, thank you for trying it out and reporting back! @morbidpete

Was this page helpful?
0 / 5 - 0 ratings