bitwarden / android

Bitwarden mobile app for Android.
https://bitwarden.com
GNU General Public License v3.0
6.22k stars 788 forks source link

Broken sync when Data/Login is null #790

Closed champtar closed 4 years ago

champtar commented 4 years ago

Describe the Bug

Using bitwarden_rs server, Firefox/Chrome extensions, Android mobile app. My wife created a new entry that somehow ended up with null login/pass, everything continued to work except the Mobile app that was failing to sync.

Steps To Reproduce

I don't know how to reproduce it, but here is an extract of the response to /api/sync that the mobile app was getting:

{
  "Ciphers": [
...
    {
      "Attachments": [],
      "CollectionIds": [],
      "Data": null,
      "Edit": true,
      "Favorite": false,
      "Fields": null,
      "FolderId": null,
      "Id": "e3c473c5-a001-48d6-b8a6-b9225a604725",
      "Login": null,
      "Name": "<redacted / encrypted>",
      "Notes": null,
      "Object": "cipher",
      "OrganizationId": null,
      "OrganizationUseTotp": true,
      "PasswordHistory": null,
      "RevisionDate": "2020-03-13T17:05:42.535886Z",
      "Type": 1
    },
...

And here the same item when using the webui json export

{
  "folders": [
...
  ],
  "items": [
...
    {
      "id": "e3c473c5-a001-48d6-b8a6-b9225a604725",
      "organizationId": null,
      "folderId": null,
      "type": 1,
      "name": "<redacted>",
      "notes": null,
      "favorite": false,
      "login": {
        "username": null,
        "password": null,
        "totp": null
      },
      "collectionIds": null
    },
...

The broken entry was created using the Firefox extension.

Expected Result

Mobile App sync work

Actual Result

I could login, get a response from the server, but then the Android app was just saying "Syncing failed", with nothing in adb logcat :( Removing this item fixed the sync issue. This was the only item with "Data": null and "Login": null

Screenshots or Videos

None

Environment

Additional Context

I understand that bitwarden_rs is not the official server, but I see multiple report of broken sync, if this can fix it it's worth sharing

kspearrin commented 4 years ago

Data should not be null. I would bring this up with the bitwarden_rs people.