bitwarden / bitwarden/ios

[PM-42964] Import fails when notes field has too much content

Open
#3,017 2 comments 0 reactions 0 assignees View on GitHub
app:password-manager bug
Dominant language
Swift
Stars
684
Forks
154
Avg merge
7d 2h
Merged PRs (30d)
32

Description

### Steps To Reproduce

When importing data from another password manager, import fails if an item's encrypted `notes` field has more than 10000 characters.

### Expected Result

There are two improvements that could be made here:
1. indicate to the user that a notes field has too much content (ideally saying _which_ item has the large content)
2. don't offer the "Retry Import" button, because the HTTP 400 response suggests that retrying with the same data will never succeed

### Actual Result

This error message appears, with an option to retry:
* "Import failed"
* "There was an issue importing all of your data. No data was deleted"

### Screenshots or Videos

_No response_

### Additional Context

When debugging the app, I see this in the Xcode console:

```
Response {REDACTED}: https://api.bitwarden.eu/ciphers/import 400
Headers: [
Accept-Ranges: bytes
Strict-Transport-Security: max-age=31536000
Date: Wed, 02 Sep 2026 20:00:00 GMT
x-frame-options: SAMEORIGIN
x-rate-limit-limit: 1m
x-content-type-options: nosniff
x-rate-limit-remaining: 59
Content-Type: application/json; charset=utf-8
x-xss-protection: 1; mode=block
x-rate-limit-reset: 2026-09-02T20:00:00.0000000Z
]
Body: {"object":"error","message":"The model state is invalid.","validationErrors":{"Ciphers[592].Notes":["The field Notes exceeds the maximum encrypted value length of 10000 characters."],"Ciphers[595].Notes":["The field Notes exceeds the maximum encrypted value length of 10000 characters."],"Ciphers[597].Notes":["The field Notes exceeds the maximum encrypted value length of 10000 characters."]},"exceptionMessage":null,"exceptionStackTrace":null,"innerExceptionMessage":null}
```

### Build Version

3eba70848

### What server are you connecting to?

EU

### Self-host Server Version

_No response_

### Environment Details

iPhone 15, iOS 27 beta

### Issue Tracking Info

- [x] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Contributor guide

Open the contributing guide

Research direction

Trace the iOS import flow that handles the /ciphers/import HTTP 400 response, starting with the validationErrors shown in the issue. The change is complete when an oversized notes field identifies the affected item and the failure state no longer offers Retry Import for this non-retryable response.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.