"file is encrypted or is not a database" using node js sqlite3 package with SQLCipher

Hello @developernotes
I have generated encrypted database as shown in this article. I have requirements such that I am using sqlite3 package and have to follow its syntax in connection with database and other operations in node js project. When I try to make connection with encrypted database it is successfully done but when apply any operations it is showing file is encrypted or is not a database. I can understand that it is encrypted database but is there any syntax or password filling in sqlite3 which can be provided as a solution?
Thanking you in advance!

Hello Stephen, I am using sqlite3 package. In its documentation I found about SQLCipher. So as you have described the process I followed the same. And finally I got a encrypted database. But when I use it in my nodejs project with this lines for connection:
var db = new sqlite3.Database(‘path/to/database’);
It is showing connection done but they shows error that file is encrypted or is not a database. I cannot found any solution for that after searching a lot. Anything you can suggest? Please help me regarding this.

Hello @Aryesh ,

Zetetic doesn’t actually develop or support the node sqlite3 package so I’m not sure you’ll see much in the way of responses on this forum. It would be better to contact the developer of that library for support, either directly or via a GitHub issue.

If you’re in need of a commercially supported solution, we do offer a Cordova solution, but it is not a free package (it’s available only under the SQLCipher enterprise program). If you’re interested in learning more about that feel free to let us know.