joltup / rn-fetch-blob

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

Cronet intergration #579

Open SherinBloemendaal opened 4 years ago

SherinBloemendaal commented 4 years ago

Hello,

I am trying to use react-native-cronet with this library, but my app crashes. Am i missing something? We want to download over the new http/3 QUIC protocol because we are downloading a lot of small mpeg files.

Library we are using: https://www.npmjs.com/package/react-native-cronet

package.json versions

"react-native": "0.61.5",
"rn-fetch-blob": "^0.12.0",
"react-native-cronet": "^0.5.0"

Crash stacktrace

    Process: nl.dactec.cringesoundboard.cringesoundsboard, PID: 20990
    java.lang.ClassCastException: okhttp3.ResponseBody$1 cannot be cast to com.RNFetchBlob.Response.RNFetchBlobFileResp
        at com.RNFetchBlob.RNFetchBlobReq.done(RNFetchBlobReq.java:594)
        at com.RNFetchBlob.RNFetchBlobReq.access$100(RNFetchBlobReq.java:72)
        at com.RNFetchBlob.RNFetchBlobReq$3.onResponse(RNFetchBlobReq.java:493)
        at okhttp3.RealCall$AsyncCall.execute(RealCall.java:206)
        at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
        at java.lang.Thread.run(Thread.java:762)

Thanks!