react-native-blob-util icon indicating copy to clipboard operation
react-native-blob-util copied to clipboard

App crashes when reading file as base64 stream

Open paksa92 opened this issue 1 year ago • 5 comments

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:

image

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?

paksa92 avatar Nov 27 '24 11:11 paksa92

No, no idea why that is happening.... Does it always crash or just with certain files / paths? And only base64?

RonRadtke avatar Dec 25 '24 10:12 RonRadtke

+1

Jahanzeb009 avatar Jan 02 '25 09:01 Jahanzeb009

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.

paksa92 avatar Jan 02 '25 10:01 paksa92

Any solution ? Got this only in iOS. Have to downgrade to earlier version.

ZhouhaoNCS avatar Feb 21 '25 08:02 ZhouhaoNCS

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

Tzinov15 avatar Mar 24 '25 22:03 Tzinov15