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

TypeError: undefined is not an object (evaluating 'RNFetchBlob[nativeMethodName]' #12

Closed
itinance opened this issue May 25, 2016 · 4 comments
Assignees

Comments

@itinance
Copy link

itinance commented May 25, 2016

RNFetchBlob.fetch('GET', mediaUrl, {})

A promise is returned but .then() or .catch() will never being reached because of an exception:

undefined is not an object (evaluating 'RNFetchBlob[nativeMethodName]')

(tested in an iOS-project)

@wkh237
Copy link
Owner

wkh237 commented May 26, 2016

Hi @itinance , thanks for reporting the issue.

It looks like the native iOS module not linked to your iOS project, have you run rnpm link and recompile the project (simply run react-native run-ios again) after npm install --save react-native-fetch-blob ?

I could only be able to reproduce this error when running an iOS project in release mode without link native modules.

Another way to confirm if the library is linked is open .xcodeproj inside ios folder with XCode, and check if RNFetchBlob.xcodeproj is in Libraries

2016-05-26 9 28 18

also check if libRNFetchBlob.a is in Linked Frameworks and Libraries

2016-05-26 9 29 00

@wkh237 wkh237 self-assigned this May 26, 2016
@itinance
Copy link
Author

Thank you for your fast reply. I already did rnpm link and everything seems to be okay, but i still get this error:

screen shot 2016-05-26 at 13 15 30
screen shot 2016-05-26 at 13 15 43

@itinance
Copy link
Author

Okay, i did a "clean" and re- "build" and this worked now for me! Thank you very match for your assistance!

@wkh237
Copy link
Owner

wkh237 commented May 26, 2016

@itinance , you're welcome, please feel free to file an issue : )

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

No branches or pull requests

2 participants