Skip to content

3.0.2 CSV Import fails with "Failed to start import operation" #16709

@githubkoma

Description

@githubkoma

Description:

Getting Error "Failed to start import operation" on CSV Message import in v3.0.2, which worked on version v2.4.x just fine

Steps to reproduce:

  1. https://chat.xyz.de/admin/import/new
    • CSV
    • Upload File mychannel.zip
  2. Get automatically redirected to: https://chat.xyz.de/admin/import/prepare
  • Page states: MESSAGES: 18
  1. Click on start import

Expected behavior:

Import Messages into channel just fine

Actual behavior:

RED Banner: "Failed to start import operation"

Log with Debug enabled (see below)

Server Setup Information:

  • Version of Rocket.Chat Server: 3.0.2
  • Operating System: CentOS7
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 12.16.1 - x64
  • MongoDB Version: 4.0.16

Client Setup Information

  • Desktop App or Browser Version: Chrome
  • Operating System: Win10

Additional context

Relevant logs:

I20200225-13:04:10.539(0) Meteor ➔ method startImport -> userId: 5KGzuX7NaZoTnEKzY, arguments: [{"users":[],"channels":[]}] 
I20200225-13:04:10.542(0) CSV Importer ➔ warn Duplicated instance 
I20200225-13:04:10.544(0) CSV Importer ➔ debug Found existing import operation 
I20200225-13:04:10.545(0) CSV Importer ➔ debug Constructed a new CSV Importer. 
I20200225-13:04:10.565(0) CSV Importer ➔ debug CSV is now at importer_importing_started. 
I20200225-13:04:10.574(0) API ➔ debug post startImport threw an error: TypeError: Cannot read property '_id' of undefined     at CsvImporter.startImport (app/importer-csv/server/importer.js:197:44)     at MethodInvocation.startImport (app/importer/server/methods/startImport.js:42:28)     at MethodInvocation.methodsMap.<computed> (app/lib/server/lib/debug.js:67:34)     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12)     at packages/ddp-server/livedata_server.js:1689:15     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)     at packages/ddp-server/livedata_server.js:1687:36     at new Promise (<anonymous>)     at Server.applyAsync (packages/ddp-server/livedata_server.js:1686:12)     at Server.apply (packages/ddp-server/livedata_server.js:1625:26)     at Server.call (packages/ddp-server/livedata_server.js:1607:17)     at DDPCommon.MethodInvocation.<anonymous> (app/api/server/v1/import.js:35:26)     at packages/dispatch_run-as-user.js:211:14     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)     at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)     at Object.post (app/api/server/v1/import.js:34:10)     at app/api/server/api.js:343:82     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)     at Object._internalRouteActionHandler [as action] (app/api/server/api.js:343:39)     at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)     at packages/nimble_restivus/lib/route.coffee:59:33     at packages/simple_json-routes.js:98:9  => awaited here:     at Promise.await (/opt/Rocket.Chat/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:60:12)     at Server.apply (packages/ddp-server/livedata_server.js:1638:22)     at Server.call (packages/ddp-server/livedata_server.js:1607:17)     at DDPCommon.MethodInvocation.<anonymous> (app/api/server/v1/import.js:35:26)     at packages/dispatch_run-as-user.js:211:14     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)     at Object.Meteor.runAsUser (packages/dispatch_run-as-user.js:210:33)     at Object.post (app/api/server/v1/import.js:34:10)     at app/api/server/api.js:343:82     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)     at Object._internalRouteActionHandler [as action] (app/api/server/api.js:343:39)     at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32)     at packages/nimble_restivus/lib/route.coffee:59:33     at packages/simple_json-routes.js:98:9 
I20200225-13:04:10.575(0) API ➔ debug Failure {   statusCode: 400,   body: {     success: false,     error: "Cannot read property '_id' of undefined",     stack: undefined   } }

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions