Open ankit-makwana opened 5 years ago
Any updates on this issue?
I think the reason is this: https://github.com/square/okhttp/issues/6897 It fails at this part:
if (value.startsWith("\"") && value.endsWith("\"")) {
value = value.substring(1, value.length() - 1);
}
When the value contains only one double quote (") it fails, because the length of the value is one, but it tries to substring with the startIndex=1.
I added an issue to OkHttp, but I guess the quick solution would be, using an own fixed JavaNetCookieJar
at https://github.com/joltup/rn-fetch-blob/blob/master/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java
At this line (58):
mCookieJarContainer.setCookieJar(new JavaNetCookieJar(mCookieHandler));
I'm not sure when we will release a patch version of OkHttp, your own JavaNetCookieJar or a network interceptor that rewrites problem Cookie headers could be a good solution.
RNFetchBlob version: 0.10.13 React Native version: 0.55.4 Android version: 8.1
Below is the crash log: