react-native-fetch-blob icon indicating copy to clipboard operation
react-native-fetch-blob copied to clipboard

Undefined is not an object(evaluating 'RNFetchBlob.DocumentDir')

Open safeimuslim opened this issue 7 years ago • 12 comments

Hi, can you help me about this error.

"react": "16.0.0", "react-native": "0.50.4",

screen shot 2018-04-19 at 16 09 01

safeimuslim avatar Apr 19 '18 09:04 safeimuslim

same issue here.

"react": "16.3.0-alpha.1", "react-native": "0.54.3",

UPDATE: solved by correctly adding the package on native side, because react-native link have not done it correctly.

quarkcore avatar Apr 19 '18 12:04 quarkcore

@quarkcore I follow this document but still error.

https://github.com/wkh237/react-native-fetch-blob/wiki/Manually-Link-Package#user-content-link-ios-package

safeimuslim avatar Apr 20 '18 03:04 safeimuslim

@safeimuslim i use the application implementation of react-native-navigation where it has another method to register native modules. espacially i have no idea about ios on native because im comming from the android world..

i only found out that the error is normaly caused if not registered on native properly.

quarkcore avatar Apr 23 '18 14:04 quarkcore

This is kind of crazy, I've rarely see so many duplicate issues...

Duplicate issues with potential solutions https://github.com/wkh237/react-native-fetch-blob/issues/627 https://github.com/wkh237/react-native-fetch-blob/issues/251 (for me this comment helped, if using cocoapods, "be sure to run pod install after linking": https://github.com/wkh237/react-native-fetch-blob/issues/251#issuecomment-387649022) https://github.com/wkh237/react-native-fetch-blob/issues/454 https://github.com/wkh237/react-native-fetch-blob/issues/386 https://github.com/wkh237/react-native-fetch-blob/issues/371 https://github.com/wkh237/react-native-fetch-blob/issues/350 https://github.com/wkh237/react-native-fetch-blob/issues/84 https://github.com/wkh237/react-native-fetch-blob/issues/51 https://github.com/wkh237/react-native-fetch-blob/issues/30

Duplicates without much info: https://github.com/wkh237/react-native-fetch-blob/issues/594 https://github.com/wkh237/react-native-fetch-blob/issues/383

JulianKingman avatar May 28 '18 14:05 JulianKingman

npm install && react-native link worked for me!

lisa-ewart avatar Jun 01 '18 14:06 lisa-ewart

npm install && react-native link not worked for me. Any other solution

nihp avatar Aug 01 '18 09:08 nihp

Hello i have solved this issue for iOS---- 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

beenadevi1 avatar Aug 17 '18 06:08 beenadevi1

not work for me in windows

tiyunchen avatar Dec 24 '18 08:12 tiyunchen

npm link or manual configuration both not working for me

dilipchandima avatar Jan 07 '19 09:01 dilipchandima

me too cannot make this work { "name": "my-new-project", "main": "node_modules/expo/AppEntry.js", "private": true, "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "eject": "expo eject", "test": "node ./node_modules/jest/bin/jest.js --watchAll" }, "jest": { "preset": "jest-expo" }, "dependencies": { "@expo/samples": "2.1.1", "expo": "^30.0.1", "moment": "^2.23.0", "react": "16.3.1", "react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz", "react-native-elements": "^0.19.1", "react-native-email": "^1.0.2", "react-native-fetch-blob": "^0.10.8", "react-native-image-picker": "^0.28.0", "react-native-modal-datetime-picker": "^6.0.0", "react-native-responsive-screen": "^1.2.0", "react-native-router-flux": "^4.0.6", "react-native-select-input-ios": "^2.0.1", "react-navigation": "^2.18.3", "rn-fetch-blob": "^0.10.15" }, "devDependencies": { "jest-expo": "32.0.0" } } The error I get: screenshot 2019-01-08 at 02 18 42

tinni95 avatar Jan 08 '19 02:01 tinni95

same issue here.

"react": "16.3.0-alpha.1", "react-native": "0.54.3",

UPDATE: solved by correctly adding the package on native side, because react-native link have not done it correctly.

HOw did you do it exactly? Do you recall? What do you mean adding package on native side??

rgamaesilva avatar Jan 13 '19 01:01 rgamaesilva

Solved it for my self by doing

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

then manually adding libRNFetchBlob.a to "Link Binary with Libraries"

abdurahmanadilovic avatar Feb 27 '19 12:02 abdurahmanadilovic