1password Import is Broken #17

Closed
opened 2026-02-04 16:15:54 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @NickBusey on GitHub (Jun 29, 2018).

Trying to import a 1password export (.1pif) file results in an error.

Docker logs show:

POST /api/ciphers/import application/json; charset=utf-8:
    => Matched: POST /api/ciphers/import
    => Warning: Data left unread. Force closing network stream.
    => Error: Couldn't parse JSON body: Error("EOF while parsing a string", line: 1, column: 1048576)
    => Outcome: Failure
    => Warning: Responding with 400 Bad Request catcher.
    => Error: Failed to write response: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }.
Originally created by @NickBusey on GitHub (Jun 29, 2018). Trying to import a 1password export (.1pif) file results in an error. Docker logs show: ``` POST /api/ciphers/import application/json; charset=utf-8: => Matched: POST /api/ciphers/import => Warning: Data left unread. Force closing network stream. => Error: Couldn't parse JSON body: Error("EOF while parsing a string", line: 1, column: 1048576) => Outcome: Failure => Warning: Responding with 400 Bad Request catcher. => Error: Failed to write response: Os { code: 32, kind: BrokenPipe, message: "Broken pipe" }. ```
Author
Owner

@mprasil commented on GitHub (Jun 29, 2018):

Can you provide some file to test this? I've got a feeling that this might be limited to very specific item in the export.

@mprasil commented on GitHub (Jun 29, 2018): Can you provide some file to test this? I've got a feeling that this might be limited to very specific item in the export.
Author
Owner

@dani-garcia commented on GitHub (Jun 30, 2018):

I think the issue here is our web server limits the size of the JSON input to 1 MB (Note how the number in column is equal to 1024 * 1024 bytes), so when an input exceeds the limit the server stops accepting more and the JSON we get is malformed.

I've increased the limit to 10 MB, which I think is probably enough, but if it isn't, you can increase it more by modifying the Rocket.toml file.

@dani-garcia commented on GitHub (Jun 30, 2018): I think the issue here is our web server limits the size of the JSON input to 1 MB (Note how the number in column is equal to 1024 * 1024 bytes), so when an input exceeds the limit the server stops accepting more and the JSON we get is malformed. I've increased the limit to 10 MB, which I think is probably enough, but if it isn't, you can increase it more by modifying the `Rocket.toml` file.
Author
Owner

@NickBusey commented on GitHub (Jun 30, 2018):

I can confirm it was file size. My import was 1.3MB, deleting half the contents worked.

I'm not sure the Rocket.toml is being included correctly in the docker image, or maybe I did something wrong when I tried to rebuild it. So I couldn't test your fix, but shrinking the file size worked. Thanks!

@NickBusey commented on GitHub (Jun 30, 2018): I can confirm it was file size. My import was 1.3MB, deleting half the contents worked. I'm not sure the Rocket.toml is being included correctly in the docker image, or maybe I did something wrong when I tried to rebuild it. So I couldn't test your fix, but shrinking the file size worked. Thanks!
Author
Owner

@mprasil commented on GitHub (Jun 30, 2018):

AFAIK Rocket.toml is not included in the docker image.

But if I understand the Rocket documentation right, you should also be able to also set the limit by setting environment variable:

ROCKET_LIMITS={json=10485760}

@mprasil commented on GitHub (Jun 30, 2018): AFAIK Rocket.toml is not included in the docker image. But if I understand the Rocket documentation right, you should also be able to also set the limit by setting environment variable: `ROCKET_LIMITS={json=10485760}`
Author
Owner

@dani-garcia commented on GitHub (Jun 30, 2018):

I just tested it, and what @mprasil said works. I added the rocket.toml file to the docker image anyway, so it should work now without any changes.

@dani-garcia commented on GitHub (Jun 30, 2018): I just tested it, and what @mprasil said works. I added the rocket.toml file to the docker image anyway, so it should work now without any changes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#17