Bug 458884 - Windows and Linux SQLite databases are not compatible
Summary: Windows and Linux SQLite databases are not compatible
Status: CONFIRMED
Alias: None
Product: kmymoney
Classification: Applications
Component: database (show other bugs)
Version: 5.1.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-08 16:19 UTC by Noah
Modified: 2023-08-14 18:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
GZip with windows and linux dbs (249.43 KB, application/gzip)
2022-09-08 16:19 UTC, Noah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noah 2022-09-08 16:19:12 UTC
Created attachment 151928 [details]
GZip with windows and linux dbs

SUMMARY
***
Creating an encrypted SQLite database in either Windows or Linux versions of KMyMoney will result in a database that is unable to be opened in the other. Windows cannot open Linux encrypted databases and vice-versa.
***


STEPS TO REPRODUCE
1. Create new KMyMoney database in Windows with a password
2. Save database
3. Attempt to open the database in Linux

OBSERVED RESULT
Application will repeatedly ask for a password, unable to open

EXPECTED RESULT
Database should open

SOFTWARE/OS VERSIONS
Windows: Windows 11, KMyMoney 5.1.3-5b03a2216
Linux/KDE Plasma: openSUSE Tumbleweed, KMyMoney 5.1.3
(available in About System)
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5

ADDITIONAL INFORMATION
Attached are both databases I created in Windows and Linux, each are encrypted with the password "password"
Comment 1 Jack 2022-09-08 16:28:38 UTC
Can the database be opened on the other platform if it is NOT encrypted?  (Trying to determine if the problem is related to SQLite itself or to the encryption.)  Also, what version of sqlite is installed on each platform (to be sure there isn't a version incompatibility.)  (I do not have a Windows instance easily available for me to test.)
Comment 2 Noah 2022-09-08 16:40:42 UTC
Hi Jack, yes without a password the database can be opened from linux and windows without issue. In linux the SQL versions are
libQT5Sql5-sqlite 5.15.5+kde166-1.2
SQLite 3.39.3-1.1

Windows I am unsure of the sqlite version since the DLL does not report the version number, it comes bundled with the KMyMoney installer. QTSql driver version is 5.15.5.0
Comment 3 Bug Janitor Service 2022-09-23 04:48:40 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Jack 2023-08-14 18:05:07 UTC
Not sure how this got lost, but in your last response, I think you misunderstood.  KMM does not bundle sqlite itself, and that is the version I was looking for, to see if it doesn't match the linux version.  However, given that an unencrypted sqlite database can successfullly be passed between LInux and Windows, it is almost certain that the problem is that the two different versions of sqlcipher are using different encryption mechanisms, or at least different keys.  I recently had a case where saving as an encrypted sqlite database on Linux, I could not even open it with sqlcipher from command line.  I think we will need an sqlite/sqlcipher expert to help solve this.