Skip to content
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

Can I mix both cordova-sqlite-ext and cordova-sqlcipher-adapter to load pre-populated encrypted db file? #58

Open
JeongJun-Lee opened this issue Nov 11, 2017 · 3 comments

Comments

@JeongJun-Lee
Copy link

JeongJun-Lee commented Nov 11, 2017

I installed both cordova-sqlite-ext and cordova-sqlcipher-adapter normally.

And I tried to open the encrypted db with key option by below code,

private options = { name: 'pos.db', key: 'test', location: 'default', createFromLocation: 1 };
this.sqlite.create(this.options).then((db: SQLiteObject) => {...}

Like attachment, the db file is opened well, but the table in the db cannot be found.

image

@brodycj
Copy link
Collaborator

brodycj commented Nov 12, 2017

This combination is not supported and not expected to work. I will document this as a pitfall when I get a chance. Closing as a duplicate of storesafe/cordova-sqlite-storage#719, brodycj/cordova-sqlite-ext#67, and now brodycj/cordova-sqlite-ext#69.

@brodycj brodycj closed this as completed Nov 12, 2017
@brodycj
Copy link
Collaborator

brodycj commented Nov 12, 2017

I just raised apache/cordova-discuss#81 to safeguard against such a combination in the Cordova framework.

@brodycj
Copy link
Collaborator

brodycj commented Apr 25, 2018

From storesafe/cordova-sqlite-storage#719 (comment) (@brodybits):

In case of multiple sqlite plugins installed the behavior should be considered UNDEFINED. It may lead to compile error, runtime error, data loss due to multiple sqlite problem discussed in #626 (litehelpers/Cordova-sqlite-storage#626), other forms of data loss, etc. etc. Will be documented.

Will also be documented in this plugin version.

@brodycj brodycj reopened this Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants