Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existing database fails to open; spinner just displays then disappears #4

Open
badger200 opened this issue Jul 10, 2018 · 14 comments
Open

Comments

@badger200
Copy link

I've been using PassDrop 2 without issue for several months, with the 1 and only database I always use.

Suddenly it's failing to open this database anymore. I tap to open, the spinner appears like its processing, then it simply disappears, leaving me at the main screen listing my database. The file works normally from my Desktop, and I checked and there is no lock file or anything I can see with the same name as this database in the Dropbox folder.

I tested adding a 2nd database - a mere copy of the primary db - and that works perfectly.

If I try to delete the existing database, PassDrop2 warns there are unsynced changes. I am sure deleting it and readding it would be a workaround, but it would forfeit my unsynced changes.

I even tried connecting to a PC and viewing the iOS syslog via 3uTools, comparing output of a failed open vs a successful open, but I can't see any clues. The dropbox TLS connection appears to be getting a 200 result in both cases.

iPhone 6, iOS 11.4. As this issue did appear only in the past few weeks, it's possible it coincides with the iOS 11.4 update, but I can't recall for sure.

@chadaustin
Copy link
Owner

Hmmm. I'm not going to be able to look at this for at least a few days (and probably longer) but I will try to scan the code to see which scenarios can cause the spinner opening and then kicking you back to the main screen.

@badger200
Copy link
Author

badger200 commented Jul 11, 2018 via email

@chadaustin
Copy link
Owner

chadaustin commented Jul 21, 2018

Hm, looks like there might be several scenarios where you wouldn't get any feedback, but it's hard to know exactly which. Do you have Xcode installed? (You don't need an Apple developer account.) I could help you run the code in Xcode on your machine and see which operation it's getting stuck at.

@badger200
Copy link
Author

badger200 commented Jul 22, 2018 via email

@chadaustin
Copy link
Owner

It's open source in that Apple way where it might take some fiddling to get it running! But when I took over maintainership I ported something like half the files to Swift so it should be fairly straightforward to step through the open database flow.

I haven't tried to open the project in an older Xcode, so I can't say whether it is likely to work or not. I do tend to apply whatever recommended Swift project settings Xcode recommends whenever I open it...

@badger200
Copy link
Author

badger200 commented Jul 24, 2018 via email

@chadaustin
Copy link
Owner

Yup, exactly. It's slightly more complicated, but the process is documented at https://github.com/chadaustin/passdrop/blob/master/BUILDING.md

@eglyph
Copy link

eglyph commented Jan 15, 2019

This issue seems to happen when a database was changed. Seen it several times already, every time a database was edited and changes weren't synced back to the Dropbox. Removing and adding a database resolves the problem, but the changes are indeed lost.

@chadaustin
Copy link
Owner

@eglyph Is it intermittent or can you reliably reproduce? If you could nail it down, I could take a look. Otherwise, we'll have to audit each of the asynchronous operations and see which one's error isn't being handled correctly.

@eglyph
Copy link

eglyph commented Jan 23, 2019

@chadaustin can't say "reliably", but I think I have figured when it happens.

Sometimes PassDrop doesn't sync a database back to Dropbox. If that happens and the database is modified on another device - we're getting this spin & disappear behavior. I was observing this today: a database was added to PassDrop and then an new entry was added. Dropbox hasn't received the updated file back. A database in the app would open just fine both read-only and read-write. However, when attempting to remove the database the app would warn about local changes not being synced back (which is correct). About three and a half hours later I decided to edit a database on my desktop (using MacPass if that matters), saved it and tried to open in PassDrop again. Got a spinner briefly and then nothing.

I hope this helps.

@eglyph
Copy link

eglyph commented Feb 11, 2019

By the way, I've noticed there's a green "sync" button at the bottom displayed after editing a database. Syncing a database explicitly seems to avoid this issue completely.

@chadaustin
Copy link
Owner

I tracked this down. It was a dumb bug. :/ 2a21e7b

I spent the weekend trying to put together a new release. Unfortunately, Apple requires a bunch of maintenance work to get the app back into a releasable state, which involves removing deprecated iOS APIs, making it compatible with the new 6.5" phones, and taking new screenshots, so it's going to take me a while.

In the meantime, the workaround is to manually sync the database while it's open for edit.

@chadaustin
Copy link
Owner

Long term, it would be great if the syncing happened automatically upon each edit, rather than manually.

@badger200
Copy link
Author

Awesome work, Chad! 👏🏼👏🏼👏🏼👏🏼

Ugh I know exactly what you mean about Apple’s ever changing App Store requirements.

They really ought to have a “single bug fix exception”. It’s not to anybody’s benefit for the bug to continue existing and the app to remain unpatched.

Makes me angry to think of how many older apps I have that may very well have significant bugs fixed, and they simply can’t update bc they’re stuck in the same position, and I’ll never know they even tried.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants