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 failing #3911

Closed
asthomasdk opened this issue Aug 3, 2016 · 14 comments · Fixed by #4952
Closed

Slack import failing #3911

asthomasdk opened this issue Aug 3, 2016 · 14 comments · Fixed by #4952

Comments

@asthomasdk
Copy link

Your Rocket.Chat version: 0.36

I am testing out the Slack import process and this does not seem to be working.

I have made a fresh export from Slack and chosen the .zip file from this process to import from, and I can see the list of users and the channels to potentially import.

Trying to import with and without users seems to give the same failures.

When the import process is started, I get the pulsing Rocket.Chat icon showing an import title and 0/45702 messages to import. Nothing seems to happen for a very long time...

Checking the log, I can see this :

Exception in defer callback: Error: Invalid user [error-invalid-user] at [object Object].Meteor.methods.createChannel (server/methods/createChannel.coffee:4:14) at [object Object].methodsMap.(anonymous function) (server/lib/debug.js:17:26) at maybeAuditArgumentChecks (livedata_server.js:1698:12) at livedata_server.js:1611:18 at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1) at [object Object]._.extend.apply (livedata_server.js:1610:45) at [object Object]._.extend.call (livedata_server.js:1553:17) at [object Object].<anonymous> (packages/rocketchat_importer-slack/server.coffee:182:27) at packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:186:1 at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I am guessing this is what is preventing the import from running.

If I change from the import screen to something else in the UI, I get a red toaster message with the text :
"The importer was not defined correctly. it is missing the Import class"

@MartinSchoeler MartinSchoeler added this to the Important milestone Aug 8, 2016
@scott-wilson
Copy link

I'm getting the following error when importing from Slack with Rocket.Chat 0.37.1

Exception in defer callback: TypeError: Cannot read property 'id' of undefined at Slack. (packages/rocketchat_importer-slack/server.coffee:221:77) at [object Object]. (packages/rocketchat_importer-slack/server.coffee:212:9) at packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:186:1 at [object Object]..extend.withValue (packages/meteor/dynamics_nodejs.js:56:1) at Object.Meteor.runAsUser (packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:185:1) at fn (packages/rocketchat_importer-slack/server.coffee:206:13) at packages/rocketchat_importer-slack/server.coffee:205:5 at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1) at packages/meteor/timers.js:6:1 at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)

@graywolf336
Copy link
Contributor

Hmmm, they might have changed their exported file format recently, that's the only thing that comes to my mind

@europeanway
Copy link

encountered the same problems, any updates yet?

@TwizzyDizzy
Copy link

Same issue here. Is there any way we could help with this issue? Debugging, Testing .. whatever, we're willing to help.

Cheers
Thomas

@graywolf336
Copy link
Contributor

@TwizzyDizzy please post the error which is happening

@TwizzyDizzy
Copy link

TwizzyDizzy commented Nov 14, 2016

Hi @graywolf336,

here are two error messages. Let me explain. We were using slack far before rocket.chat was introduced. We had two domains allowed for the slack team. @domain1 + @domain2.

The current rocket.chat instance is connected to an Active Directory that only contains users with mail addresses of domain2. That being said, there are two different error messages, depending on whether I select or deselect all users on import.

Import error with all users (from the import) deselected:

Exception in defer callback: Error: Invalid user [error-invalid-user]
     at [object Object].Meteor.methods.createChannel (packages/rocketchat_lib/server/methods/createChannel.coffee:8:14)
     at [object Object].methodsMap.(anonymous function) (packages/rocketchat:lib/server/lib/debug.js:17:26)
     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1711:12)
     at packages/ddp-server/livedata_server.js:1624:18
     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
     at Server.apply (packages/ddp-server/livedata_server.js:1623:45)
     at Server.call (packages/ddp-server/livedata_server.js:1566:17)
     at [object Object].<anonymous> (packages/rocketchat_importer-slack/server.coffee:182:27)
     at packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:186:1
     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
     at Object.Meteor.runAsUser (packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:185:1)
     at [object Object].<anonymous> (packages/rocketchat_importer-slack/server.coffee:181:15)
     at packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:186:1
     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
     at Object.Meteor.runAsUser (packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:185:1)
     at packages/rocketchat_importer-slack/server.coffee:159:13
     at packages/rocketchat_importer-slack/server.coffee:158:5
     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
     at packages/meteor/timers.js:6:1
     at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1) 

Import error with all users (from the import) selected:

Exception in defer callback: Error: Match error: Failed Match.OneOf, Match.Maybe or Match.Optional validation
     at exports.check (packages/check/match.js:34:1)
     at [object Object].Meteor.methods.setAvatarFromService (server/methods/setAvatarFromService.coffee:5:3)
     at [object Object].methodsMap.(anonymous function) (packages/rocketchat:lib/server/lib/debug.js:17:26)
     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1711:12)
     at packages/ddp-server/livedata_server.js:1624:18
     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
     at Server.apply (packages/ddp-server/livedata_server.js:1623:45)
     at Server.call (packages/ddp-server/livedata_server.js:1566:17)
     at [object Object].<anonymous> (packages/rocketchat_importer-slack/server.coffee:135:16)
     at packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:186:1
     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
     at Object.Meteor.runAsUser (packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:185:1)
     at [object Object].<anonymous> (packages/rocketchat_importer-slack/server.coffee:127:15)
     at packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:186:1
     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
     at Object.Meteor.runAsUser (packages/dispatch_run-as-user/packages/dispatch_run-as-user.js:185:1)
     at packages/rocketchat_importer-slack/server.coffee:113:13
     at packages/rocketchat_importer-slack/server.coffee:112:5
     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
     at packages/meteor/timers.js:6:1
     at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1) 

Cheers
Thomas

@graywolf336
Copy link
Contributor

@TwizzyDizzy Okay, and which version of Rocket.Chat are you running? As the second error looks similar to ones reported a few versions back.

@TwizzyDizzy
Copy link

It's currently 0.42.0. I'll try to update, then try the import again and get back to you.

Cheers
Thomas

@graywolf336
Copy link
Contributor

This and #4899 are duplicates of each other, the original issue posted will be closed here shortly.

@TwizzyDizzy Did you manage to update rocket.chat and get it fully imported without errors? As the second error was one we fixed before, but if it's still happening then there is something else at play.

graywolf336 added a commit that referenced this issue Nov 15, 2016
@TwizzyDizzy
Copy link

TwizzyDizzy commented Nov 16, 2016

Alright. I have now updated to 0.45.0.

When deselecting all users before import (in the import dialogue), the error still appears:

Nov 16 16:17:15 chat01 rocketchat[24817]: Exception in defer callback: Error: Invalid user [error-invalid-user]
Nov 16 16:17:15 chat01 rocketchat[24817]: at [object Object].Meteor.methods.createChannel (/opt/Rocket.Chat-0.45.0/bundle/programs/server/packages/rocketchat_lib.js:8121:13)
Nov 16 16:17:15 chat01 rocketchat[24817]: at [object Object].methodsMap.(anonymous function) (/opt/Rocket.Chat-0.45.0/bundle/programs/server/packages/rocketchat_lib.js:1014:26)
Nov 16 16:17:15 chat01 rocketchat[24817]: at maybeAuditArgumentChecks (/opt/Rocket.Chat-0.45.0/bundle/programs/server/packages/ddp-server.js:2107:12)
Nov 16 16:17:15 chat01 rocketchat[24817]: at /opt/Rocket.Chat-0.45.0/bundle/programs/server/packages/ddp-server.js:2026:20
Nov 16 16:17:15 chat01 rocketchat[24817]: at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
Nov 16 16:17:15 chat01 rocketchat[24817]: at Server.apply (/opt/Rocket.Chat-0.45.0/bundle/programs/server/packages/ddp-server.js:2025:47)
Nov 16 16:17:15 chat01 rocketchat[24817]: at Server.call (/opt/Rocket.Chat-0.45.0/bundle/programs/server/packages/ddp-server.js:1959:19)
Nov 16 16:17:15 chat01 rocketchat[24817]: at [object Object].<anonymous> (/opt/Rocket.Chat-0.45.0/bundle/programs/server/packages/rocketchat_importer-slack.js:381:39)
Nov 16 16:17:15 chat01 rocketchat[24817]: at packages/dispatch_run-as-user.js:211:14
Nov 16 16:17:15 chat01 rocketchat[24817]: at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
Nov 16 16:17:15 chat01 rocketchat[24817]: at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)
Nov 16 16:17:15 chat01 rocketchat[24817]: at [object Object].<anonymous> (/opt/Rocket.Chat-0.45.0/bundle/programs/server/packages/rocketchat_importer-slack.js:379:26)
Nov 16 16:17:15 chat01 rocketchat[24817]: at packages/dispatch_run-as-user.js:211:14
Nov 16 16:17:15 chat01 rocketchat[24817]: at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
Nov 16 16:17:15 chat01 rocketchat[24817]: at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)
Nov 16 16:17:15 chat01 rocketchat[24817]: at /opt/Rocket.Chat-0.45.0/bundle/programs/server/packages/rocketchat_importer-slack.js:339:29
Nov 16 16:17:15 chat01 rocketchat[24817]: at /opt/Rocket.Chat-0.45.0/bundle/programs/server/packages/rocketchat_importer-slack.js:405:15
Nov 16 16:17:15 chat01 rocketchat[24817]: at [object Object]._.extend.withValue (packages/meteor.js:1122:17)
Nov 16 16:17:15 chat01 rocketchat[24817]: at packages/meteor.js:445:45
Nov 16 16:17:15 chat01 rocketchat[24817]: at runWithEnvironment (packages/meteor.js:1176:24)

When importing with all users checked, the import succeeds.

Now here's my question: How is the merging of user accounts done, if one already did connect an Active Directory? Some match users in the AD, some not.

  • is there any merging attempted or are the users created as is in the dump from slack.
  • what passwords do imported users have?
  • what happens, if there is a user in the AD and the same user in the dump from slack?

Cheers
Thomas

@graywolf336
Copy link
Contributor

graywolf336 commented Nov 16, 2016

@TwizzyDizzy Okay, that error will be fixed when #4952 gets merged.

Here are some answers:

  • It tries to find a user by the email in Slack and if it didn't find any, it would try to find the user by the provided username. If a user in Rocket.chat doesn't exist by either username or email, it will then create an account with the email and username provided in the slack export.
  • They have a random password and will need to recover their account via the forgot password.
  • It will use whatever account matches in Rocket.Chat by username or email.

Does that answer your questions?

@TwizzyDizzy
Copy link

@graywolf336 it does indeed :) Thanks mate!

@graywolf336
Copy link
Contributor

@TwizzyDizzy Awesome, glad to be of help! 😄

@engelgabriel engelgabriel modified the milestone: Important Dec 6, 2016
@Germanfk
Copy link

Germanfk commented Aug 8, 2018

Hello everyone, hello @graywolf336 I have installed the version 0.68.2 of RocketChat and I have been testing the import of Slack for several weeks and I am told by the friends above, comes to the selection screen of channels and users, I click on it and quickly start counting in the upper left corner and before reaching the register 20 approx. skips an import error. Could the Slack export format have changed? Do you have any solution to this problem? If I can help with something with the info, I am at your disposal. Thank you

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.

8 participants