From e8a3f44f3fdddf7a10c269aa4cf67f19b10b4a4d Mon Sep 17 00:00:00 2001 From: tehfailsafe Date: Fri, 27 Mar 2015 11:00:52 -0700 Subject: [PATCH] Add recurring issues for troubleshooting Hopefully alleviates new issues getting created for similar problems. Addresses https://github.com/facebook/react-native/issues/257 https://github.com/facebook/react-native/issues/304 https://github.com/facebook/react-native/issues/306 https://github.com/facebook/react-native/issues/326 --- docs/Troubleshooting.md | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 docs/Troubleshooting.md diff --git a/docs/Troubleshooting.md b/docs/Troubleshooting.md new file mode 100644 index 000000000..8e332068a --- /dev/null +++ b/docs/Troubleshooting.md @@ -0,0 +1,43 @@ +--- +id: troubleshooting +title: Troubleshooting +layout: docs +category: Quick Start +permalink: docs/troubleshooting.html +--- + +## Cmd-R does not reload the simulator +Enable iOS simulator's "Connect hardware keyboard" from menu Hardware > Keyboard menu. + +![Keyboard Menu](https://cloud.githubusercontent.com/assets/1388454/6863127/03837824-d409-11e4-9251-e05bd31d978f.png) + + +If you are using a non-QWERTY/AZERTY keyboard layout you can use the `Hardware > Shake Gesture` to bring up the dev menu and click "Refresh" + +## Port already in use red-screen +![red-screen](https://cloud.githubusercontent.com/assets/602176/6857442/63fd4f0a-d3cc-11e4-871f-875b0c784611.png) + + +Something is probably already running on port 8081. You can either kill it or try to change which port the packager is listening to. + +### Kill process on port 8081 +`$ sudo lsof -n -i4TCP:8081 | grep LISTEN` + +then + +`$ kill -9 ` + + + +### Change the port in Xcode +Edit `AppDelegate.m` to use a different port. +``` + // OPTION 1 + // Load from development server. Start the server from the repository root: + // + // $ npm start + // + // To run on device, change `localhost` to the IP address of your computer, and make sure your computer and + // iOS device are on the same Wi-Fi network. + jsCodeLocation = [NSURL URLWithString:@"http://localhost:9381/index.ios.bundle"]; + ```