Update Troubleshooting.md

This commit is contained in:
Martin Konicek 2015-11-14 19:32:45 +00:00
parent 358c2360da
commit e171d67c55
1 changed files with 4 additions and 2 deletions

View File

@ -94,7 +94,7 @@ Ensure that you are on the same WiFi network as your computer. If you're using a
##### Android
You need to run `adb reverse tcp:8081 tcp:8081` to forward requests from the device to your computer. This works only on Android 5.0 and newer.
#### Module that uses `WebSocket` throws exception
## Module that uses `WebSocket` (such as Firebase) throws an exception
React Native implements a polyfill for WebSockets. These polyfills are initialized as part of the react-native module that you include in your application through `require('react-native')`. If you load another module that requires WebSockets, be sure to load/require it after react-native.
@ -104,4 +104,6 @@ var React = require('react-native');
var Firebase = require('firebase');
```
In the case of Firebase requiring firebase *before* react-native will result in a: 'No transports available' redbox.
Requiring firebase *before* react-native will result in a 'No transports available' redbox.
Discovered thanks to issue [#3645](https://github.com/facebook/react-native/issues/3645). If you're curious, the polyfills are set up in [InitializeJavaScriptAppEngine.js](https://github.com/facebook/react-native/blob/master/Libraries/JavaScriptAppEngine/Initialization/InitializeJavaScriptAppEngine.js).