Skip to content
This repository has been archived by the owner on Mar 4, 2019. It is now read-only.

Troubleshooting

Chelsey Mitchell edited this page Aug 1, 2016 · 17 revisions

Troubleshooting

The react-native ecosystem is young and moves fast. As a result, it's easy to run into issues. This page is intended to collect common problems and useful solutions.

Problem: errors persist despite changes, files don't seem to be updated

The React Native packager is a long-running process that caches files. Sometimes it fails to notice that a file has changed, especially in the node_modules folder.

Solution

Stop the packager terminal window and manually start the packager with the --reset-cache true option:

app/node_modules/react-native/packager/packager.sh --reset-cache true

Problem: cluttered ios-log

Looking at my iOS simulator log using react-native log-ios, there are many warning and error messages. For example:

Jul 30 13:04:36 Computer assertiond[44995] <Error>: assertion failed: 15F34 13E230: assertiond + 15801 [3C808658-78EC-3950-A264-79A64E0E463B]: 0x1
Jul 30 13:04:36 Computer Unknown[44995] <Error>:

Solution

As far as I can tell, these messages are expected to occur in the iOS simulator and harmless. There's no known way to hide these (useless) warnings.

Problem: console.error "Reload websocket error"

This red screen means that the ClojureScript code cannot create a connection to the "Boot Reload" websocket.

Solution

The error can occur in a number of different situations:

  • boot dev (which opens the reload websocket) is not running

  • There's a network problem that prevents the app to reach port 8079 on localhost.

    This often happens on Android because the Android emulator uses an emulated network device. In this case, the solution is to run adb reverse tcp:8079 tcp:8079 after the emulator has started.

  • There's a problem with previous JavaScript code. In this case it can be helpful to inspect the app log for earlier error messages.

Problem: android sdk error

When trying to build the android app with 'react-native run-android' get an error about SDK location.

> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

Solution

export ANDROID_HOME=/Users//Library/Android/sdk/ export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Clone this wiki locally