Giter Site home page Giter Site logo

Comments (7)

keepassium avatar keepassium commented on May 27, 2024

Thank you, Andreas. It is hard to say whether the issue on KeePassium's or on system's side. That is, whether the system even starts the AutoFill process…

But just to check for possible delays on KeePassium's side:

  • Do you use a local database? (Based of #337, I assume yes)
  • How long does it normally take to unlock the database?
  • Does it work normally (immediately) if you tap the "key" button instead of the suggested account?

from keepassium.

akuropka avatar akuropka commented on May 27, 2024

Yes, local database is used.
It goes very fast... within less a second I would say.
If I select the key then I get other suggestions if available but selecting them brings the same issue.

It doesn't happen always but with time it is some sort of annoying.

Edit: Sonetimes the database(s) cannot opened in the app. Maybe this is related? Please see the screenshots.

IMG_0977
IMG_0978

from keepassium.

keepassium avatar keepassium commented on May 27, 2024

Thank you for the details and sorry for the slow response.

Sometimes the database(s) cannot opened in the app. Maybe this is related?

Yes, this would explain why nothing happens. I guess, the AutoFill is waiting for the file longer than the system is willing to wait for AutoFill, so after a few seconds the system terminates the AutoFill.

A good diagnostic step would be to reduce the DB loading timeout: open the app → navigate to Databases → long-press the database → Database Settings → in the "AutoFill" section, set "Consider file unreachable" to something like 1 or 5 seconds. This way, if Quick AutoFill fails to load the database, ahem, quickly, it will show the AutoFill dialog with more visual feedback about the process. It will probably still fail, but at least with some message.

This issue, however, raises two additional questions:

  • Why it takes so long to read a local file. This sounds awfully similar to #109. Do you happen to have a network share (SMB server) added to the Files app?
  • Why the cached file (.latest.kdbx) is not found. The only explanation I can think of is that in-app backups are disabled in app settings. Is this the case?

from keepassium.

akuropka avatar akuropka commented on May 27, 2024

Thank you for your reply. Long story short...

  • Yes, I have network shares configured in the Files App and I know about the delays. Based on screenshots I was not connected to the local network. But since the issue that time was fixed I am wondering if this is an regression?
  • Yes, backups are disabled. Since I am using the database only local and in read-only there are no backups needed in my case.

from keepassium.

keepassium avatar keepassium commented on May 27, 2024

But since the issue that time was fixed I am wondering if this is an regression?

I'm afraid this is just another facet of the same issue. The freezing was caused by system's "bookmark resolution" call, which is responsible for locating files stored outside of app sandbox. (This step is required by system's security restrictions.) This call is supposed to return quickly, but takes forever when there is an unreachable SMB server in Files. Since the underlying system issue cannot be fixed on the app side, the "fix" were just a series of workarounds to reduce problem's impact on usability.

  • The first one treated the symptom: instead of freezing for a minute, the UI remained responsive and DB loading would be cancelled after a few seconds.
  • The second one allowed loading of internal files that can be found and used without the "bookmark resolution" step.
  • The third one was just a speed-up for bookmark resolution in "untroubled" conditions; it proved problematic and was reverted a month later.

So when the user opens KeePassium, the app can find and load an internal database (the one in On My iPhone / KeePassium) without touching any of the "frozen" system APIs. Everything looks fine.

The problem is that unlike the main app, AutoFill cannot skip bookmark resolution step, because the main app's Documents folder is not a local folder for AutoFill. For system, the folder with the database is internal for the app, but external for the AutoFill. Without bookmark resolution, AutoFill would be unable to see local files of the app (as happened recently, see #338).

And since AutoFill cannot avoid the problematic system call, it cannot get access to the database and stops after a timeout. If you enable backups, the AutoFill should fall back to loading a backup file (which avoids problematic calls) and theoretically should work.

from keepassium.

akuropka avatar akuropka commented on May 27, 2024

I see Apple makes it complicated to develop a solution aside of their own (however, that I never used).

In the past months I started to use StrongBox on another device (with same setup and file - database saved locally, using readonly, no backups). It has here and there some other issues but it seems they've been avoiding those difficulties with Apple here present.

from keepassium.

keepassium avatar keepassium commented on May 27, 2024

The last time I checked, StrongBox AutoFill always used an internal cached copy of the database. (Here's Mark attesting to the fact in 2021, and outlining the challenges of accessing local files from AutoFill.)

While one cannot run StrongBox in debugger (its repo is non-compilable), I did just re-check the code and AutoFill does seem to still rely on cached databases.

You can also verify this directly: when you transfer an updated database to the phone, the file shown in SB AutoFill won't update until you launch the main SB app.

In contrast, KeePassium AutoFill does attempt to work with the original database first, and only then falls back to cached copy (aka "latest backup"). It's just KeePassium offers the option to disable backup (aka caching) — and you did disable it — whereas StrongBox just caches databases without asking. For a fair comparison, you would need to enable backup in KeePassium.

from keepassium.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.