undefined is not a function(evaluation 'object.getOwnPropertyDescriptors(arguments[i])') - react-native

I'm trying to run an app which I take from git. I ran npm install and react-native run-android then it occurred an error:
I have found solution on Internet for 2 days but there is no result. Can anyone fix this error please?

There's an actual workaround for this, and it worked for me. Try to activate Debug Js Remotely on your developer options, Reload and your app will work. As I said it's a work around, but you can continue working on your app

Related

Getting error code 500 when run react-native run-android

About few weeks ago my apps is running normally.
But today i'm getting this error.
this is the error in android emulator
this is the metro bundler
and this is my package.json
I've spent hours and haven't come up with a solution.
I have tried reinstalling my react-native but the problem is still the same.
Can someone help me to fix this, especially the EISDIR error. Thanks before.

getting error when i reload emulator in react native

yesterday my application was running very well I closed it when I open my project in vs code and run npm start and open an android studio and open emulator I connected it again but this error comes on emulator.
It looks like your app was made with expo. Instead of npm start, use expo start. I've had a similar problem where the JavaScript bundle keeps building over and over. I solved it by restarting the app.
If this doesn't work, try restarting your pc.
Hope this helps :)
I think it's because of require() or try restarting your pc.

Unable to find module for EventDispatcher React Native

On starting application using react-native run-ios its showing error on simulator Unable to find module for EventDispatcher
Stop remote JS debugging and then reload the app
It will give you the appropriate error message, most likely missing some render on one of your components. That fixed it for me.
So this issue happened to me after I upgraded to RN 0.59.x.
I was getting this error when live reload was enabled or if i tried to refresh screen on iOS by pressing CMD+R.
Related issues:
Unable to find module for UIManager
Unable to find module for
DevLoadingView
Unable to find module for EventDispatcher
Here's how I solved it:
Edit your AppDelegate.m file and add the following code before the #end
#if RCT_DEV
- (BOOL)bridge:(RCTBridge *)bridge didNotFindModule:(NSString *)moduleName {
return YES;
}
#endif
This will fix the issue.
Link to the fix on github.
Related discussion on github.
Live reload and debug mode all should work without problems now.
This seems to be an issue when using the remote debugger with certain RN versions above 0.58. Using react-native-debugger should solve the issue as it supports RN versions above already.
It can be downloaded from the following link:
https://github.com/jhen0409/react-native-debugger/releases
I've started receiving this error after upgrading RN from v0.57.3 to v0.58.6.
Running packager with yarn start -reset-cache / react-native start --reset-cache fixed the issue for me.
What worked for me was simply stopping remote debugging as mentioned by #Hackman,
THEN killing the browser debugger, cleaning Xcode and rebuilding.
Couldn't tell you why, but the issue went away.
I'm using detox, what worked for me was switching the build command from
-configuration Debug
to
-configuration Release
It will no longer fetch from metro bundler and instead use the js bundle from the build. When I'm coding the tests, I build with debug since I'm fine with occasionally seeing the error, since I like the connivence of not having to constantly build and letting metro bundler do it for me.

React Native - The development server returned response code: 503

when I try to react-native run-android my project I keep receiving this error although yesterday it worked just fine and today -without any changes- this error appears out of nowhere!
if it helps when I execute react-native run-android first a different error shows up which I fixed it but I don't know why it's still there and when I refresh the app this 503 error shows up!
here's a screenshot:
This is probably caused by your phone proxy, and the error got nothing to do with rn, check backend too.
For those who might still have this problem,
if you look at the error you will see that this error body is generated by server not react native.
and I found out that in my case the problem was cased by our company proxy,
in order to fix it simply turn off your proxy. hope it helps you.
I know this question is old but for those of you who work in organizations that have proxy set up on employees' computers, you might face the same issue. If you do, just turn off the proxy.
It might due to your packager server did not started properly . You can try with 'npm install' again followed by 'npm start' and then 'react-native run-android'

No dimensions set for key window

I am having some issues with react native. It keeps giving me the following error.
What could be causing this?
Try closing terminal, deleting ios/build and run again. I had the same issue but now its working.
For anyone that runs into this. Check to confirm the window passed to get() is a string Dimensions.get('window') .
There apparently is an issue with react-router-flux since a few days.
You probably need to rollback to the 3.38.0 version before the bug was introduced.
yarn add react-native-router-flux#3.38.0
If it doesn't work, some people also said that you might need to close all your terminals, delete your build folder and clear your npm cache.
I got this error when I ran a different react-native project, but had forgotten to close the terminal window that was running the React Packager. Once I closed the React Packager terminal window and re-ran react-native run-android the error went away.
Check if you have an old package manager running from a different project. If so, close it and run again.
Close all terminal
and after use following command in terminal
npm cache clean
worked for me
"Close terminal, rerun" worked for me. Seems like this is a recent issue due to the update of react-native.
There are another way to solve this error, I update react-native-cli: 2.0.1 and it works for me.
Use this Dimensions.get('window').width;