Closed nnoelwess-soft closed 5 years ago
Looks like a limitation with AsyncStorage. I’m planning to change the default storage, but PRs are welcome :)
for now, you can try this https://github.com/antoniopresto/react-native-local-mongodb/issues/42#issuecomment-432898339
Thank you for your quick feedback! In fact, each row i'm trying to insert are less than 200KB. It seem that the limitations is reach with 20 inserts approximatively, which concords with the 2MB CursorWindow limitation, but i thought that it was a limitation per row... What do you think, am I misusing anything?
What do you think, am I misusing anything?
I honestly do not have an answer. Feel free to reopen if you believe it is a bug in this lib.
I've tried using redux-persist-filesystem-storage but I'm still getting this error Is this the correct setup?
import FilesystemStorage from 'redux-persist-filesystem-storage'
import Datastore from 'react-native-local-mongodb';
let mdb = new Datastore({filename:'name',storage:FilesystemStorage,autoload:true});
how to change AsyncStorage to something else to avoid CursorWindow issue.
When i try to update or insert documents (pdf file in string base64 format) in loop an exception is raised when I insert about twenty documents (but it's variable (15 - 20 docs))
Code js :
Exception raised in Android studio logcat :
Exception raised in Visual Studio code by react native :
Unitarily my files are not very big 180 Ko, if I reduce the file size < 10ko I do not have any problem anymore in collection of 20 items . But I do not understand where the problem comes from, and if I can solve it
Android version API 28 Android 9 "react-native-local-mongodb": "^2.2.5",
Thanks for your help.