joltup / rn-fetch-blob

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
2.84k stars 784 forks source link

java.lang.IllegalStateException: closed #630

Open HessiPard opened 4 years ago

HessiPard commented 4 years ago

Hi, in last github version of rn-fetch-blob (0.12.0), we faced a crash report in production that didn't exist in past versions:

okio.RealBufferedSource.rangeEquals
RealBufferedSource.java, line 411
java.lang.IllegalStateException: closed

okio.RealBufferedSource.rangeEquals RealBufferedSource.java:411
okio.RealBufferedSource.rangeEquals RealBufferedSource.java:405
okhttp3.internal.Util.bomAwareCharset Util.java:471
okhttp3.ResponseBody.string ResponseBody.java:175
com.RNFetchBlob.RNFetchBlobReq.done RNFetchBlobReq.java:603
com.RNFetchBlob.RNFetchBlobReq.access$100 RNFetchBlobReq.java:72
com.RNFetchBlob.RNFetchBlobReq$3.onResponse RNFetchBlobReq.java:493
okhttp3.RealCall$AsyncCall.execute RealCall.java:206
okhttp3.internal.NamedRunnable.run NamedRunnable.java:32
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java:1112
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java:587
java.lang.Thread.run Thread.java:818

react-native: 0.61.4 rn-fetch-blob: 'https://github.com/joltup/rn-fetch-blob.git' (synced until this commit)

SnaiNeR commented 4 years ago

same crash, after updation to latest commit ^^ before was crash too #490

SnaiNeR commented 4 years ago

Created PR #637 to fix it, problem is not appear anymore Lets move it to master 🙆‍♀️