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

**URL:** <https://forum.mattermost.com/t/bulk-import-from-slack-fails-with-message-error-bulkimport-some-users-not-found/17656>\
**Category:** Troubleshooting\
**Created:** [January 5, 2024, 6:51pm UTC](https://forum.mattermost.com/t/bulk-import-from-slack-fails-with-message-error-bulkimport-some-users-not-found/17656 "2024-01-05T18:51:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![szabolcs](https://avatars.discourse-cdn.com/v4/letter/s/c0e974/32.png) [@szabolcs](https://forum.mattermost.com/u/szabolcs)\
**Post date:** [January 5, 2024, 6:51pm UTC](https://forum.mattermost.com/t/bulk-import-from-slack-fails-with-message-error-bulkimport-some-users-not-found/17656/1 "2024-01-05T18:51:13Z")

</div>

**Summary**  
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](https://docs.mattermost.com/onboard/migrate-from-slack.html)
- 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.

---

<div class="post-metadata">

**Author:** ![john.combs](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/john.combs/32/7118_2.png) [@john.combs](https://forum.mattermost.com/u/john.combs)\
**Post date:** [January 31, 2024, 2:39am UTC](https://forum.mattermost.com/t/bulk-import-from-slack-fails-with-message-error-bulkimport-some-users-not-found/17656/2 "2024-01-31T02:39:27Z")

</div>

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](https://docs.mattermost.com/onboard/migrate-to-mattermost.html#migrating-from-slack-using-the-mattermost-bulk-import-tool).
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 🤖

_[**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!**]_
