Problems importing json from previous bitwarden instance

I’ve recently set up a self-hosted Bitwarden instance and successfully completed the installation process. Now, I’m attempting to migrate my data from my previous Bitwarden account to this new setup. Exporting the JSON file from the original account went smoothly, with no issues whatsoever. However, when I try to import this file into my self-hosted instance, I encounter an error message stating, “An unhandled server error has occurred,” without any additional details provided.

Could anyone offer some advice on how to resolve this issue? Thank you in advance!

PD: My json has 14000 lines

@Nictum Welcome to the forum!

Do any of these conditions apply in your case?

Hey Grb! Nope, no one applies :pensive:

You may have to condition the file. I would suggest that you try stripping (deleting) all id field-value pairs (e.g., "id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaa",) as a start. If that doesn’t work by itself, also remove folderID data (e.g., "folderId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",) from the JSON structure; if you do this, you may need to also delete the entire "folders" array from the top of the JSON structure:

"folders": [
    {
      "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "name": "My Folder"
    }
  ],

It may be a good idea to do this on a test file first, to verify that it solves the problem. You can download this sample JSON, and condition it as above; for this example file, you should also strip or modify the timestamps — e.g., replace the YYYY-MM-00 placeholders with a valid year-month-date value (such as 2024-01-01).

I have restarted the server and the import has finished correctly. Sorry for not trying this earlier… :bowing_man:

1 Like