sqlitebrowser / sqlitebrowser

Official home of the DB Browser for SQLite (DB4S) project. Previously known as "SQLite Database Browser" and "Database Browser for SQLite". Website at:
https://sqlitebrowser.org
Other
20.52k stars 2.09k forks source link

Same db that opens in Windows ver Fails to open in Linux ver #1110

Closed JD4x4 closed 6 years ago

JD4x4 commented 6 years ago

Details for the issue

Databases that open in Windows and Portable versions 3.9.1 fail to load in Linux version 3.9.99. Error message is "Invalid File Format". Db files are not corrupt, as they open without issues in Win versions.

Useful extra information

I'm opening this issue because:

I'm using DB4S on:

I'm using DB4S version:

I have also:

chrisjlocke commented 6 years ago

v3.9.99 are the 'nightly' versions. Have you tried the latest 3.10 version? Is it possible to upload (sans data if needed - or only with one fake record?) to https://dbhub.io so we could have a look?

justinclift commented 6 years ago

Hmmm, on that note the recent nightly versions should say "3.10.99". If they're not, that's a bug in our versioning. :wink:

chrisjlocke commented 6 years ago

They do. 📲

JD4x4 commented 6 years ago

I will try to duplicate the db, obfuscate the personal data (DNA results!) and upload. I'll double check that the duplicated db also fails first. Thinking about this, I might have another db which opens on my Win machine that I haven't yet tried on my Linux box.

As for the Linux version, I had tried with an older version and when that failed I downloaded the newer version following the links on sqlitebrowser.org to the ppa. I'll double check but I'm pretty sure it was 3.9.99.

Had given up on working on the project on my Linux box, and have been working in Win 10 but I'll try to get to it and your answers/files soon. Thanks.

justinclift commented 6 years ago

Thanks @JD4x4. :smile:

justinclift commented 6 years ago

Ahhh, looking at the Ubuntu repos, the "stable" one still has DB4S 3.9.x in it.

@deepsidhu1313 With the stable repo, any idea on when that'll be updated to DB4S 3.10.x? :smile:

JD4x4 commented 6 years ago

@justinclift Yes, that was the repo & version I used. I tried the other Win db and it opens with no problem, so it must be something odd about only this db. I deleted the data from the problem db and it still fails to load in Linux, but fine under Windows. I'm just going to attach it here since it's so small and I'm not the author/creator. Linux_problem_db.zip

justinclift commented 6 years ago

Thanks @JD4x4, just tried that database on Fedora (Linux) using DB4S 3.10.0... and it opened.

At a guess, it's something to do with the older version of DB4S being in our "stable" Ubuntu PPA.

Would you be up for changing to our Nightly build PPA?

    https://github.com/sqlitebrowser/sqlitebrowser#nightly-builds-1

In theory, that should take care of the problem and you'll be able to open it in Linux too. :smile:

MKleusberg commented 6 years ago

I often had this issue when switching between the 'normal' version and the SQLCipher version during development, so I think I know what's causing this 😄

The SQLite developers sometimes add new features that aren't backward compatible. If you use them in a database and then try to open it using an older version of the SQLite library it gives you the (somewhat confusing) 'Invalid file format' error message. You can check if that could be the case by starting DB4S on Windows and on Linux and opening the Help -> About window. There it tells you the SQLite version which we then can compare. Depending on the way you've installed DB4S on Linux, it might be using the distro's version of SQLite which could be way older than the one in the newer Windows builds. That would also explain why this is just happening for the one database for you 😄

deepsidhu1313 commented 6 years ago

My apologies this is my mistake. I was waiting 4 the message from Justin clift on any issues with latest release. As he mentioned few days ago he will be updating the version number in the file. And instead doing follow up on that, it skipped my mind (i am buried under thesis :P ). Pushed packages to nightly build ppa. Will going to publish stable packages soon.

My sincere apologies for the delay and any language mistakes in this email.

On Fri, Sep 1, 2017 at 2:29 AM, Martin Kleusberg notifications@github.com wrote:

I often had this issue when switching between the 'normal' version and the SQLCipher version during development, so I think I know what's causing this 😄

The SQLite developers sometimes add new features that aren't backward compatible. If you use them in a database and then try to open it using an older version of the SQLite library it gives you the (somewhat confusing) 'Invalid file format' error message. You can check if that could be the case by starting DB4S on Windows and on Linux and opening the Help -> About window. There it tells you the SQLite version which we then can compare. Depending on the way you've installed DB4S on Linux, it might be using the distro's version of SQLite which could be way older than the one in the newer Windows builds. That would also explain why this is just happening for the one database for you 😄

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sqlitebrowser/sqlitebrowser/issues/1110#issuecomment-326510689, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVA8hTNI1FMGZVOGq9Avb68lqzwgrZ9ks5sd7JigaJpZM4PILIp .

-- Regards Navdeep Singh Sidhu

justinclift commented 6 years ago

No worries at all @deepsidhu1313. Thanks, and good luck with the thesis. :smile:

deepsidhu1313 commented 6 years ago

Thanks Justin.

On Fri, Sep 1, 2017 at 3:18 AM, Justin Clift notifications@github.com wrote:

No worries at all @deepsidhu1313 https://github.com/deepsidhu1313. Thanks, and good luck with the thesis. 😄

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sqlitebrowser/sqlitebrowser/issues/1110#issuecomment-326520125, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVA8mpmZXadb8rH9zrtQ0gf0P4iSAjcks5sd73NgaJpZM4PILIp .

-- Regards Navdeep Singh Sidhu

deepsidhu1313 commented 6 years ago

Packages will be up in few. Please let me know if encounter any problem. I am also was working on snap packages(Will be happy if somebody can guide me with that). I haven't spend time on that in weeks. I will post any update on that too, hopefully soon.

JD4x4 commented 6 years ago

I switched to the latest nightly build (I think! See my screen capture!) and same problem. The "About" box captures from my Win & Linux vers are attached, also my Linux Synaptic package info. Notice the difference in the pkg. mgr. vs About box versions. ?? I'm going to bed (it's almost 5am East Coast US) so I'll be dreaming about it, lol. Thanks, All!

versions

MKleusberg commented 6 years ago

So the Windows 10 version uses an SQLCipher version based on SQLite 3.15.2 whereas the Linux version uses SQLite 3.8.2. That would strengthen my theory :wink:

deepsidhu1313 commented 6 years ago

Hi, I would like to point out two things.

  1. @JD4x4 Ubuntu 14.04 & derivatives (LM 17) are no longer supported. My apologies as it seems the QT framework in the default repos is not compatiable with the source code or vice versa.

  2. @MKleusberg Builds for Linux (Ubuntu) use packages available in the repos. So automatic builds will use the version that is available in the repo, until or unless we maintain a separate repo to deploy dependency packages, for all versions of Ubuntu supported by Launchpad (Xenial,Zesty & Artful) screenshot at 2017-09-01 11-08-03

justinclift commented 6 years ago

Ahhh. I guess that means Linux Mint 17 is based off Ubuntu Trusty then.

@JD4x4 You're probably stuck with the older DB4S then, unless you're up for compiling SQLite and DB4S yourself. (?) It's pretty easy to compile DB4S once a custom SQLite is installed, if you're interested. :smile:

JD4x4 commented 6 years ago

Thanks all! So much for Mint LTS, lol. I was thinking of checking out just how "Xenial" "Sonya" was, anyway. 😀

deepsidhu1313 commented 6 years ago

Ahhh. I guess that means Linux Mint 17 is based off Ubuntu Trusty then.

Yes. :smile: Linux Mint Version History. Basically it is ubuntu under the hood, with tweaks to make it more user friendly.

Thanks all! So much for Mint LTS, lol. I was thinking of checking out just how "Xenial" "Sonya" was, anyway.

@JD4x4 It has nothing to do Mint or LTS. Some time applications and operating systems don't have goals aligned in same way.

My apologies for speaking on the behalf of DB4S team, so my following statement doesn't hold any significance. But my observation as a regular user of this application, development team always intend to provide best experience of latest technology and features. Striking the balance between features and stability is always challenging. So sometimes they have to compromise stability (support in this case) to attain new features and better performance. :smiley:

JD4x4 commented 6 years ago

A final follow-up note- fwiw, SQLite Manager Firefox add-on works cross platform. It's using SQLite v 3.19.2 somehow on both machines. No Linux OS upgrade or Windows DB4S downgrade necessary.

justinclift commented 6 years ago

Thanks @JD4x4, that's useful info. :smile:

Guessing here, but it's probably using the version of SQLite that comes with Firefox, and they're probably bundling something more recent to ensure they have access to the latest features. So, that should probably work well enough for you for a few months. :smile:

Not sure what the future holds for SQLite Manager, as Firefox is removing support for old style extensions (which it is). It'd need rewriting to support Firefox's new approach, but it doesn't seem actively developed. 😕

On a related note, we've just started publishing linux "AppImage" builds to our releases section:

    https://github.com/sqlitebrowser/sqlitebrowser/releases/tag/continuous

"AppImages" bundle together all of the needed bits (SQLite, etc) so they don't need to depend on what's installed on computer already. In theory this should work ok. We're still having a few teething issues (#1118), but they'll be sorted out in a bit. :smile: