-
Notifications
You must be signed in to change notification settings - Fork 1.6k
EXPO + Android 7.0 - undefined is not an object (evaluating 'RNFetchBlob.DocumentDir') #371
Comments
"dependencies": { |
I think you have to use |
UP, I encountered the same error today dependencies : @Jacse In my case I do use RNFetchBlob.fs.dirs.DocumentDir If anyone as any fix, solution it will be awesome thanks |
Thanks for the response @Jacse . How and where would I use that at? |
@apatton724 I solved my issue by simply running Just in case before running the install you can to answer your question, DocumentDir is just a path which is created dynamically by the RNfetchBlob.fs API depending on your Platform, you don't necessarily have to use it it's just a useful constant. |
Thank you @Antoine-Mace , I will give this a go! |
@apatton724 Do you still have the issue? Because I still have it |
I'm having the same issue (also using Expo) |
Same issue here but not using Expo |
@lf-alves @poptocrack @apatton724 any luck with expo ? I need to open/view and upload a local pdf file so i need this. |
did anyone got the solution ? |
Same issue here :( |
probably need to wait until this is merged: facebook/react-native#11573 |
For those who ran into this issue, make sure to recompile your app after running the |
same issue ( |
Same issue here. Has anybody found the solution? |
I also got the undefined is not an object (evaluating 'RNFetchBlob.DocumentDir') and entering manual installation fixed the issue. https://github.com/wkh237/react-native-fetch-blob/wiki/Manually-Link-Package#link-android-package |
@jdeibe, are you using Expo as well? |
Nope.
|
@wkh237, do you have any info on this? I mean, does it work with Expo? |
Has anyone managed to fix the error (undefined is not an object (evaluating 'RNFetchBlob.DocumentDir')) for Expo? Most of the solutions above are when the app is actually detaching from Expo but not solutions for running it on Expo specifically. |
Create an environment variable on you OS 'RNFB_ANDROID_PERMISSIONS' and set it to 'true'. Then run 'react-native link react-native-fetch-blob' again. Works for me! |
I think this package is not compatible with Expo because you cannot use additional native code in expo packages |
@EddieEJ It doesn't work with Expo because Expo doesn't support native module linking. Like you said you'll have to detach from Expo in order to run react-native link react-native-fetch-blob for this to work. https://docs.expo.io/versions/latest/guides/detach.html |
With a detached Expo project, you have to first run |
Same issue, it made me frustrated! I'm testing it on android but it doesn't work!!!!! Heeeeeeelp please... |
I've tested this out and it turned out the More info here |
I have the same issue on Expo and I trying to compile for Android and my app shows me "RNFetchBlob.DocumentDir", after to run react-native link system says "rn-fetch-blob will not automatically add Android permissions after 0.9.4 please run the following command if you want to add default permissions: RNFB_ANDROID_PERMISSIONS=true react-native link", but then shows me "RNFetchBlob checking app version .. My OS: Debian 9 |
same error |
Hi there,
I know this has been an issue in the past. However, I am using Expo to upload files using the react-native-fetch-blob.
Can someone walk me through how to avoid this issue in android 7.0? In the README it says I have to have the permission granted: https://github.com/wkh237/react-native-fetch-blob#installation
"Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app. So adding permissions in AndroidManifest.xml won't work for Android 6.0+ devices. To grant permissions in runtime, you might use PermissionAndroid API."
As I stated, I'm using Expo. Before I get to the point of asking the user for permission...on load of the app, I get the above mentioned error.
Any ideas on how to reconcile this?
The text was updated successfully, but these errors were encountered: