Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React-Native-Fetch-Blob is NOT being maintained #95

Closed
yeswanth opened this issue Jan 11, 2018 · 10 comments · Fixed by #105
Closed

React-Native-Fetch-Blob is NOT being maintained #95

yeswanth opened this issue Jan 11, 2018 · 10 comments · Fixed by #105

Comments

@yeswanth
Copy link

yeswanth commented Jan 11, 2018

Hi guys,
I have used this library(React-Native-Img-Cache) in my project and it's working well. However, this library has a dependency to React-Native-Fetch-Blob and that is a concern for me. React-Native-Fetch-Blob is NOT being maintained. They have issued RNFB MAINTAINER GONE MISSING notice. The reason this concerns me is because, I am facing a very critical bug, that causes my app crash as soon as the user opens the app (seen in few phones). This is fixed with this PR, but there is no one to merge this into master.
Can you guys step in and help them? Or do you have other suggestions?

@wcandillon
Copy link
Owner

@yeswanth I built a version of this component that depends on ExpoKit. This new version contains a lot of improvements and bug fixes over this version. I'm thinking of super-seeding this version over the one that depends on React-Native-Fetch-Blob since I'm not using it anymore. What do you think?

@yeswanth
Copy link
Author

I'm not sure as I haven't used expo for building my app. I build and manage native dependencies on my own, both for Android and iOS. Can I use the new version just the same way as before?

@chrusart
Copy link

chrusart commented Jan 11, 2018

Hi @yeswanth , I'm using our react-native-fetch-blob repo in production now with:
"react-native-fetch-blob": "github:flatfox-ag/react-native-fetch-blob#exception_fixes",
this branch have fix from PR you mentioned and also other fix that make other crash in iOS.
I'm using react-native-cached-image which have a dependency on fetch-blob ver. 0.10.8 and my branch is totally compatible with 0.10.8, and if you put this branch in your package.json then it should work.
Probably better for you will be to use:
"react-native-fetch-blob": "github:flatfox-ag/react-native-fetch-blob#e46f94e2ce7f135f3e9088c95bbd53cd79481ab5",
in case we will update this branch with something you don't want ;)

At least you can use it until fixes will be available on npm, or better fork it to your repo and put PRs or fixes that causing problems for your app.

@jsmankoo
Copy link

jsmankoo commented Jan 11, 2018

Master is broken cause of this I think.
I'm getting following:

bundling failed: Error: Unable to resolve module `react-native-fetch-blob` from `/Users/jsmankoo/Indigofair/indigofair-app/node_modules/react-native-img-cache/build/index.js`: Module does not exist in the module map

either we fix package.json or update index.ts to not use the library

@chrusart
Copy link

chrusart commented Jan 12, 2018

@yeswanth I've added some more @synchronized blocks in our branch cause we getting other similar crashes:
Sentry:

EXC_BAD_ACCESS
Attempted to dereference garbage pointer 0x920fcbeb8.
Originated at or in a subcall of folly::Expected<long long, folly::ConversionCode> folly::detail::str_to_integral<long long>(folly::Range<char const*>*)

stacktrace:
-[RNFetchBlobNetwork sendRequest:contentLength:bridge:taskId:withRequest:callback:]
__65-[RNFetchBlob fetchBlob:taskId:method:url:headers:body:callback:]_block_invoke
__85+[RNFetchBlobReqBuilder buildOctetRequest:taskId:method:url:headers:body:onComplete:]_block_invoke

Fabric:

Crashed: com.apple.root.default-qos
0  libsystem_kernel.dylib         0x180f082e8 __pthread_kill + 8
1  libsystem_pthread.dylib        0x181021748 pthread_kill$VARIANT$armv81 + 360
2  libsystem_c.dylib              0x180e76fbc abort + 140
3  libsystem_malloc.dylib         0x180f3fce4 szone_size + 634
4  Foundation                     0x181d1158c -[NSConcreteMapTable grow] + 740
5  Foundation                     0x181cf1a70 -[NSConcreteMapTable setObject:forKey:] + 168
6  xxxxxx                        0x1007dfbd0 -[RNFetchBlobNetwork sendRequest:contentLength:bridge:taskId:withRequest:callback:] + 486464
7  xxxxxx                        0x1007e553c __65-[RNFetchBlob fetchBlob:taskId:method:url:headers:body:callback:]_block_invoke + 509356
8  xxxxxx                        0x1007e35c8 __85+[RNFetchBlobReqBuilder buildOctetRequest:taskId:method:url:headers:body:onComplete:]_block_invoke + 501304
9  libdispatch.dylib              0x180d72a54 _dispatch_call_block_and_release + 24
10 libdispatch.dylib              0x180d72a14 _dispatch_client_callout + 16
11 libdispatch.dylib              0x180dae394 _dispatch_queue_override_invoke$VARIANT$armv81 + 700
12 libdispatch.dylib              0x180db42a4 _dispatch_root_queue_drain + 568

Not tested well yet so use hash to be sure will not break anything.
Will make soon PR on fetch-blob, but... you know.

@chrusart
Copy link

Done in wkh237/react-native-fetch-blob#636

@wcandillon
Copy link
Owner

I switched to a caching component that depends on ExpoKit: https://github.com/wcandillon/react-native-expo-image-cache.

You can read about it in more details at https://medium.com/@wcandillon/5-things-to-know-about-images-react-native-69be41d2a9ee

@akmjenkins
Copy link

For anybody interested, I dropped in react-native-fs in place of react-native-fetch-blob akmjenkins@ad999d2

@JorgeSana
Copy link

Guys, just install the new renamed version of React-Native-Fetch-Blob:
npm install rn-fetch-blob --save
And then go to /node_modules/react-native-img-cache/build/index.js and change the import line:
line 3 - import RNFetchBlob from "react-native-fetch-blob";
with this:
line 3 + import RNFetchBlob from "rn-fetch-blob";

Now yo can work with this package.

@snobear
Copy link

snobear commented Nov 14, 2018

For those of us who don't use Expo/ExpoKit for various reasons, I forked this repo and fixed the dependency and published it in npm as react-native-img-cache2, so we can just install with:

yarn add react-native-img-cache2  

and import with:

import {CachedImage} from "react-native-img-cache2";

Git repo

@wcandillon thanks for your work on this project, it works great. I'm happy to help maintain it here or on the fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants