You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After this we have a working database then we close and delete it:
await db.close();
final directory =awaitgetApplicationDocumentsDirectory();
final path =join(directory.path, databaseName);
awaitdeleteDatabase(path);
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
The text was updated successfully, but these errors were encountered:
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.
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
The text was updated successfully, but these errors were encountered: