Open DjordjeMancic97 opened 1 month ago
Thanks for the report. Indeed that's bad. Can you confirm that the database is not used anywhere else in the mean time?
Can you make a quick test by adding a small delay (let's one second) before opening again to see if the same issue happens?
I won't be able to investigate much more in the next 2 weeks, sorry.
Hello,
Yeah database is not used anywhere else, also delay is not solution especially because the actions of deleting the database and creating it again are pretty separated and happen at different places so there is just no way these 2 actions are performed within 1 second.
Ok, also can you make sure the database folder exists before creating the database.
Hello,
I am experiencing weird issue on iOS when trying to create new database after deleting the previous.
Here is the flow:
Database creation
After this we have a working database then we close and delete it:
All good, db file is gone
However, after this we again run the
openDatabase
like in first step, database file is created and all tables are there. However at every attempt of writing some data the error message will appear:DatabaseException(Error Domain=FMDatabase Code=8 "attempt to write a readonly database" UserInfo={NSLocalizedDescription=attempt to write a readonly database})
This happens only on iOS. Using latest version of sqflite and Flutter 3.22.2