Slack import not working in Version 4.3.2 (Docker)

First off, my perfunctory apology if anything is missing, I’m new to RocketChat and this support forum. I’m happy to provide additional information.

Description

When I upload a zipped export from Slack, I get an error. I’ve tried a few things from “the google”, and I’m not finding a solution.

One of the solutions was to ensure that all users had email address’, so I did that, and imported
0 Users
0 Channels
27432 Messages
27432 Total

But since there are no channels, I see no messages. I’ll paste the error code from the Logs further down.

Server Setup Information

  • Version of Rocket.Chat Server: 4.3.2
  • Operating System: Ubuntu 18.04.5 LTS
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: idk what that means
  • NodeJS Version:
  • MongoDB Version: 4.0.28
  • Proxy: nginx
  • Firewalls involved: AWS

Any additional Information

rocketchat_1 | {“level”:50,“time”:“2022-02-02T21:24:09.932Z”,“pid”:8,“hostname”:“49603428f7bb”,“name”:“Slack Importer”,“err”:{“type”:“Error”,“message”:“object [”"] is not a valid ObjectId",“stack”:“Error: object [”"] is not a valid ObjectId\n at serializeObjectId (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:287:11)\n at serializeInto (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:941:17)\n at serializeObject (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:347:18)\n at serializeInto (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:947:17)\n at serializeObject (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:347:18)\n at serializeInto (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:729:17)\n at serializeObject (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:347:18)\n at serializeInto (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:947:17)\n at BSON.serialize (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/bson.js:64:28)\n at Msg.serializeBson (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/msg.js:127:22)\n at Msg.makeDocumentSegment (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/msg.js:119:33)\n at Msg.toBin (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/msg.js:105:25)\n at MessageStream.writeCommand (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:55:28)\n at Connection.write (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:373:26)\n at _command (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/wireprotocol/command.js:125:10)\n at command (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/wireprotocol/command.js:28:5)\n at writeCommand (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/wireprotocol/write_command.js:56:3)\n at Object.update (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/wireprotocol/index.js:9:5)\n at Connection.update (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:195:8)\n at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/sdam/server.js:490:13\n at Object.callback (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection_pool.js:345:7)\n at processWaitQueue (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection_pool.js:468:23)"},“msg”:“object [”"] is not a valid ObjectId"}

Hi and welcome to our forums! Glad to have you here!! :slight_smile:

We just had a pull that fixes the CSV import and also, as I heard, slack imports too in our latest version 4.4.0

I suggest you upgrade to latest version and try it out in your staging environment.

Thanks!

Thanks for the suggestion, I’ve tried it and I’m seeing the same error.
I have some notes to update your Docker documentation :smiley: (but that’s another topic)
Current RocketChat Version 4.4.0
I also updated MongoDB to 4.4.12

Here are the three error lines:

rocketchat_1 | {“level”:50,“time”:“2022-02-03T17:23:18.546Z”,“pid”:9,“hostname”:“697bdfa38d30”,“name”:"",“name”:“Slack Importer”,“err”:{“type”:“errorClass”,“message”:“Forbidden [forbidden]”,“stack”:“Error: Forbidden [forbidden]\n at Object. (packages/jalik:ufs/ufs-store.js:360:12)\n at packages/matb33:collection-hooks/insert.js:16:28\n at Array.forEach ()\n at Object. (packages/matb33:collection-hooks/insert.js:15:22)\n at Object.collection. [as insert] (packages/matb33:collection-hooks/collection-hooks.js:93:21)\n at ns.Collection.insert (packages/mongo/collection.js:552:39)\n at ns.Collection.Mongo.Collection. [as insert] (packages/dispatch_run-as-user.js:325:19)\n at GridFSStore.Store.self.create (packages/jalik:ufs/ufs-store.js:205:33)\n at FileUploadClass._doInsert (app/file-upload/server/lib/FileUpload.js:667:29)\n at FileUploadClass.insert (app/file-upload/server/lib/FileUpload.js:707:15)\n at FileUploadClass.insertSync (packages/meteor.js:311:21)\n at setUserAvatar (app/lib/server/functions/setUserAvatar.ts:95:27)\n at _setUsername (app/lib/server/functions/setUsername.js:69:4)\n at saveUserIdentity (app/lib/server/functions/saveUserIdentity.js:32:8)\n at ImportDataConverter.updateUser (app/importer/server/classes/ImportDataConverter.ts:260:4)\n at ImportDataConverter.insertUser (app/importer/server/classes/ImportDataConverter.ts:283:8)\n at app/importer/server/classes/ImportDataConverter.ts:346:26\n at Array.forEach ()\n at ImportDataConverter.convertUsers (app/importer/server/classes/ImportDataConverter.ts:310:9)\n at app/importer/server/classes/ImporterBase.js:205:20\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)\n at packages/meteor.js:555:25”,“isClientSafe”:true,“error”:“forbidden”,“reason”:“Forbidden”,“errorType”:“Meteor.Error”},“msg”:“Forbidden [forbidden]”}
rocketchat_1 | {“level”:50,“time”:“2022-02-03T17:23:18.659Z”,“pid”:9,“hostname”:“697bdfa38d30”,“name”:"",“name”:“Slack Importer”,“err”:{“type”:“errorClass”,“message”:“Forbidden [forbidden]”,“stack”:“Error: Forbidden [forbidden]\n at Object. (packages/jalik:ufs/ufs-store.js:360:12)\n at packages/matb33:collection-hooks/insert.js:16:28\n at Array.forEach ()\n at Object. (packages/matb33:collection-hooks/insert.js:15:22)\n at Object.collection. [as insert] (packages/matb33:collection-hooks/collection-hooks.js:93:21)\n at ns.Collection.insert (packages/mongo/collection.js:552:39)\n at ns.Collection.Mongo.Collection. [as insert] (packages/dispatch_run-as-user.js:325:19)\n at GridFSStore.Store.self.create (packages/jalik:ufs/ufs-store.js:205:33)\n at FileUploadClass._doInsert (app/file-upload/server/lib/FileUpload.js:667:29)\n at FileUploadClass.insert (app/file-upload/server/lib/FileUpload.js:707:15)\n at FileUploadClass.insertSync (packages/meteor.js:311:21)\n at setUserAvatar (app/lib/server/functions/setUserAvatar.ts:95:27)\n at _setUsername (app/lib/server/functions/setUsername.js:69:4)\n at saveUserIdentity (app/lib/server/functions/saveUserIdentity.js:32:8)\n at ImportDataConverter.updateUser (app/importer/server/classes/ImportDataConverter.ts:260:4)\n at ImportDataConverter.insertUser (app/importer/server/classes/ImportDataConverter.ts:283:8)\n at app/importer/server/classes/ImportDataConverter.ts:346:26\n at Array.forEach ()\n at ImportDataConverter.convertUsers (app/importer/server/classes/ImportDataConverter.ts:310:9)\n at app/importer/server/classes/ImporterBase.js:205:20\n at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1257:12)\n at packages/meteor.js:555:25”,“isClientSafe”:true,“error”:“forbidden”,“reason”:“Forbidden”,“errorType”:“Meteor.Error”},“msg”:“Forbidden [forbidden]”}
rocketchat_1 | {“level”:50,“time”:“2022-02-03T17:23:18.664Z”,“pid”:9,“hostname”:“697bdfa38d30”,“name”:"",“name”:“Slack Importer”,“err”:{“type”:“Error”,“message”:“object [”"] is not a valid ObjectId",“stack”:“Error: object [”"] is not a valid ObjectId\n at serializeObjectId (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:287:11)\n at serializeInto (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:941:17)\n at serializeObject (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:347:18)\n at serializeInto (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:947:17)\n at serializeObject (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:347:18)\n at serializeInto (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:729:17)\n at serializeObject (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:347:18)\n at serializeInto (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/parser/serializer.js:947:17)\n at BSON.serialize (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/bson/lib/bson/bson.js:64:28)\n at Msg.serializeBson (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/msg.js:127:22)\n at Msg.makeDocumentSegment (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/msg.js:119:33)\n at Msg.toBin (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/connection/msg.js:105:25)\n at MessageStream.writeCommand (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/message_stream.js:55:28)\n at Connection.write (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:373:26)\n at _command (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/wireprotocol/command.js:125:10)\n at command (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/wireprotocol/command.js:28:5)\n at writeCommand (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/wireprotocol/write_command.js:56:3)\n at Object.update (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/wireprotocol/index.js:9:5)\n at Connection.update (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection.js:195:8)\n at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/core/sdam/server.js:490:13\n at Object.callback (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection_pool.js:345:7)\n at processWaitQueue (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/cmap/connection_pool.js:468:23)"},“msg”:“object [”"] is not a valid ObjectId"}

1 Like

I needed to get it to work, so I installed RocketChat version 3.18.5, and was able to import from the Slack export.
I’ll upgrade my instance to latest once I do a little data clean up.

Hi Jimmy. Thanks for your input on this.

I have forwarded it to our team!

I keep seeing what seems like the same error, posted on open.rocket.chat.
For reference, heres another post about this

I am on Docker, Mongo 5.0.5, RocketChat 4.4.0

Most imports fail for me.
I tried to manually craft a lot of different Versions of the .zip containing the exported files.

When the zip only contains users.json with a few users it imports these successfully - but sometimes that fails too. With messages there’s almost always errors.
But I’ve also had one channel imported without errors and messages just not show up afterwards multiple times.

Hey @jimmyJames , thanks for pointing this issue and providing the error logs!
This PR should fix this issue. Feel free to comment there if the issue persists.

1 Like