Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Another Cannot read property 'DocumentDir' of undefined #627

Closed
GavinThomas1192 opened this issue Dec 22, 2017 · 5 comments
Closed

Another Cannot read property 'DocumentDir' of undefined #627

GavinThomas1192 opened this issue Dec 22, 2017 · 5 comments

Comments

@GavinThomas1192
Copy link

I have exhausted all threads on the internet and can't find a solution.
I'm trying to photo upload to firebase from my react-native app using react-native-fetch-blob. RN ios simulator running iphone 6. I have NOT tried running on android emulator yet, due to android env setup on different computer.

This line causes the error.

import RNFetchBlob from 'react-native-fetch-blob'

I have read many of the tutorials about using react-native-fetch-blob.

I can't seem to link it correctly, or please tell me what my issue is.

"react": "16.0.0-beta.5",
"react-native": "0.49.3",
"react-native-fetch-blob": "^0.10.8",

What I've tried already...

npm install --save react-native-fetch-blob
react-native link 

...

npm install --save react-native-fetch-blob
react-native link react-native-fetch-blob

...

rm -rf node_modules, then reinstall, then clean and build

...
I've followed the WIKI to manually link packages. Verified packages are linked via SS's
...

Clean and build after all of these scenario's.

I won't list EVERYTHING I've done because I've literally tried everything on stack and RNFB Issues/github.

Here are some screenshots from Xcode, RNFB is getting linked correctly, or at least I think.

screen shot 2017-12-22 at 11 02 50 am
screen shot 2017-12-22 at 11 04 34 am
screen shot 2017-12-22 at 11 11 01 am
screen shot 2017-12-22 at 11 21 13 am
screen shot 2017-12-22 at 11 33 40 am
screen shot 2017-12-22 at 11 44 09 am

@GavinThomas1192
Copy link
Author

I've tried almost all google searches already..
#251 <==especially this one

@GavinThomas1192
Copy link
Author

I deleted FBSDK login from my project entirely and it worked. "My code works and I don't know why"

@ajurav1
Copy link

ajurav1 commented Aug 17, 2018

Hello i have solved this issue---- when you install the react-native-fetch-blob and link with iOS, it only provide limited lib on native side.

you can to open project from iOS in Xcode then remove the library of RNFetchBlob.xcodeproj from library folder and then again add by right click on library folder from node modules-->react-native-fetch-blob--->iOS folder --->add project RNFetchBlob.xcodeproj then all required file will be there and make sure add lib on build phases also libRNFetchBlob.a

it works for me.

Thanks

@jorgeibarra01
Copy link

i've already tried linking it and have had no luck.
Tried rebuilding the folder for Android and nothing.
Is there any extra steps I have to do to install rn-fetch-blob? _

@sstano
Copy link

sstano commented Oct 28, 2018

Hello, this is a rather painful one. I finally managed to get rid of the error - details here (issue 251). Hope it works for you, too...

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

No branches or pull requests

4 participants