-
Notifications
You must be signed in to change notification settings - Fork 1.6k
undefined is not an object (evaluating 'RNFetchBlob.DocumentDir') #84
Comments
Hi @rameramwe , apparently you're getting this error because the library is not linked properly. I've noticed that you might using an very old version of this library (0.6.4). Perhaps you can try the following steps : First, close the app and packager. Then upgrade
Remove the installed package
Re-install the library
And there should be some logs in the terminal To verify if the library is linked properly, check if these lines exists in include ':react-native-fetch-blob'
project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android') Also check MainApplication.java import com.RNFetchBlob.RNFetchBlobPackage; @Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
+ new RNFetchBlobPackage(),
new MainReactPackage()
);
} Now, run the app see if it work properly
|
@wkh237 Thanks. Let me try that now. |
@wkh237 I am still getting the same. Could it be because I am using it from a worker? It is used alongside with Thanks |
hey @wkh237 thanks a lot for the fast and awesome response then i tried deleting the build folder in my android folder and uninstalling the package and then reinstalling it and compiling but still no luck .. |
@RichardBoyewa hey man about the skipped thing i got it too you gotta delete this line new RNFetchBlobPackage(), in mainapplication.java and it'll work actually it'll just add it again :P . |
@wkh237 i noticed this while compiling ..does it matter ? |
@rameramwe I did just that and the error is still there. Are you using it from a worker service? I am using this for a background service. |
@RichardBoyewa actually no i'm not using Workers but i'm using other stuff like image picker and Fbsdk do you think this might be causing the problem ? |
@RichardBoyewa , if you're using new WorkerPackage(new MyAwesomePackage(), new MyAmazingPackage()) to |
I am not sure. I have been on this for a while... But this is an interesting package, I will fight my way through it :-) |
@wkh237 Let me do that.... I missed that line :-( |
this package is essential for me cause i'm using firebase and i need firebase storage . |
@rameramwe , does the firebase upload sample work on you environment ? |
i'll check that and see |
Heyyyyyyyyyyyyy! 👍 It works.......... uuuuhhnnnnnnn!!! Dancing..... @rameramwe How far with yours? @wkh237 Thanks a billion. Can we drop this line as a comment in the ReadMe, incase someone else try to use it this way. Thanks guys. You rock! |
@RichardBoyewa congrats man :D hope i can fix it too :P |
@rameramwe How can I message you directly... there is something you need to take out of your repo ASAP.... Don't commit that to gitHub |
@rameramwe check your dependencies to see that they don't need a special installation like mine. |
:-) Sent you a mail. Have u solved urs ? |
no not yet i'm trying to get the firebase upload repo running locally and see what'S going on |
ok. Best of luck. |
@wkh237 i got the repo running and it works and it gave me 80% result why the hell ain't it working with original app ? that'S the package file for the upload repo |
@rameramwe , I've tested the library with 0.29.1 Ubuntu 15 environment and it works fine. Could you provide a simplified sample of your project ? |
@wkh237 would you like to see the repo ? it's not that big |
Yeah, I'd like to help if it's possible. |
@wkh237 Awesome :D that'S the repo https://github.com/rameramwe/funshare |
@wkh237 great .. it'S not important anyways but you should require the library fetch blob and see if it works |
@rameramwe , I've noticed that FacebookSDK uses different Android Build Tool (23.0.2) and React Native uses 23.0.1. When the first time I try to build the project, it shows the following error message. I'm wondering if your environment missed this build tool too. I fix this error by simply open the Android project with Android Studio and install the build tool. Have you tried build the project using Android Studio ? There's also a StackOverflow thread about install build tools using command line. |
@wkh237 no i didn't use android studio |
i never got this error |
@wkh237 thank you very much i go it to work .. i was testing not on genymotion but on my phone .. the solution was to uninstall the app from my phone and reinstalling it using run-android .. that'S very weird but now it's working perfectly thank you very much again . |
@rameramwe , great to hear that ! Please feel free ask any question when needed 😄 |
Nice job done here @wkh237 . @rameramwe Glad you finally got it to work. |
I'll get this exception if I turn on the "Don't keep activities" setting in android. If I turn it off, I can use this library normally. My version is Thanks. |
I am trying to install your plugin and having this problem. I've tried starting from scratch twice in the past week and I keep getting this screen. I got it installed after a while the first time but I had to reinstall again can't remember how I got around it. First off, a couple comments about your installation instructions:
If I'm correct, it's not an "or" but a required 2nd step. By using CocoPods, you get the required iOS files right? Also, there should be a |
I got a same issue of @dwilt |
Two things solved the problem for me: |
I'm getting the same issue but i'm using expo. How can i fix it without detach the project, please help!! |
If you are making a Activity and implementing DefaultHardwareBackBtnHandler, then in your
|
After linking you need to run |
hey guy i'm getting this error undefined is not an object (evaluating 'RNFetchBlob.DocumentDir') ..
i know this was mentioned before but all the solutions didn't help fix the problem for me
i'm going crazy .. i've been trying 9 hours to fix it with no luck
i tried rnpm and didn't work then tried linking manually and still didn't work
i'm using linux and android
and this is my package file
The text was updated successfully, but these errors were encountered: