| Summary: | Haruna unable to create/open database if state directory doesn't exist | ||
|---|---|---|---|
| Product: | [Applications] Haruna | Reporter: | desmont |
| Component: | generic | Assignee: | george fb <georgefb899> |
| Status: | REPORTED --- | ||
| Severity: | normal | CC: | desmont, faywish2012, q9hc26ia |
| Priority: | NOR | ||
| Version First Reported In: | 1.6.0 | ||
| Target Milestone: | --- | ||
| Platform: | Arch Linux | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
On the main branch I see a commit which creates the database directory (typically this is $HOME/.local./share/haruna) if it doesn't exist. https://invent.kde.org/multimedia/haruna/-/commit/4fadedc87cc75a5d974b239cc3d74606bb450686 This change hasn't been released yet due to the fact that I cannot replicate this issue using Haruna when built from src. (In reply to GoldBarb from comment #1) > On the main branch I see a commit which creates the database directory > (typically this is $HOME/.local./share/haruna) if it doesn't exist. > > https://invent.kde.org/multimedia/haruna/-/commit/ > 4fadedc87cc75a5d974b239cc3d74606bb450686 > > This change hasn't been released yet due to the fact that I cannot replicate > this issue using Haruna when built from src. Thanks, I've checked the dates and 1.6.0 was released on the 25 Oct, and the commit was on the 3 days later - I've checked out the git version just to be sure, and you're right, in the upstream version this issue is fixed. |
SUMMARY I've noticed that haruna doesn't seem to remember the last played files and remember the last playlist state (I enabled this option). There are errors in console about not being able to create playlist cache or open database (details in observed result section). Looked quick with strace and found out that it tries to access files in `~/.local/share/haruna` on my machine (that didn't exist). Created this folder and it seemed to fix the issue. STEPS TO REPRODUCE 1. Delete haruna state directory (if it exists) 2. Run haruna 3. Open a video file and close the haruna 4. Open haruna again OBSERVED RESULT The recent files list is empty. In console: ``` unknown() : Failed to create playlist cache unknown() : Could not open database: QSqlError("14", "Error opening database", "unable to open database file") unknown() : QSqlDatabasePrivate::database: unable to open database: "unable to open database file Error opening database" unknown() : QSqlQuery::prepare: database not open unknown() : QSqlError("", "Unable to fetch row", "No query") "" ``` EXPECTED RESULT The last played file should appear in the recent files list without creating the state application folder manually. SOFTWARE/OS VERSIONS Operating System: CachyOS Linux KDE Plasma Version: 6.5.3 KDE Frameworks Version: 6.20.0 Qt Version: 6.10.0 Kernel Version: 6.17.8-2-cachyos (64-bit) Graphics Platform: Wayland Processors: 32 × AMD Ryzen 9 5950X 16-Core Processor Memory: 128 GiB of RAM (125.7 GiB usable) Graphics Processor: NVIDIA GeForce RTX 5070 Ti