React Native Expo 41 app crashing on debug remotejs enabling - react-native

I am new to react-native and having the following issue.When I run app without enabling remotejs dubug option from my device, it works fine.But as soon as I enable the debug remotejs after shaking the device, app crashes wit the following error in the console and the app crashes.
(node:1064) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(Use `node --trace-deprecation ...` to show where the warning was created)
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
error Command failed with exit code 1
Expo: 41.0.1
react: 16.13.1
react-native: https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz

Resolved it by adding C:\Windows\System32\ to path variable then restarting computer.

Related

React Native Application error at installing npx bugsnag

Error: spawn npm ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
at onErrorNT (internal/child_process.js:464:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Hello,
Anas Ahmed here, I was installing bugsnag-expo-cli-init in my react native app at first it asked me 3 ques and then at the time of installing it gave me this error can anyone help me in this. Installing in npm
Are you attempting to run the bugsnag-expo-cli on Windows? Bugsnag's Expo CLI currently only supports Linux and Mac:
https://docs.bugsnag.com/platforms/react-native/expo/#installation-and-configuration
As an alternative to the CLI, you could follow the manual integration guide:
https://docs.bugsnag.com/platforms/react-native/expo/manual-setup/

Getting error while executing run-android with react-native

my english isn't that good. I am from Turkey and sorry if my question isn't clear to you.
When I run run-android with React Native, I get the following error but when I run run-ios I don't get any issue. I am using a Mac computer.
Thank you for your help.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1063 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: spawn EPERM
at ChildProcess.spawn (internal/child_process.js:407:11)
at Object.spawn (child_process.js:548:9)
at module.exports (/Users/meric/Desktop/Phonder/node_modules/execa/index.js:205:26)
at runOnAllDevices (/Users/meric/Desktop/Phonder/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:32)
at buildAndRun (/Users/meric/Desktop/Phonder/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/index.js:182:41)
at /Users/meric/Desktop/Phonder/node_modules/#react-native-community/cli-platform-android/build/commands/runAndroid/index.js:146:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Command.handleAction (/Users/meric/Desktop/Phonder/node_modules/react-native/node_modules/#react-native-community/cli/build/index.js:186:9)
enter image description here
I think you should uninstall the app on any emulator or devices, after that please re-run app.
It might be caused by having package.lock.json and yarn.lock at the same time

Running `expo start` fails with ENOENT error just after installing expo-cli on windows 10

I'm on Windows 10 Version 10.0.16299 Build 16299. I'm using Powershell. I just used yarn global add expo-cli to install expo, then I ran expo init my-app then cd my-app and expo start, but the build is failing. Here's the error image and text:
[23:11:49] Starting project at C:\projects\my-app
[23:11:58] Starting Metro Bundler on port 19001.
[23:11:58] Metro Bundler ready.
[23:12:00] Expo DevTools is running at http://localhost:19002
[23:12:00] Opening DevTools in the browser... (press shift-d to disable)
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:229:19)
at onErrorNT (internal/child_process.js:406:16)
at process._tickCallback (internal/process/next_tick.js:63:19)
Any ideas? Or even suggestions on another place where I can post this issue since it's failing out of the box. All help appreciated.
For windows:-
add environment variable in
set Path - C:\Windows\System32\
after setting path. restart your computer.
In my case, I added C:\Windows\System32\
See the Picture below:

React Native, Error while Launching Dev Tools. in ubuntu 16

I have installed a new react native project using create-react-native-app. When I do yarn start or npm start and scan with expo, it gives me the following error in ubuntu (when remote js debugging is on).
Launching Dev Tools...
Google Chrome exited with error: Error: Exited with code 1
at ChildProcess. (/home/shivam/AwesomeProject/node_modules/opn/index.js:86:8)
at Object.onceWrapper (events.js:254:19)
at ChildProcess.emit (events.js:159:13)
at maybeClose (internal/child_process.js:943:16)
at Socket.stream.socket.on (internal/child_process.js:363:11)
at Socket.emit (events.js:159:13)
at Pipe._handle.close [as _onclose] (net.js:568:12)
Finished building JavaScript bundle in 95196ms
Stopping packager...
Packager stopped.
Done in 701.25s.
But its not the case with windows(it opens the debugger in browser).I guess in ubuntu It tries to launch debugger in browser, but somehow fails to do so. I followed some links but none of them helped.
https://github.com/facebook/react-native/issues/9901
https://github.com/facebook/react-native/issues/990
https://github.com/facebook/react-native/issues/297
Run yarn or npm without sudo, because when you enable devtools it's tries opening chrome by command (chrome won't open with sudo)
You can do it open google chrome and hit this url http://localhost:8081/debugger-ui
open console tab to debug
Disable Chrome cache
Right-click chrome
Go to 'inspect element'
Look for the 'network' tab somewhere at the top. Click it.
Check the 'disable cache' checkbox.
Reference : react-native-debugging

React Packager fails; must reboot computer every 3-5 times app is reloaded

I get the error shown below every 3-5 times I reload the iOS app for React Packager. When restarting Xcode with that error, I see this in the packager window:
"login: fork: Resource temporarily unavailable
[Process exited - exit code 1]"
The above will not even allow opening any terminal on the Mac.
The only way to make it work is to REBOOT the machine (Running OS X 10.10.5, react-native 0.10 stable and also 0.11 stable)
WARN: not opened
Launching Dev Tools...
TypeError: Cannot read property 'addListener' of undefined
at exports.execFile (child_process.js:234:15)
at Object.handle (/Users/brianmcginnis/learn/react-native2/senior-tab/SeniorTab/node_modules/react-native/packager/packager.js:198:7)
at next (/Users/brianmcginnis/learn/react-native2/senior-tab/SeniorTab/node_modules/react-native/node_modules/connect/lib/proto.js:190:15)
at Object.openStackFrameInEditor [as handle] (/Users/brianmcginnis/learn/react-native2/senior-tab/SeniorTab/node_modules/react-native/packager/packager.js:184:5)
at next (/Users/brianmcginnis/learn/react-native2/senior-tab/SeniorTab/node_modules/react-native/node_modules/connect/lib/proto.js:190:15)
at IncomingMessage.<anonymous> (/Users/brianmcginnis/learn/react-native2/senior-tab/SeniorTab/node_modules/react-native/packager/packager.js:174:5)
at emitNone (events.js:67:13)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:893:12)
at doNTCallback2 (node.js:429:9)
ERROR spawn /Users/brianmcginnis/learn/react-native2/senior-tab/SeniorTab/node_modules/react-native/packager/launchChromeDevTools.applescript EAGAIN
{"code":"EAGAIN","errno":"EAGAIN","syscall":"spawn /Users/brianmcginnis/learn/react-native2/senior-tab/SeniorTab/node_modules/react-native/packager/launchChromeDevTools.applescript","path":"/Users/brianmcginnis/learn/react-native2/senior-tab/SeniorTab/node_modules/react-native/packager/launchChromeDevTools.applescript","spawnargs":["http://localhost:8081/debugger-ui"]}
Error: spawn /Users/brianmcginnis/learn/react-native2/senior-tab/SeniorTab/node_modules/react-native/packager/launchChromeDevTools.applescript EAGAIN
at exports._errnoException (util.js:837:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at doNTCallback2 (node.js:429:9)
at process._tickCallback (node.js:343:17)
See http://facebook.github.io/react-native/docs/troubleshooting.html
for common problems and solutions.
Process terminated. Press <enter> to close the window
Try updating to the latest version of Native.
Also, if you are running your sim in xcode, you can clear the cache of your project by using command+shift+k with the project stopped.
See if this clears it whenever you have the problem.
I installed latest version of react native, then uninstalled iojs. I installed latest Node.js and everything now works.