[solved] Unable to open database "sqlite.db": file is encrypted or is not a database

Hi all

Playing with the ‘simple Node app with a SQLite database to hold app data.’ template that shows up under ‘new project’ and am struggling to see any database schema, or even access sqlite.db. I get “Unable to open database “sqlite.db”: file is encrypted or is not a database”

No other console command works and I can’t access any data I have entered through the UI.

When doing the same with the “Lowdb JSON file database demo” I have no issues to access Json through the console and see the entered data.

What am I missing? Pointers welcome.


Let us know the project name and we’ll take a look.

1 Like

Thanks @Gareth

Here it comes: https://glitch.com/~river-trout

The SQLite file is in a directory, .data. As is standard on Unix, a directory prefaced with a ‘.’ is hidden as is it’s contents so it doesn’t show in the filetree. Unlike JSON files, SQLite files aren’t human-readable so you can’t view the data within it from the editor anyway.

When do you see that error message?

1 Like

Got what I was doing wrong now. I should be using Sqlite3.

I was using sqlite sqlite.db to access the db, while I should be using sqlite3 sqlite.db all good with this second command now. I’ve now been able to do a SELECT from the console and see the data.

Thanks @Gareth

1 Like