-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
null is not an object (evaluating 'RNFetchBlob.DocumentDir') #422
Comments
I add pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob' to the ios/Podfile , and run the cmd pod install , then the issue does not appear |
I encountered the same problem. And the version I am using is You should manually add the After that, clean your iOS build and rerun your App. Then everything will back to normal. |
Hi @gongmingqm10 the reason I cannot add libRNFetchBlob.a with my project is that react native 0.60.+ "installs" your 3rd party libraries through the Pods method and now we do not have to add those libraries under our .xcodeproj and then add .a files under Link binary with libraries. Are you also using RN 0.60.+ ?? |
This did not work for me. |
Same issue here. I got this error after replacing manually link to auto-linking. Any solution for that? |
same here |
Same here. :/ |
I think I've beaten this error (not sure because now my app builds and now that I'm in JS world I'm getting errors for linking issues with another library: react-native-push-notification). I think that this library's installation is being handled through Pods but I've also manually linked it by adding RNFetchBlob.xcodeproj under Libraries and I've also placed librn-fetch-blob.a under link binary with libraries. This is my Podfile: platform :ios, '9.0' target 'iosNottMyStyle' do Pods for iosNottMyStylepod 'React', :path => '../node_modules/react-native/' pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob' target 'iosNottMyStyleTests' do use_native_modules! target 'iosNottMyStyle-tvOS' do Pods for iosNottMyStyle-tvOStarget 'iosNottMyStyle-tvOSTests' do end |
Any luck with this? |
Having the same error here in android with RN 0.61.1 using autolink |
To solve this @dca-ps
|
Same issue here, and @ckOfor solution did not work. |
the same here, still hitting this bug and can not find the workaround (none of above working). |
Facing the same problem on Android :/ |
Hi guys: the only fix I have found for this issue is to use the good old manual linking. In
|
Ok, looks like it was related with 0.60 autolinking feature for me. Unlike @davidmarinangeli , I had to remove the packages import from my MainApplication.java. If you've just updated from react-native < 0.60, make sure that you've correctly enabled autolinking with this (in
Here is the upgrade helper : https://react-native-community.github.io/upgrade-helper/?from=0.59.9&to=0.61.2 |
I had this line at the bottom of my |
I have tried this one, but no luck at all, I got the same, I got pretty much the same issue
|
Hi guys, Recently I upgraded a RN app from v0.59.9 to v0.61.4. It had the same issue:
Here is my solution to the issue fix. Add |
Hi guys i was facing the same issue resolved it by : -
|
For android make sure to run |
I'm having this issue on Android 9.0+ Works fine on Android 8.1 though |
Did you fix this error?? |
Was facing same issue for Android was related to MainApplication.java not being updated as part of upgrade from 0.59 - 0.60 as outlined by @abrantes01 |
I missed this step "react-native link rn-fetch-blob" and it was creating "null is not an object" error |
I think this issue is a duplicate of #244 |
This was what fixed it for me #244 (comment) |
I need before install |
@alxmrtnz, Add rn-fetch-blog v0.12.0 as dependency to your project itself and it should work |
did someone fixe this issue ? it just when you import this with expo. |
|
just go in node_modules->rn-fetch-blob->fs.js uncomment line 5 or replace line 13 with 'const RNFetchBlob = NativeModules.RNFetchBlob' |
I am also having the same problem. but only suffer on android, ios it runs normally, please help me |
any solution for Android? |
manually link works for me on this issue for android: |
see this : |
in node_modules/rn-fetch-blob/android/build.gradle |
in Android->MainApplication.java add these 2 if you are using both after linking..
|
facing the same issue. no solution yet? |
Same here, RN 0.66 on Android :( |
After a second thought, it's not the same issue on RN 0.66 :
|
this happened to me on android, i run a |
and now it's stuck in ios versions, any solution for Ios? |
Stuck on the same problem. |
then i got this error:
Then npm run ios throw error with 100000000+ lines of info |
I think It doesn't work for me... |
i have the same issue in android can you explain it for android |
ERROR TypeError: Cannot read property 'DocumentDir' of null, js engine: hermes im facing this in android |
I'm getting this same error, only on real hardware (not on an emulator) |
First delete the node_module folder
rm -rf node_module/
then npm install
After that go to androd folder and
./gradlew clean
then
npx react-native run-android
…On Mon, Dec 12, 2022, 7:02 PM Pol Sust ***@***.***> wrote:
ERROR TypeError: Cannot read property 'DocumentDir' of null, js engine:
hermes ERROR Invariant Violation: Failed to call into JavaScript module
method AppRegistry.runApplication(). Module has not been registered as
callable. Registered callable JavaScript modules (n = 10): Systrace,
JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter,
RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule,
HMRClient. A frequent cause of the error is that the application entry file
path is incorrect. This can also happen when the JS bundle is corrupt or
there is an early initialization error when loading React Native., js
engine: hermes ERROR Invariant Violation: Failed to call into JavaScript
module method AppRegistry.runApplication(). Module has not been registered
as callable. Registered callable JavaScript modules (n = 10): Systrace,
JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter,
RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule,
HMRClient. A frequent cause of the error is that the application entry file
path is incorrect. This can also happen when the JS bundle is corrupt or
there is an early initialization error when loading React Native., js
engine: hermes
im facing this in android
I'm getting this same error, only on real hardware (not on an emulator)
—
Reply to this email directly, view it on GitHub
<#422 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AT25EBFH4KOUYQHYM56KJKTWM4V53ANCNFSM4IMFXPJQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
B
But It already worked on the emulator, however it's still not working on real hardware |
npm install --save github:joltup/rn-fetch-blob
after this clean the gradlew file and build your app
…On Mon, Dec 12, 2022 at 7:46 PM Pol Sust ***@***.***> wrote:
B
First delete the node_module folder rm -rf node_module/ then npm install
After that go to androd folder and ./gradlew clean then npx react-native
run-android
… <#m_8164617126827263686_>
On Mon, Dec 12, 2022, 7:02 PM Pol Sust *@*.*> wrote: ERROR TypeError:
Cannot read property 'DocumentDir' of null, js engine: hermes ERROR
Invariant Violation: Failed to call into JavaScript module method
AppRegistry.runApplication(). Module has not been registered as callable.
Registered callable JavaScript modules (n = 10): Systrace, JSTimers,
HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter,
RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule,
HMRClient. A frequent cause of the error is that the application entry file
path is incorrect. This can also happen when the JS bundle is corrupt or
there is an early initialization error when loading React Native., js
engine: hermes ERROR Invariant Violation: Failed to call into JavaScript
module method AppRegistry.runApplication(). Module has not been registered
as callable. Registered callable JavaScript modules (n = 10): Systrace,
JSTimers, HeapCapture, SamplingProfiler, RCTLog, RCTDeviceEventEmitter,
RCTNativeAppEventEmitter, GlobalPerformanceLogger, JSDevSupportModule,
HMRClient. A frequent cause of the error is that the application entry file
path is incorrect. This can also happen when the JS bundle is corrupt or
there is an early initialization error when loading React Native., js
engine: hermes im facing this in android I'm getting this same error, only
on real hardware (not on an emulator) — Reply to this email directly, view
it on GitHub <#422 (comment)
<#422 (comment)>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AT25EBFH4KOUYQHYM56KJKTWM4V53ANCNFSM4IMFXPJQ
<https://github.com/notifications/unsubscribe-auth/AT25EBFH4KOUYQHYM56KJKTWM4V53ANCNFSM4IMFXPJQ>
. You are receiving this because you commented.Message ID: @.*>
But It already worked on the emulator, however it's still not working on
real hardware
—
Reply to this email directly, view it on GitHub
<#422 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AT25EBDXCJA6YIIN7NTJD43WM43DVANCNFSM4IMFXPJQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I also have same issue after 'npm install rn-fetch-blob --save' in android 1.) cd android 2.) ./gradlew clean 3.) ./gradlew assembleDebug This is work for me 😃 |
We're having a similar issue after upgrading to React Native 0.60 and using auto linking.
Originally posted by @EgidioCaprino in #244 (comment)
The text was updated successfully, but these errors were encountered: