bitwarden / mobile

Retired Bitwarden mobile app for iOS and Android (MAUI/Xamarin).
https://bitwarden.com
GNU General Public License v3.0
35 stars 5 forks source link

iOS 2.3.1 sync broken #782

Open QABEFz0OAQOFfb6bbjkIrh8UjUX8VWq0Bu9cDmX opened 4 years ago

QABEFz0OAQOFfb6bbjkIrh8UjUX8VWq0Bu9cDmX commented 4 years ago

Describe the Bug

After upgrading to the latest official version of the iOS app, sync is broken; I've alreay tried to clear the authorised sessions. The macOS standalone app / browsers app / web seem to be ok and sync without any problem.

Environment

iOS 13.3.1 iPhone Xs Max and iPad Pro 10.5 Server: bitwardenrs docker version 2.12.1

pPmnBRRYhIemiuiy3VBYULJIzQyZaEvWMbCPH1P commented 4 years ago

Can you explain what about it is broken? Do you get an error message or what?

QABEFz0OAQOFfb6bbjkIrh8UjUX8VWq0Bu9cDmX commented 4 years ago

I've a message displayed on my mobile devices (in italian): NON CI SONO ELEMENTI NELLA TUA CASSAFORTE /THERE ARE NO ELEMENTS IN YOUR SAFE It appears I don't have any item in my server, but using web or standalone app under macOS I see everything...

Trying to manually sync it doesn't do anything, and either trying to reset any previous device connected doesn't help.

OSirVDN5oQiWkLNwuy01tXDeC57z5O8iHRu63rv commented 4 years ago

Sync has been broken for a long time, for a lot of user on iOS. Have a look at #457 & #723

7tq0xIKErEoQSoHM8cfERKMCvrpqQ3LEBKvJTeI commented 4 years ago

I also have this issue. Some background:

Initially I installed the app under a different AppleID. When the new update came, I had to reinstall the app, because I was no longer using the old ID and had to login under my current ID.

Download went fine, setup my self-hosted address, etc. > Logged in without issues > Accepted the Push for the auto sync. But no sync was happening. So I tried to manually sync and I got the 'Sync failed' error. I logged out and tried it again, now it stated a time for the last sync: 1-1-0001 01:00. No sync was done of course and the error still persists.

So I tried some different stuff. Deleted the app, deleted the iCloud storage for the app, hide the app from Apple Purchase history (so you are forced to authorize yourself again) > Force restarted my phone and reinstalled the app again. Guess what? Same story again "Sync failed".

Before the latest update the sync worked fine, but after installing the 2.3.1 version I seem to have this issue too.

EDIT: to add, all the other environments (browser, desktop client, etc work without any issues). Also logging in on the mobile browser works. So it's specifically the app that's having issues.

9lN1COIDrwxHoNc3RzkM29eLluorsZc7yYqTflq commented 4 years ago

I am on 2.3.1 iOS. I can add and edit on the browser (via vault.bitwarden.com), but the changes (to the notes) no longer show up on my iOS app. Changes I make to an entry in the notes area on iOS are not saved, and do not show up on the web site. Pulldown to refresh on app has no effect. I see no error messages.

What can we do to diagnose?

9lN1COIDrwxHoNc3RzkM29eLluorsZc7yYqTflq commented 4 years ago

Wow. Discovered that pull to refresh only refreshes the local database see comment here and does not execute a sync with the server as expected.

When I go to settings, I see a "Sync" with a date line under Manage. Turns out, this is tappable! It takes you to a new screen which you to execute a Sync Vault Now, the thing that Pull to Refresh doesn't do. When this manual sync is run, my notes from the web now appear on mobile. My lost mobile entries are still missing.

So, still unclear if the notes added to an entry are even being saved on iOS; they do appear to work properly on the vault.bitwarden.com site.

mpbw2 commented 4 years ago

@M4st3rITA @Panja0 @sgtsaint @michaelwexler Can you guys try testing sync again? I'm hopeful some recent server-side changes will clear this up.

OSirVDN5oQiWkLNwuy01tXDeC57z5O8iHRu63rv commented 4 years ago

@mportune-bw I’m using the self hosted version. So I don’t think this reflects on me?

mpbw2 commented 4 years ago

@Panja0 Ah yeah, probably not. My apologies.

CWJO5tGJbyUpb8wOv2Tjcn34LxuhFOJPnUxToRh commented 4 years ago

Having the same issue. Items created on web not synced to iOS client and vice versa. When manually syncing through settings, it then seems to get updates.

QLwdAi44xgHbyoLGI62VPfoJrmrJM8LUDYeOVKG commented 4 years ago

Cannot sync my vault on ios devices. Sync failed. Tried to log out and even reinstalled the app. Version: 2.3.1 (64) Iphone 13.3.1

When I login first time into my vault the app says that there are no passwords.

vRKedvNEP28QSGh4iINX3GxzZHMvbpY2yx9WNhZ commented 4 years ago

I was also having this problem on both iOS and Android (self-hosting bitwarden_rs). Browser add-ons in FF and Chrome continued to sync fine. I tried various older versions of the Android app, all the way back down to v2.2, but all had the same issue. Eventually I solved it by upgrading my bitwarden_rs docker container to the latest version (it was 2.12.0, now it's 2.13.2). Now sync on Android and iOS works again :) Probably a breaking change in the API between 2.12 and 2.13 I imagine.

CWJO5tGJbyUpb8wOv2Tjcn34LxuhFOJPnUxToRh commented 4 years ago

@wormoworm Im not seeing a fix and my containers are up to date. Using the automated script 4 days ago with docker compose.

d730c32d25de        bitwarden/nginx:1.33.1                   "/entrypoint.sh"         4 days ago          Up 4 days (healthy)   80/tcp, 8443/tcp, 0.0.0.0:8282->8080/tcp   bitwarden-nginx
a574dc17968c        bitwarden/admin:1.33.1                   "/entrypoint.sh"         4 days ago          Up 4 days (healthy)   5000/tcp                                   bitwarden-admin
2a41f0fd51f1        bitwarden/mssql:1.33.1                   "/entrypoint.sh"         4 days ago          Up 4 days (healthy)                                              bitwarden-mssql
79c24fd6b81c        bitwarden/events:1.33.1                  "/entrypoint.sh"         4 days ago          Up 4 days (healthy)   5000/tcp                                   bitwarden-events
6b71ae619985        bitwarden/notifications:1.33.1           "/entrypoint.sh"         4 days ago          Up 4 days (healthy)   5000/tcp                                   bitwarden-notifications
01fecb8589a5        bitwarden/attachments:1.33.1             "/entrypoint.sh"         4 days ago          Up 4 days (healthy)                                              bitwarden-attachments
0f95f6658763        bitwarden/api:1.33.1                     "/entrypoint.sh"         4 days ago          Up 4 days (healthy)   5000/tcp                                   bitwarden-api
6356254f98ac        bitwarden/icons:1.33.1                   "/entrypoint.sh"         4 days ago          Up 4 days (healthy)   5000/tcp                                   bitwarden-icons
40bce8b07bc2        bitwarden/web:2.13.2                     "/entrypoint.sh"         4 days ago          Up 4 days (healthy)                                              bitwarden-web
5efbf0d83afd        bitwarden/identity:1.33.1
vRKedvNEP28QSGh4iINX3GxzZHMvbpY2yx9WNhZ commented 4 years ago

@muzzah I think the difference between our setups is that I'm using the unofficial bitwarden rust server container. I settled on this option as I found it easier to setup and it uses very little resources when running.

CWJO5tGJbyUpb8wOv2Tjcn34LxuhFOJPnUxToRh commented 4 years ago

Ah ok yes that makes sense

4TbxmNTKoAHSDgcvhI5PhgLvWcLofERTZTuU6r2 commented 4 years ago

I'm using self-hosting Bitwarden_rs and I think there is a bug related to login element with both username and password empty. I solved the issue with this workaround:

Exported my vault to .json. Then I did a search for all login elements with:

"username": null, "password": null

Then I deleted these elements from my vault (using desktop or web interface).

App sync started syncing again.

Maybe it solves for Bitwarden also.

7tq0xIKErEoQSoHM8cfERKMCvrpqQ3LEBKvJTeI commented 4 years ago

I'm using self-hosting Bitwarden_rs and I think there is a bug related to login element with both username and password empty. I solved the issue with this workaround:

Exported my vault to .json. Then I did a search for all login elements with:

"username": null, "password": null

Then I deleted these elements from my vault (using desktop or web interface).

App sync started syncing again.

Maybe it solves for Bitwarden also.

Holy sh*t... Thank you! This worked. My vault had three (duplicate) entries with null values. Removing those and importing the json into a cleaned out vault was the fix for me.

CWJO5tGJbyUpb8wOv2Tjcn34LxuhFOJPnUxToRh commented 4 years ago

Haha that did it for me too. I found a couple of entries with null usernames. Filled them and sync kicked back in

QLwdAi44xgHbyoLGI62VPfoJrmrJM8LUDYeOVKG commented 4 years ago

I can confirm it worked for me also. Had 3 records with empty username and password in my vault. Deleted them and sync worked like a charm:)

ECwqkGReHzJ0okqxl5VcG9hFja1rJH2Eq8eutCG commented 4 years ago

yes! I had the same problem, and i found some items with empty username and password. Thanks!

pPmnBRRYhIemiuiy3VBYULJIzQyZaEvWMbCPH1P commented 4 years ago

Are you guys using bitwarden_rs or the official bitwarden server?

ECwqkGReHzJ0okqxl5VcG9hFja1rJH2Eq8eutCG commented 4 years ago

I use the bitwarden_rs based home assistant addon

CWJO5tGJbyUpb8wOv2Tjcn34LxuhFOJPnUxToRh commented 4 years ago

@kspearrin official here, not bitwarden_rs. I think problem lies in the client syncing code

NxVZZFOvaN9aP3acNgRmI9drtNxxrJvoftRGsnV commented 2 years ago

I have a question relating to this. What is the intended sync behavior for the apps, as in, when and how often do they sync? I recently changed a password using the browser plugin and then tried to log in using the new credentials on my phone. The bitwarden app on my phone kept providing the old password until I manually opened that vault entry in the app, which it then synced. Is this normal behavior?