I am getting the above error while removing multiple box data in transaction. I need to know what is the reason for that and what can be done to avoid this. Thanks very much for the help.
Stack trace is mentioned below.
Non-fatal Exception: FlutterError 0 ???
0x0 ObjectBoxNativeError.throwMapped + 78 (helpers.dart:78) 1 ???
0x0 (null).throwLatestNativeError + 50 (helpers.dart:50) 2 ???
0x0 (null).checkObx + 17 (helpers.dart:17) 3 ???
0x0 Box.removeMany. + 329 (box.dart:329) 4 ???
0x0 (null).executeWithIdArray + 188 (helpers.dart:188) 5 ???
0x0 Box.removeMany + 328 (box.dart:328) 6 ???
0x0 BoxTransaction.deleteRouteDataonRouteRestoreFailure. + 135 (transaction.dart:135) 7 ??? 0x0 Store.runInTransaction. + 468 (store.dart:468) 8 ???
0x0 Store._runInTransaction + 643 (store.dart:643) 9 ???
0x0 Store.runInTransaction + 468 (store.dart:468) 10 ???
0x0 BoxTransaction.deleteRouteDataonRouteRestoreFailure + 134 (transaction.dart:134) 11 ??? 0x0 DeleteRouteData.deleteDataPastWindow + 189 (route_delete.dart:189) 12 ??? 0x0 SplashScreenPresenter._deleteDataPastWindow + 322 (splash_screen_presenter.dart:322) 13 ???
0x0 SplashScreenPresenter.handleAppStart + 81 (splash_screen_presenter.dart:81)
Reproducible code
store.runInTransaction(TxMode.write, () {
store.box<Type1>.removeMany(ids1);
store.box<Type2>.removeMany(ids2);
.... 10 more tables
});
This error code (10101) indicates that the database is full.
As a temporary workaround, you can try to re-write your code to not wrap the remove calls in a transaction (or wrap less remove calls in the transaction). This will require less storage space, so it may succeed with the remaining space in the database.