Hi all,
i am having issues using this module in an ios project.
The Error occurs inside the module, therefore i assume, some dependencies // linkages are incorrect?
in FS.common.js this line of code throws the error 'cannot read property of RNFSFileTypeRegular of undefined'
var RNFSFileTypeRegular = RNFSManager.RNFSFileTypeRegular;
Meaning that RNFSManager is undefined. How is this possible?
RNFSManager is created here :
var RNFSManager = require('react-native').NativeModules.RNFSManager;
I guess, NativeModules does not have the RNFSManager included wich is the reason for this error.
Does anyone know, how to fix this?
( works properly in android - must be an ios only issue ?)
i am using
react-native-cli: 1.0.0
react-native: 0.35.0
thnx for any help on that!
I had this issue on Android, and it was because I didn't link the module properly.
I have met the problem on Android as well. So how can we fix the bug?
You fix the bug by reading and following the instructions correctly 馃槃
Seriously, I hit the error, and found out I skipped a step in the setup.
Ah.....I found my mistake, thx(I do not new the RNFSPackage in java code):)
I am also getting the same error. Followed the instructions in the ReadMe three times and linked via rnpm. It says that the library is linked successfully, yet I am getting the above error in my simulator.
I am also getting this error in XCode: "App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file." Has anyone encountered this / have any ideas? -- would be much appreciated.
Http errors would be unrelated to rnfs. The error happens when you make an insecure http request without exempting it in info.plist
If you aren't making any network requests, then it's the debug build of the app trying to connect to the packager.
Thanks for the response, that is helpful. Any suggestions for the other error (RNFSManager is undefined)... I have tried many things, including using an older version of React Native, using older version of react-native-fs, npm installing directly from the github repo, etc etc.
I would manually go through the steps instead of rnpm then. The cause of the "bug" (it's not really a bug) is always that all steps were not completed.
@BG687 I was having the same issue. What worked for me was to build the debug scheme in XCode, then retry using react-native run-ios.
anybody have solution for this ?
I also have the error from #258
This issue is still present on RN 0.41 / iOS (android works)
I've tested both 2.0.1-rc.2 and 2.1.0-rc.1:
We're on xcode 7.3.1
I am also facing this issue.
My tool set is same as @Thibaut-Fatus use.
@Thibaut-Fatus, @volodymyrlut +1
@ruler47 @Thibaut-Fatus well, guys, I believe you should rebuild your Xcode project running react-native run-ios. This resolved my issue yesterday without manual linking and the stuff.
We've also tested after updating to xcode 8.2, same issue (cleaning project / rebuilding / removing node_modules / manual & automatic linking), still does not work.
However, since our goal was to display PDF, we ended using platform specific code and WebView on IOS (PDF not supported yet in Android)
It's working for me fine on iOS RN .40 and xCode 8.x.newest
I had also this error on my Android emulator but it was because I did not restart gradle build (with react-native run-android). It worked without manual configuration but with react-native link.
R.N 0.42
Ubuntu 16.10 64 bits
re-run react-native run-android or react-native run-ios
I don't know why this fixed it but I removed libRNFS.a from Link Binary with Libraries and re-added it and now it's working.... go figure...
@iotashan Thanks
automatically link doesn't add RNFS to my project, i add it manually to resolve this issue!
restart xcode or close your project tab clean and rebuild.
Same here as @Xing-He - I followed the instructions and the react-native link did not add the XCode project or the linked binary. I had to manually do it. Problem solved.
I had this problem on iOS after running react-native link to link another unrelated module after installing RNFS.
To fix this, I had to re-run:
pod update
so that it reinstalled the RNFS pod, then rebuild and install the app. I don't know why it got removed, but this fixed my problem without having to relink the lib.
re-run
react-native run-androidorreact-native run-ios
Works.
@iotashan Is there a specific step that you've found people usually skip when experiencing this issue?
Most helpful comment
re-run
react-native run-androidorreact-native run-ios