itinance / react-native-fs

Native filesystem access for react-native
MIT License
4.96k stars 983 forks source link

[ANDROID] RunTimeException | OutOfMemory in readFile #459

Open RafaelMagalhaesN opened 6 years ago

RafaelMagalhaesN commented 6 years ago

In the last week, firebase / bugsnag reported some bugs (in production app) in RNFSManager: Firebase: 2018-03-13_114554

Bugsnag: 2018-03-13_115408

Reproduce steps: I can't reproduce the problem :(

Cfgs: React-Native: 0.53.0 React-native-cli: 2.0.1 RNFS: 2.9.7

Any solution for this?

vintage commented 6 years ago

Same issue here. I wasn't really able to reproduce the issue locally.

image

react-native: 0.53.3
react-native-fs: 2.9.11
RafaelMagalhaesN commented 6 years ago

Any solution?

andrei-tofan commented 2 years ago

This issue happens while reading large text files. It can be reproduced by trying to read a large JSON file (around 80MB in size).

adamblvck commented 1 year ago

I'm experiencing the same issue when working on an offline-first architecture in RN, when trying to import a backup file (JSON) at around 80-120 Mb. Given the strength and RAM size of modern phones, it's kinda weird that these kinds of errors are occurring, but it seems to be a JVM issue, rather than a library issue.