bpellin / keepassdroid

KeePass implementation for android
http://www.keepassdroid.com
Other
1.38k stars 346 forks source link

The phone ran out of memory while parsing your database #359

Open wolandtel opened 5 years ago

wolandtel commented 5 years ago

I've installed keepassdroid on a new phone (Xiaomi Mi 8) with android 8.0. Trying to open 2,1Mb kdbx database I've got subj. I allowed keepassdroid access to the system memory (btw it didn't request it).

haloway13 commented 5 years ago

I have a OnePlus 6. I have reason to believe that I have plenty of memory/space (33GB) on my phone. DB is at 340k (about 300 entries). Opens fine on computer, fails with the message: "The phone ran out of memory while parsing your database. It may be too large for your phone."

Any suggestions for me?

twt2 commented 4 years ago

I suddenly started having this problem today. Possibly related: there's a new version of KeePassXC I'm using on my desktop and it seems likely there's an incompatibility between them. I don't know the size of my database but it hasn't changed significantly since a day or two ago. I sync using DropBox and have been "bitten" by a bug that scrambles the database when I edit it using KeePassDroid multiple times within a few minutes. This is NOT the same error as I see when that happens.

EDIT: I decided to create some test files using KeePassXC 2.5.1 and KeePass 2.41 to see if I could replicate the issue in KeePassDroid 2.4.1. Strangely, the problem has disappeared on the original file, so I presume it was a transitory issue, maybe due to a subtle sync issue with DropBox. ?? (When DropBox scrambles the file, it's usually damaged everywhere and can no longer be opened, not just on KeePassDroid.)

EDIT2: I'm getting the error again today. (26 November 2019) All of my test databases open without the memory error (though they only have a one or a few data entries each). I may try rebooting the phone, but this is quite disappointing.

EDIT3: a reboot didn't help. The database won't open in KeePassDroid but it opens fine in KeePassXC AND KeePass2 in Ubuntu. (At first I thought it was failing to open in KeePass2 but I was apparently opening the wrong file.)

EDIT4: Saving a "fresh" copy of the database from either KeePassXC or KeePass2 makes it open-able from KeePassDroid. The difficult database is 225.5kB and the re-saved databases are 225.4kB (KeePassXC) and 224.9kB (KeePass2). According to KeePass2 I have 748 entries in 12 folders (categories) plus 6 entries in the recycle bin.

EDIT5: The keepass2android app was able to open the problematic file.

twt2 commented 4 years ago

Just leaving a reply message in case the thread isn't getting updated with all my edits.

If anyone can suggest a different sort of test file I could produce that would help resolve this (or at least give me a useful workaround when I can't get the database to open on my phone but I don't have access to a Linux computer).

NOTE: KeePass2 is an ugly mono program in linux but it gives useful information not easily visible from other KeePass compatible applications.

J-Jamet commented 4 years ago

I'm working on this issue in my fork and I notified several structural problems: