Unable to open sqlite database with database browser but works fine in app

I am getting “HH.sqlite” is damaged and can’t be opened. You should move it to the Trash." when I try to browse the database with a number of different browsers, including Tadpole, DB Browser lite, sqlite studio and Base. However, my app still reads and writes to it happily.
Can anyone suggest why this might be so?
Thanks in advance

Are you using encryption?

Tadpole will report this if the file is either not a database or is in fact encrypted, so if your app reads it, I’d check your code and I will bet you will find an included encryption key somewhere… One other thing are you sure its an SQLite database, and not mySQL, or some other database engine???, an SQLite engine will report this same thing on other database formats it can’t read

Thanks to Greg and Dave.
It is a SQLite database, not encrypted (although thinking about whether I should do that for release)
Funny thing is that a previous copy from a few days ago can be read easily. I am confused as to why my application can read and display values, but the various sqlite browsers I have tried are reporting an error.

Will recheck all the code.

If it is SQLite and it is NOT encyrpted than Tadpole or any of the others you mentioned should have no trouble/

One way to check… if you can, open the DB file with a hex editor.
the first 16 bytes will be
“SQLite format 3.” where the . is 0x00
this is for a Non-encrypted database, and encrypted one will be “gibberish”

Thanks Dave. Downloaded and ran iHex for Mac. Confirms it is Sqlite format 3.
Then I had a thought. Maybe the SQLite viewers (including Tadpole) can’t read files when they are located in \users\pcumpston
library\containers\…\Data\Documents\xx.sqlite?
So I copied it to a standard readable \Documents subdirectory and guess what?
I can read it and modify it with Tadpole and other utilities, then copy it back for ongoing use.

Not only that, but I can now read the same file in the original location. (Scratching head in puzzled manner)

I use UltraEdit, but its not free…I’ve used it as a source code editor for more years than I care to think about

but I just tried, and if it is not encyrpted you should be able to use TextEdit (on Mac) or the Window equiv… and see that same phrase

TextEdit gives the same error in that location. Must be something to do with the operating system. File permissions are identical.
Thanks again for your help

it seems a sandboxing problem ?

Doubtful, as Tadpole is not a sandboxed app… SQLite does create journal files that seem to violate the sandbox requirements, which is why Tadpole didn’t appear in the AppStore