4

Update - this has been fixed with the release of 0.18.1

Trying to run the tutorial with Genymotion emulator.

  • React Native 0.18
  • OS X Yosemite
  • Genymotion

react-native run-android succeeds. Following along tutorial, successfully launches app in emulator until I get to this step:

var {
  AppRegistry,
  Image,
  StyleSheet,
  Text,
  View,
} = React;

App launches with red screen of death ("Unable to download JS bundle. Did you forget to start the development device..."). Noticing the following in react packager logs:

React packager ready.
[1:31:52 PM] <END>   Crawling File System (1102ms)
[1:31:52 PM] <START> Building in-memory fs for JavaScript
[1:31:54 PM] <END>   Building in-memory fs for JavaScript (2263ms)
[1:31:54 PM] <START> Building in-memory fs for Assets
[1:31:56 PM] <END>   Building in-memory fs for Assets (2149ms)
[1:31:56 PM] <START> Building Haste Map
[1:31:58 PM] <START> Building (deprecated) Asset Map
[1:31:59 PM] <END>   Building (deprecated) Asset Map (742ms)
[1:31:59 PM] <END>   Building Haste Map (2676ms)
[1:31:59 PM] <END>   Building Dependency Graph (8194ms)
[1:32:09 PM] <START> request:/index.android.bundle?platform=android&dev=true
[1:32:09 PM] <START> find dependencies
[1:32:09 PM] <END>   find dependencies (182ms)
[1:32:09 PM] <START> transform
transforming [========================================] 100% 393/394[1:32:44 PM] <START> request:/index.android.bundle?platform=android&dev=true

Note - hung on 393/394 (even though it says 100%).

I'm aware of this issue, solved via adb reverse tcp:8081 tcp:8081, but I'm running on an emulator, and don't think this is applicable here.

I've opened an issue on the React Native github, but am trying to see if anyone else saw this and got past it.

Edit: The React Native team has confirmed this is an open issue with.18 and the links are here in case anyone stumbles across this and wants to track it.

My original ticket, closed in favor of...

The current ticket

Community
  • 1
  • 1

2 Answers2

1

It's mentioned in the link you posted but I'd also try this:

In the app on android (when you see the RSOD) - open Menu (Command + M in Genymotion) -> Dev Settings -> Debug server host & port for device

In here put your computers IP address and port 8081 so, 192.168.x.x:8081 go back and Reload JS and hopefully you'll get rid of that RSOD!

scgough
  • 5,099
  • 3
  • 30
  • 48
  • Thanks scgough, I think this might address the issue if the emulator were not receiving messages from the server but in fact it is, it's just an issue where the packager is not properly bundling. It looks like the team is aware of it and has rolled my issue into another open ticket. I'll update my post with the link to it in case anyone else wants to track it. – tigeruppercut Jan 14 '16 at 20:15
  • I think I saw that via the Facebook community. Good luck. Hope it gets ironed out for you! – scgough Jan 14 '16 at 20:24
1

This is likely a packager related issue. So there is a chance that if you try other version of React Native, the issue would simply go away. Or you can try to go to localhost:8081 in your browser to verify that you could see the content of the bundle js.

noooooooob
  • 1,872
  • 3
  • 21
  • 27
  • Correct, it seems they are aware of it and have posted the issue link in my question. The output of localhost:8081 confirmed the bug. – tigeruppercut Jan 14 '16 at 20:21