App crashes when reading file as base64 stream
Using react-native 0.76.2 and react-native-blob-util 0.19.11.
My app crashes in the iOS simulator on a MBP M2 when calling:
RNFetchBlob.fs.readStream("some_path", "base64", 1992000)
I get the following error:
The file exists at the given path. I can't test on a device right now, will try later.
Any idea what may cause this?
No, no idea why that is happening.... Does it always crash or just with certain files / paths? And only base64?
+1
No, no idea why that is happening.... Does it always crash or just with certain files / paths? And only base64?
It only crashes when reading as base64 and passing a chunk size.
Any solution ? Got this only in iOS. Have to downgrade to earlier version.
This sounds like it might be a memory crash where the app starts reading too much into memory. One thing that has helped us debug issues like this is enabling the performance monitor through Expo and observing if RAM starts climbing before the app crashes