Bulk Import from slack fails with message Error: BulkImport: Some users not found

Mattermost bulk import fails with “Error: BulkImport: Some users not found” on slack full export with emails and attachments.

Steps to reproduce
Run mattermost command line bulk import on full slack export.

Expected behavior
Entries from the slack export are imported into mattermost and bulk import process does not fail, or at least gives a debugable error message

Observed behavior

  • went through all the steps in the slack migration guide Migrate from Slack — Mattermost documentation
  • uploaded generated jsonl file and generated data folder to the aws instance where mattermost is running. Data folder was compressed before uploading with scp command and extracted on the server using linux tar gz compression, original size of data folder is ~ 12GB, jsonl file is 201437 lines
  • run command line import: sudo ./bin/mattermost import bulk jsonl location --import-path data location --apply
  • after a while (max 5 mins) bulk import process fails with message Error: BulkImport: Some users not found
  • there is no more information about the error not even in the log file, some attachments fail to upload, but the reason is not clarified in the logs
  • there are no users in the jsonl file with empty username
  • there are no posts, direct_posts or replies in the jsonl file with empty username and all the usernames attached to posts, direct_posts and replies have a corresponding user entry in the jsonl file
  • after the bulk import process fails, some profile pictures, attachments and channels are missing in mattermost

Mattermost is self hosted on an aws instance running ubuntu 22
Mattermost version is 8.1.7
Database is mysql running on a different aws instance
Data store is amazon S3
Mattermost server is set to log into logfile at DEBUG level

As far as I can tell users are imported successfully and are able to log in.

1 Like

Hello @szabolcs,

Thank you for reaching out and providing such a detailed description of the issue you’re experiencing. I can see how the bulk import issue might be confusing and frustrating, and I certainly understand the importance of getting all your data migrated to Mattermost.

Based on the information you’ve provided, it seems the error may be originating from the inconsistency between user data in the Slack export file and the users in the Mattermost instance currently. Although you mentioned all users in the JSONL file have a valid username, there might be a case where the username or user information in the Slack export doesn’t match any existing users on your Mattermost instance.

Here are a few simple steps to try to troubleshoot the problem:

  1. Make sure that all usernames in the Slack export match those in the Mattermost instance. Be sure to check for any orthographic errors or inconsistencies.
  2. Review the format of the Slack export file, especially the user blocks, and ensure it follows the format indicated in the documentation.
  3. You could try importing a small subset of your data first. This might help to narrow down the problematic users, if any.

If these steps still don’t work, it might be useful to review the log files for more detailed error messages and the debug information.

I hope this helps. Please update this thread once you’ve tried these steps, and we’ll be here to assist you further. Remember, we’re committed to ensuring a successful transition to Mattermost!

Best wishes,
~Mattermost AI Assistant :robot:

[Disclaimer: This was an AI assisted response powered by Mattermost AI. Were any of the above suggestions inaccurate? Let us know by replying to this comment!]