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

Dopbox sync : Database gets overwritten by empty file #1594

Closed
HifeFish opened this issue Jul 18, 2023 · 3 comments
Closed

Dopbox sync : Database gets overwritten by empty file #1594

HifeFish opened this issue Jul 18, 2023 · 3 comments

Comments

@HifeFish
Copy link

Describe the bug

Every now and then, KeepassDX overwrites the database with an empty file.

To Reproduce

Steps to reproduce the behavior:
I am not sure what triggers the problem. Possibly related to being flushed from memory in the background while trying to generate or save login data entered in Firefox.

Expected behavior

Never overwrite the database with an empty file. Possibly one could write a new file before deleting the old one in case a crash occurs while writing the database.

KeePass Database

  • Created with: KeepassXC 2.7.5, Ubuntu 22.04
  • Version: 4
  • Location: Remote file retrieved with Dropbox App
  • File provider (content:// URI): content://com.dropbox.product.android.dbapp.document_provider.documts/document/LONG ALPHANUMERIC STRING
  • Size: 1.6MB
  • Contains attachment: No

KeePassDX:

  • Version: 3.5.1
  • Build: Free
  • Language: English

Android:

  • Device: GalaxyS8+
  • Version: 9

Additional context

@HifeFish HifeFish added the bug label Jul 18, 2023
@J-Jamet
Copy link
Member

J-Jamet commented Jul 19, 2023

The problem comes from Dropbox, which doesn't manage file caches properly. https://github.com/Kunzisoft/KeePassDX/wiki/File-Manager-and-Sync#file-manager-application

Have you contacted the Dropbox team and what did they say about this?

@J-Jamet J-Jamet changed the title Database gets overwritten by empty file Dopbox sync : Database gets overwritten by empty file Jul 19, 2023
@J-Jamet
Copy link
Member

J-Jamet commented Jul 19, 2023

There's already a cache that prevents the file stream from being written if an exception is raised. Obviously, this can only work if the Dropbox application manages its errors and raises exceptions.

@J-Jamet
Copy link
Member

J-Jamet commented May 15, 2024

Behavior has been improved with the cache, linked to #1680

@J-Jamet J-Jamet closed this as completed by moving to Done in 4.0.7 Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants