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

Import Slack users (via CSV or ZIP) won't work #25363

Closed
Kyogre opened this issue May 2, 2022 · 2 comments · Fixed by #26629
Closed

Import Slack users (via CSV or ZIP) won't work #25363

Kyogre opened this issue May 2, 2022 · 2 comments · Fixed by #26629

Comments

@Kyogre
Copy link

Kyogre commented May 2, 2022

Description:

Importing file containing Slack users won't work. There is many iterations of that problem, but I can't find a way to stably reproduce any of them.

Steps to reproduce:

  1. deploy empty Rocket chat
  2. export users from Slack to CSV file with button "Export Member List" from https://your_workspace.slack.com/admin (grab CSV example here)
  3. in Rocket chat go to Import -> Import new file -> Slack -> upload CSV archive from step № 2

Expected behavior:

Rocket chat gives the ability to select users which I want to import and Import succeeds without a problems.

Actual behaviors:

There are more than one behaviors:

  1. Rocket chat infinitely spawns requests /api/v1/getCurrentImportOperation ;
  2. Rocket chat opens import dialog, where you need to select users you want to import, but the list is empty;
  3. Rocket chat give you error "400 Bad Request - Cannot set property 'do_import' of undefined" (if I recall correctly, to get this error you need to successfully import users via Import -> Import new file -> Slack -> upload zip archive with Slack users (you can grab mine ZIP example, then import users via Import new file -> Slack -> upload CSV archive with Slack users (you can grab mine example from "Steps to reproduce"), then you got error. You can ask me: why you need to import CSV over ZIP? I can reply that I need this to fill all users their emails from CSV, because only CSV file may contain email field.

Server Setup Information:

Version of Rocket.Chat Server: 4.6.3
Operating System: CentOS Linux release 7.9.2009 (Core)
Deployment Method: yum + src
Number of Running Instances: 1
DB Replicaset Oplog:
NodeJS Version: v14.0.0
MongoDB Version: 4.4.13 / wiredTiger (oplog Enabled)
Proxy: nginx/1.20.1
Firewalls involved: iptables, ACCEPT ALL

Client Setup Information

  • Version: Electron 3.8.5 or Firefox 99
  • Operating System: Windows 10

Additional context

Maybe the problems caused because of non-latin (cyrillic) symbols in users names.

Relevant logs:

-

@Kyogre
Copy link
Author

Kyogre commented May 2, 2022

maybe some of this problems related to #19454

@sdarwin
Copy link

sdarwin commented Jun 8, 2022

Hi,

I'm also encountering this problem. Is Slack CSV import known to be working with the latest Rocketchat?
Are imports tested in Github Actions?

Description:

Importing file containing Slack users won't work.

Steps to reproduce:

  1. deploy empty Rocket chat
  2. export users from Slack to CSV file with button "Export Member List" from https://your_workspace.slack.com/admin
  3. in Rocket chat go to Import -> Import new file -> Slack's Users CSV -> upload CSV archive from step № 2

Expected behavior:

Rocket chat gives the ability to select users which I want to import and Import succeeds without a problems.

Actual behaviors:

The results of an attempted import are:

File Uploaded Successfully
Failed to load import data

  • Tried this with an empty rocket instance.
  • Also tried where the database had been populated using a standard Slack import from a zip file.

Server Setup Information:

Version 4.8.0 Deployment ID zqMHQwXX2NW5YogoG Apps Engine Version 1.32.0 Node Version v14.18.3 Database Migration 265 (June 7, 2022 7:20 PM) MongoDB 5.0.8 / wiredTiger (oplog Enabled) Commit Details HEAD: (0e38639) Branch: HEAD PID 9
Self-hosted, Ubuntu 22.04, AWS, docker-compose, MongoDB Atlas

Client Setup Information

  • Firefox or Chrome on Ubuntu 20

Relevant logs:

{"level":35,"time":"2022-06-08T01:22:50.057Z","pid":9,"hostname":"f436ae4e8583","name":"API","method":"GET","url":"/api/v1/getImportFileData","userId":"6tSSt9jAJcB6RMorp","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.61 Safari/537.36","host":"rocket.cpp.al","referer":"https://rocket.cpp.al/admin/import/prepare","remoteIP":"98.50.110.198","err":{"type":"TypeError","message":"this.csvParser is not a function","stack":"TypeError: this.csvParser is not a function<br> at SlackUsersImporter.prepare (app/importer-slack-users/server/importer.js:25:23)<br> at SlackUsersImporter.prepareUsingLocalFile (app/importer/server/classes/ImporterBase.js:114:15)<br> at MethodInvocation.getImportFileData (app/importer/server/methods/getImportFileData.js:69:37)<br> at MethodInvocation.methodsMap.<computed> (app/lib/server/lib/debug.js:74:34)<br> at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1885:12)<br> at packages/ddp-server/livedata_server.js:1803:15<br> at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)<br> at packages/ddp-server/livedata_server.js:1801:36<br> at new Promise (<anonymous>)<br> at Server.applyAsync (packages/ddp-server/livedata_server.js:1800:12)<br> at Server.apply (packages/ddp-server/livedata_server.js:1739:26)<br> at Server.call (packages/ddp-server/livedata_server.js:1721:17)<br> at DDPCommon.MethodInvocation.<anonymous> (app/api/server/v1/import.js:59:21)<br> at packages/dispatch_run-as-user.js:211:14<br> at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)<br> at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)<br> at Object.get (app/api/server/v1/import.js:58:11)<br> at app/api/server/api.js:431:96<br> at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)<br> at Object._internalRouteActionHandler [as action] (app/api/server/api.js:431:39)<br> at Route._callEndpoint (packages/rocketchat_restivus/lib/route.coffee:150:32)<br> at packages/rocketchat_restivus/lib/route.coffee:59:33<br> => awaited here:<br> at Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)<br> at Server.apply (packages/ddp-server/livedata_server.js:1752:22)<br> at Server.call (packages/ddp-server/livedata_server.js:1721:17)<br> at DDPCommon.MethodInvocation.<anonymous> (app/api/server/v1/import.js:59:21)<br> at packages/dispatch_run-as-user.js:211:14<br> at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)<br> at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)<br> at Object.get (app/api/server/v1/import.js:58:11)<br> at app/api/server/api.js:431:96<br> at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)<br> at Object._internalRouteActionHandler [as action] (app/api/server/api.js:431:39)<br> at Route._callEndpoint (packages/rocketchat_restivus/lib/route.coffee:150:32)<br> at packages/rocketchat_restivus/lib/route.coffee:59:33<br> at packages/simple_json-routes.js:100:9"},"status":400,"responseTime":35,"msg":"this.csvParser is not a function"}

or

{"level":35,"time":"2022-06-08T01:26:34.168Z","pid":10,"hostname":"cd322072e43d","name":"Meteor","method":"getImportFileData","userId":"8wvBgWNttFBedPYY4","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0","referer":"https://rocket.cpp.al/admin/import/prepare","remoteIP":"98.50.110.198","instanceId":"JGbYvJwg4CvjQvvX6"} {"level":35,"time":"2022-06-08T01:26:34.199Z","pid":10,"hostname":"cd322072e43d","name":"API","method":"GET","url":"/api/v1/getImportFileData","userId":"8wvBgWNttFBedPYY4","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0","host":"rocket.cpp.al","referer":"https://rocket.cpp.al/admin/import/prepare","remoteIP":"98.50.110.198","err":{"type":"TypeError","message":"this.csvParser is not a function","stack":"TypeError: this.csvParser is not a function\n at SlackUsersImporter.prepare (app/importer-slack-users/server/importer.js:25:23)\n at SlackUsersImporter.prepareUsingLocalFile (app/importer/server/classes/ImporterBase.js:114:15)\n at MethodInvocation.getImportFileData (app/importer/server/methods/getImportFileData.js:69:37)\n at MethodInvocation.methodsMap.<computed> (app/lib/server/lib/debug.js:74:34)\n at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1885:12)\n at packages/ddp-server/livedata_server.js:1803:15\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)\n at packages/ddp-server/livedata_server.js:1801:36\n at new Promise (<anonymous>)\n at Server.applyAsync (packages/ddp-server/livedata_server.js:1800:12)\n at Server.apply (packages/ddp-server/livedata_server.js:1739:26)\n at Server.call (packages/ddp-server/livedata_server.js:1721:17)\n at DDPCommon.MethodInvocation.<anonymous> (app/api/server/v1/import.js:59:21)\n at packages/dispatch_run-as-user.js:211:14\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)\n at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)\n at Object.get (app/api/server/v1/import.js:58:11)\n at app/api/server/api.js:431:96\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)\n at Object._internalRouteActionHandler [as action] (app/api/server/api.js:431:39)\n at Route._callEndpoint (packages/rocketchat_restivus/lib/route.coffee:150:32)\n at packages/rocketchat_restivus/lib/route.coffee:59:33\n => awaited here:\n at Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)\n at Server.apply (packages/ddp-server/livedata_server.js:1752:22)\n at Server.call (packages/ddp-server/livedata_server.js:1721:17)\n at DDPCommon.MethodInvocation.<anonymous> (app/api/server/v1/import.js:59:21)\n at packages/dispatch_run-as-user.js:211:14\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)\n at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)\n at Object.get (app/api/server/v1/import.js:58:11)\n at app/api/server/api.js:431:96\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)\n at Object._internalRouteActionHandler [as action] (app/api/server/api.js:431:39)\n at Route._callEndpoint (packages/rocketchat_restivus/lib/route.coffee:150:32)\n at packages/rocketchat_restivus/lib/route.coffee:59:33\n at packages/simple_json-routes.js:100:9"},"status":400,"responseTime":32,"msg":"this.csvParser is not a function"} {"level":35,"time":"2022-06-08T01:26:34.387Z","pid":10,"hostname":"cd322072e43d","name":"API","method":"GET","url":"/api/v1/getCurrentImportOperation","userId":"8wvBgWNttFBedPYY4","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0","host":"rocket.cpp.al","referer":"https://rocket.cpp.al/admin/import","remoteIP":"98.50.110.198","status":200,"responseTime":3}

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

Successfully merging a pull request may close this issue.

2 participants