We have an enterprise app in production with several clients and this issue is only happening with one client and we've been unable to reproduce locally.
Our crashlytics is showing random readonly errors - attempt to write a readonly database. It's only happening for a subset of users.
The app uses FMDB as the sql wrapper (version 2.5). The DB already has data in it before the error. There are records in the DB after the error, so it somehow stopped being readonly or the readonly error isn't the right error.
Is it possible for sqlite3 db to throw readonly errors when its not readonly?
I tried to test if it was a threading issue by opening a second instance of the DB and spawned 2 threads that looped, one did a select from a table and the other did an insert. The error I got from this was Database Locked error not a readonly error.
Can threading issues cause it to throw readonly errors?
The app is installed on devices through SOTI MDM. This is the only client with SOTI, so can SOTI cause issues like this?
Would a system backup/cloud backup set files to readonly while it's running the backup and therefore the DB is temporarily readonly? I'm reaching here but I'm out of ideas.
Does anyone have any ideas what might cause this?