Skip to content

Error encrypting in 3.11.0 #1732

Closed
Closed

Description

@StevenSorial

Details for the issue

What did you do?

tried to encrypt using SQLCipher 4 defaults

What did you expect to see?

encrypt

What did you see instead?

SQL logic error (SELECT sqlcipher_export('sqlitebrowser_edit_encryption');)

Useful extra information

The info below often helps, please fill it out if you're able to. :)

What operating system are you using?

  • Windows: ( version: ___ )
  • Linux: ( distro: ___ )
  • Mac OS: ( _version: 10.14.3 )
  • Other: ___

What is your DB4S version?

  • 3.11.0
  • 3.11.0-alpha1 or 3.11.0-beta*
  • 3.10.1
  • Other: ___

Did you also

Activity

  1. chrisjlocke commented on Feb 8, 2019

    @chrisjlocke
    Member

    Just an obvious check, but you're running 'DB Browser for SQLCipher' and not 'DB Browser for SQLite' ? Have to ask, as its not clear whether you are.

  2. StevenSorial commented on Feb 8, 2019

    @StevenSorial
    Author

    I'm running DB Browser for SQLite 3.11.0

  3. chrisjlocke commented on Feb 8, 2019

    @chrisjlocke
    Member

    Aah, I might be talking nonsense. Hopefully someone else can advise, as I don't run MacOS. I know on the Windows version, there are two executables - with and without encryption. I was thinking this was similar on the MacOS...

  4. justinclift commented on Feb 9, 2019

    @justinclift
    Member

    On macOS there's just the SQLCipher one. It only occurred to me well after we did the packaging on Windows... that for this release both the SQLite and SQLCipher executables bundle the exact same version of SQLite. We might as well have shipped just the SQLCipher one there too. 😉

  5. added
    bugConfirmed bugs or reports that are very likely to be bugs.
    on Feb 9, 2019
  6. MKleusberg commented on Feb 9, 2019

    @MKleusberg
    Member

    This seems to be the same issue as in #1690. In my comment there I mention the only explanation I have found so far for this: According to the SQLCipher guys a mismatch in the OpenSSL versions can cause this problem - so it would be a build thing.

  7. justinclift commented on Feb 9, 2019

    @justinclift
    Member

    k, I'll double check later on today. I manually tested our macOS binary being able to open/save SQLCipher 3 created databases. Don't think I checked for SQLCipher 4 ones though, rather assuming that would work.

    And yeah, in hindsight that could be better. 🙀

  8. justinclift commented on Feb 10, 2019

    @justinclift
    Member

    Uh oh. Just tested the SQLCipher 4 encryption here on macOS... and yep, same problem. 😱

    db4s-issue_1732-screenshot1

    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArrrggggggggggggh. 🤦‍♂️

  9. justinclift commented on Feb 10, 2019

    @justinclift
    Member

    Hmm, I can't get the SQLCipher encryption (using any settings of 3/4/custom) to encrypt a previously not-encrypted database. eg completely borked encryption functionality.

  10. justinclift commented on Feb 10, 2019

    @justinclift
    Member

    It will open a previously encrypted (SQLCipher 3) database though, without any issue.

    Damn. The one thing I didn't test. 😦

  11. added this to the 3.11.1 milestone on Feb 10, 2019
  12. justinclift commented on Feb 11, 2019

    @justinclift
    Member

    Same problem exists with a newly setup Win7 x64 VM too, so it's probably not a packaging error.

    At a guess, we'll probably just need to change the SQL statements we send to SQLCipher, and voila... it then works. That's my hope anyway. 😉

  13. 23 remaining items

  14. MKleusberg commented on Feb 13, 2019

    @MKleusberg
    Member

    @justinclift Definitely makes sense to test the actual patch I committed again with the v3.11.x branch 😄 Unfortunately I don't have an idea either regarding the zebra look...

  15. mgrojo commented on Feb 13, 2019

    @mgrojo
    Member

    The pretty zebra look 😉 was already seen in this screenshot by @wmertens in this comment. The dark mode is broken in Qt 3.11 and macOS Mojave. see QTBUG-68891. I suppose the workaround is to disable the dark mode in macOS.

    Given that it is said to be solved in 5.12.0 Alpha, we should try to apply the workaround described in this comment in QTBUG-73721. I tried that, but don't know how to apply it to all the cells. Another option is disabling word wrapping altogether until the bug is solved (hopefully, because there is a bit of debate about it being a bug or not). The situation for mac users with dark mode is worst than loosing word wrapping, in my opinion.

  16. justinclift commented on Feb 14, 2019

    @justinclift
    Member

    Thinking it over, if disabling dark mode support on macOS isn't too hard, we should do that for our 3.11.1 release, along with using Qt 5.11.3 for it. That's probably the safest bet, which is the right kind of thing for our release code.

    We can experiment with the word wrapping, dark mode (etc) + Qt 5.12 in the nightlies, as we're not under pressure to get an immediate, stable result there.

    Is disabling dark mode support on macOS fairly simple to do?

  17. mgrojo commented on Feb 14, 2019

    @mgrojo
    Member

    I don't know if we can disable dark mode from our code. Indeed I was refering it as a possible workaround for the users to do. I suppose they have the dark mode enabled at the OS level. (I know, it's a shame they'd had to disable only because of DB4S).

  18. justinclift commented on Feb 14, 2019

    @justinclift
    Member

    Ok. I'm just not yet sure how we're supposed to proceed.

    Our mac mini is too old to run macOS Mojave, and it seems like we need to be running that macOS release to get non-broken dark mode support for any macOS version user.

    Hmm... maybe Mojave will work in a VM on the mac mini? It wouldn't be efficient, but the thing is slow anyway, so no major difference there... 😉

  19. justinclift commented on Feb 15, 2019

    @justinclift
    Member

    Our mac mini is too old to run macOS Mojave

    macOS Mojave does seem to load and run in a VM, even though the host machine itself is too old. Will see if the rest of the needed bits for doing builds also work. If so, I'll make a test build for people to try the Dark Mode support with.

  20. MKleusberg commented on Feb 15, 2019

    @MKleusberg
    Member

    I have just cherry-picked the encryption fix over to the 3.11.x branch. So at least the original issue here should be resolved now 😄

  21. justinclift commented on Feb 15, 2019

    @justinclift
    Member

    Excellent. Thanks @MKleusberg. 😄

  22. justinclift commented on Feb 15, 2019

    @justinclift
    Member

    Well, this is a bit weird. I'm able to compile DB4S on macOS Mojave... but the node based program we use for creating the pretty looking .dmg is crashing.

    Attempting to build node on Mojave, specifically so it can be customised for our purposes, is failing on what seems like a bug in Homebrew. Filed an issue for it just now: Homebrew/brew#5741

    Might be able to get around that with a manual install of node. Not sure, will experiment.

  23. justinclift commented on Feb 15, 2019

    @justinclift
    Member

    Fixed the node crashing problem, by using a manual install of Nodejs rather than the Homebrew provided one.

    Created an initial "Dark Mode support" build of DB4S (from our master branch), and put it online for testing: #1493 (comment)

    Going to close this (encryption) issue for now as it's been solved. The Dark mode problem is being worked on in #1493. 😄

  24. justinclift commented on Feb 15, 2019

    @justinclift
    Member

    @Stevenmagdy If you have a minute to try that new test build (for the Dark Mode problem), that'd be super useful: #1493 (comment) 😄

  25. changed the title [-]error encrypting in 3.11.0[/-] [+]Error encrypting in 3.11.0[/+] on Feb 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    SQLCipherbugConfirmed bugs or reports that are very likely to be bugs.osx

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions