-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encryption not working on MacOS with Electron #4
Comments
@alangrainger yes, I had tested it on MacOS. You can try clone this repo and then |
Just tried again, it works on my side.
|
Awesome, thanks for the detailed info. Cloning unix-sqlcipher by itself worked perfectly, and I've narrowed the problem down to the I've created a demo repo you can test with. Just clone it and run:
It creates a database with encryption, and then tries to read that data without encryption. https://github.com/alangrainger/unix-sqlcipher-test If I try it on Windows (using If I try it on MacOS, it happily reads the data, even though it should not be able to. I used the Electron and electron-rebuild versions from your post here. |
@alangrainger oh it does need some investigation.. stuffs of electron-rebuild before that, did you try passing |
I'm trying your repo. |
You may need to run Bad coding on my part, but you get the idea!! |
@alangrainger hey, try this in unix-sqlcipher-test:
It works for me! Damn... looks like it was totally missing out in in electron guide of this repo, my bad! |
Electron guide for |
I can't get it to work, but I think there is a Markdown syntax issue with the code you posted above. This is what I'm trying:
Are those the correct commands? I also tried it with Pull the test repo again if you want - I fixed the broken async code. |
Up, anyone have find a solution for enable encryption on OSX & UNIX electron projects ? |
Update:
//enjoy Look node-sqlite3 README@Custom builds and Electron for info.. |
@neoxxx85 amazing, let me try also. I guess |
@alangrainger @neoxxx85 guys can have a try - https://github.com/fritx/sqlcipher-electron-demo |
It's not working for me under Linux - I believe the issue may be that the postinstall.js script is hard-coding sqlite3 version 3.x. In this thread it is suggested that for sqlite3 to work with Node v12 requires sqlite v4.0.7. |
hi, for I've tested it in MacOS, it's fine. |
@fritx Thanks, that was fast! It's not working for me yet, for some reason electron-builder (or electron-rebuild, I've tried them both) don't seem to think there is anything to rebuild. |
@fritx I looked at what the sqlcipher-electron-demo package scripts were doing and ran the following manually after running
Now it's working... so it looks like this extra script code is needed to tie off the linkage. |
Is there something I can do to improve unix-sqlcipher & cross-sqlcipher? I'm not sure if 0.0.6-alpha (#4 (comment)) should be merged. |
I'm noticing that with unix-sqlcipher now whenever I do an With cross-sqlcipher, I have recently stopped using it in favor of unix-sqlcipher because that seemed to fix a similar issue where any time I did an npm install of anything it would recompile sqlcipher, not once, but twice. Dunno if there's a similar situation there... |
@fritx I was going to test out cross-sqlcipher, but it looks like it's still at 0.0.2, which is including unix-sqlcipher@0.0.4... |
@michael-ts Have a look at this package instead, which is in active development and working flawlessly for me: https://github.com/journeyapps/node-sqlcipher I was able to drop-in replace without any changes. I'm using Electron 3.1.x. |
Hi @fritx, just wondering if you've successfully used this on MacOS?
The compile works without any errors, but the resulting Sqlite build doesn't have the cipher extension. Database access works without any issues, but the pragma password command has no effect - i.e. any password will open the database.
If you have had it working, what were the Node/NPM/Xcode versions you used?
Thanks
The text was updated successfully, but these errors were encountered: