Description
This report is based on a 3rd party private report to https://github.com/JaffaKetchup/flutter_map_tile_caching. As much info is supplied as is known, let me know if more is required!
Is there an existing issue?
- I have searched existing issues
- https://www.reddit.com/r/flutterhelp/comments/199qsff/flutter_object_box/ reports the same error (but with different numbers)
Build info
- objectbox version: 4.0.1
- Flutter/Dart version: unsure
- Build OS: 2020 Mac Mini M1
- Deployment OS or device: iOS 17.4 (iPhone 11 & SE)
Steps to reproduce
FMTC allows users to export parts of the database, then re-import them. There is practically no difference to a standard read/write operation though. Note that an import is not the same as a complete replacement of the existing 'data.mdb' file with a new one. Both databases are open at the same time, and the needed data is transferred manually between them.
When importing the attached database into the OP's app, or the FMTC example app (https://github.com/JaffaKetchup/flutter_map_tile_caching), the following error is thrown, on iOS only:
Raw ObjectBox file: https://drive.google.com/file/d/133UXCBJDydiN_kYlbQjrHYygdK16S82V/view?usp=sharing (do not distribute)
FMTC compatible file (contains the ObjectBox file, but with extra footer information): https://drive.google.com/file/d/1x5JoqnTvqD_QRr2bpIVcYuh6tQKt3KXu/view?usp=sharing (do not distribute)
To reproduce with the example app, clone the repo, run the example app, then follow the screenshots:
Select to import the FMTC compatible file, choose any conflict resolution mode (skip/merge/etc.), then tap the FAB.
Expected behavior
The same behaviour should occur on the iOS platform as on other platforms: that is, the import operation succeeds without error.
Actual behavior
The error in the screenshot is thrown.
Code
It is difficult to provide an MRE. The import algorithm can be found at https://github.com/JaffaKetchup/flutter_map_tile_caching/blob/9268675e19d246da2a9bb298aa00812e09c5891e/lib/src/backend/impls/objectbox/backend/internal_workers/standard/worker.dart#L874-L1279, but it is somewhat context dependent (note, for example, 'store' in FMTC terminology is not the same as an ObjectBox 'store'). The code runs within an isolate.
Logs, stack traces
As well as the screenshot above, see these screenshots as well - not sure if they're useful or not: