Kunzisoft / Kunzisoft/KeePassDX

Automatically opening Updated Nextcloud database

Open
#1,693 1 comment 0 reactions 0 assignees View on GitHub
bug feature
Dominant language
Kotlin
Stars
7.3k
Forks
403
Avg merge
2d 10h
Merged PRs (30d)
1

Description

**Describe the bug**
When using a Nextcloud-stored Keepass database as the primary database, after it is updated (either in KeepassDX itself or on another device and then Nextcloud syncs the updated file), KeepassDX will try to automatically reopen this file, but its references are outdated and there are file errors.
Going back to the database list and reselecting this same database goes to a normal, error-free Login screen which works.

**To Reproduce**

Steps to reproduce the behavior:
1. Select a Nextcloud-stored Keepass database file and Log in to the database so it is remembered
2. Add/edit an entry and save database. Nextcloud client will sync the file
3. Close KeepassDX and re-open.
4. KeepassDX will try to reopen the database but will have errors and you cannot Login

**Expected behavior**
No errors

**KeePass Database**

- Version: 2
- Location: File saved in Nextcloud
- File provider (`content://` URI): content://org.nextcloud.documents/document/1b3c8a4383b4f5c1e7c29a592e23e4dd/29
- Size: 54Kb
- Contains attachment: No

**KeePassDX:**

- Version: 4.0.5
- Build: Free
- Language: English

**Android:**

- Device: TCL Tablet
- Version: 13

**Additional context**
This is how I select a database
![Screenshot_2023-11-12-11-42-10-719](https://github.com/Kunzisoft/KeePassDX/assets/11878115/add21716-8e5f-4bc6-b4a6-18267b686e50)
Just a snippet showing the URI
![Screenshot_2023-11-12-11-42-39-917](https://github.com/Kunzisoft/KeePassDX/assets/11878115/eaba76e9-05db-4150-9db8-5bde9c9860dc)
This is the error I get and I cannot login. Top row doesn't look normal either. Usually it shows the name of the database.
![Screenshot_2023-11-12-12-12-48-980](https://github.com/Kunzisoft/KeePassDX/assets/11878115/517017d7-662b-465d-be14-a874df4e27d5)
However from here I can go back and reselect the Database and then the next page works normally
![Screenshot_2023-11-12-12-32-30-695](https://github.com/Kunzisoft/KeePassDX/assets/11878115/fef84c9f-1835-4e14-815d-3ed466614fae)
![Screenshot_2023-11-12-12-32-36-571](https://github.com/Kunzisoft/KeePassDX/assets/11878115/0c291d4d-04bf-4020-a787-b30e9602f6ee)

Contributor guide

Open the contributing guide

Research direction

No source file or test is named in the report. Start by reproducing the Nextcloud-backed database reopen flow on Android 13, then trace how the remembered content:// URI is reopened after synchronization and compare it with manual reselection. Done means the remembered database reaches the normal Login screen without file errors after an updated file is synced.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.