React-Native "Could not get BatchedBridge"

Maybe you're like me. Maybe you've been working with ReactJS for a while and you want to play with React Native.

You download all of the appropriate tools to try and get a Android "Hello World" app working.

You create your project with react-native init HelloWorld and you run it with react-native run-android and it dies.

Could not get BatchedBridge, make sure your bundle is packaged correctly.

I don't know exactly what causes ☝️ but it's easy (albeit completely non-obvious) to fix. Luckily, you only have to follow these steps with a new project.

Create the android assets directory

mkdir android/app/src/main/assets

Manually start the React packager

react-native start --reset-cache

Manually force a build of the android build

curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"

Profit!

Now you should be able to do react-native run-android to launch your app.

One more thing

If you get any errors about hot-reloading and not connecting to the development console, just run adb reserve tcp:8081 tcp:8081 and then reload the app on the device.

All posts

  1. Scotty's extra-lean Thanksgiving
  2. Nothing else you do matters if you're fat
  3. A Dad's Guide to Snapchat
  4. The bullshit I put up with by not driving
  5. A restrospective on my wisdom teeth
  6. Waze Wants Me to Die
  7. The Time Kentucky Wanted a Submarine
  8. Phone calls from Mrs. Rothstein
  9. Ani DiFranco, Chinese food, and poor decisions
  10. The sun rises in the East
  11. Scotland, Day 5: The Wedding
  12. I've discovered the secret to true happiness
  13. What's happening at Bowman Field?
  14. More Bardstown Rd Pedestrian Safety Improvements
  15. My favorite video store
  16. Scenes from the weekend: Day of the Dead
  17. A good team needs good company culture
  18. College jobs
  19. I'm scared to run tomorrow
  20. The importance of teaching civil disobedience to our children
  21. That time I hit a kid with my car
  22. Stop blaming and fix the thing
  23. Basics of pedestrian safety
  24. The best (and worst) Halloween
  25. Reflections on Friends
  26. The Interview Where I Completely Froze
  27. Louisville needs to step up its bike-lane game
  28. A Farewell to a Server
  29. Gnocchi is a labor of love
  30. Middle School Shadow Economy
  31. Don't let your weaknesses define you
  32. Tales of woe in the college health center
  33. My favorite painting
  34. The oddity of passing time
  35. My kids are allowed to read anything they want
  36. The young fisherman
  37. Taking the lane
  38. The Soundtrack to Love
  39. Scotland, Day 4: Stirling
  40. An essential computer skill that most people dont know
  41. The nerdiest thing I ever did
  42. Tales of High School Theater
  43. Throwing things off other things
  44. I don't always know why I do things
  45. Passing an object to an ASP.NET MVC Controller
  46. Anger ruins everything
  47. Stories of love and hair
  48. Scotland, Day 3: Edinburgh
  49. Generating a client-side PDF with Javascript
  50. Vernacular: A digression
  51. Scotland, Day 2: Glasgow
  52. I have to enjoy my work
  53. Scotland, Day 1: Traveling
  54. Why I run
  55. My personal beard history
  56. My first nightmare
  57. Moms are tough as fuck
  58. Pedestrian safety improvements on Bardstown Rd.
  59. Free pass to Heaven
  60. The blue bus is calling us.
  61. Screaming with April and Kristin
  62. Viking Girl is growing up
  63. People who love you aren't afraid to call you out.
  64. You sometimes find terrible things on the side of the road
  65. The cure for teen angst is a river
  66. My son is me, but also not me.
  67. How to find out whos building stuff in Louisville
  68. Where's the new Bardstown Rd. Costco?
  69. My son, the mystery
  70. The first poet to blow my mind
  71. Focus on the things you did right
  72. The Saga of John the Baptist: Parts I III
  73. Camp, NOFX and Fire
  74. The magnetic poetry book
  75. Just temporarily disconnected
  76. Please don't ride your bike on the sidewalk
  77. I'm always afraid I'm in trouble
  78. My dog has many smells
  79. Perdido en la selva
  80. Not a wild child
  81. Weird things my kids have said
  82. When I realized I'm a grownup
  83. Crushes and more bad teenage poetry
  84. Me and High School Football
  85. The Mt. Lassen Motel, Red Bluff, CA
  86. The loneliest guy at Chilis
  87. Restaurant Reviews: The Bardstown
  88. My cultural knowledge void
  89. I want to go live in the woods sometimes
  90. The strangest domain name
  91. Sisi means aunt in Italian
  92. Debugging remote ASP.NET apps is super easy!
  93. The time before your child is born is an amazing and terrifying time.
  94. Email, poetry, madness and nostalgia
  95. The house on Klickitat Street
  96. That time I walked a little old Ecuadorian lady home
  97. All the kids I've hit
  98. Lets end the trope of the idiot dad
  99. A reminder about 4-way stops
  100. Ordering pizza in Germany
  101. The Mercy Underground
  102. My bicycle has a 115 dB air horn
  103. The only rule is work
  104. Restaurant Reviews: Havana Rumba (Highlands)
  105. Advice from my mom
  106. What I want in a job.
  107. The Ecuadorian toilet paper incident
  108. The budding photographer or why I cant hear Garth Brooks anymore
  109. Fear and loathing in Milwaukee
  110. Making food for the people you love
  111. Amanda Grimes, I'm sorry
  112. I am the dude with the hat
  113. The art of sneaking out
  114. Foo, bar, and other metasyntactic variables
  115. Freshman year in hell
  116. Vaccinate your damn kids, already
  117. Acts of rebellion
  118. The worst restaurant review ever
  119. I had my first migraine at 10
  120. Storage devices I have loved
  121. Bad teenage poetry #tbt
  122. Your partners problems are your problems
  123. Depression is like being in a loud room
  124. There is an art to asking questions
  125. I am a child of the BBS age
  126. Irrational fears
  127. The worst thing you could be in the 80's was poor
  128. My kids prefer video chats to phone calls
  129. A relationship is a choice
  130. My kids are terrible at knock knock jokes
  131. I gave my dad a haircut today
  132. I am a terrible traveler
  133. Hidden perks of being a blonde kid
  134. Indie music, pre-Internet
  135. Night swimming
  136. My heart lives in Portland
  137. Zen and the art of resource editing
  138. Junior Developer, hard lessons learned
  139. Stories and thoughts
  140. I hate notifications
  141. The intimacy of smell
  142. My Geometry teacher was an alcoholic?
  143. You never know fear until you become a parent
  144. I'm tired of all the gun violence
  145. Gaming handhelds I have loved
  146. The glorious act of creation
  147. The overwhelming drive to feed a child.
  148. Why I give coding test during interviews
  149. Pitbull dogs are family
  150. word.camera
  151. Highs and Lows
  152. I ride a bike to be a better person
  153. Just because you're allowed to curse doesn't mean you have to
  154. "I don't know" is an acceptable answer
  155. Naked body surfing in Ecuador
  156. Go fuck yourself with your atom bomb
  157. Never complain about having enough time
  158. Journalism is Dead
  159. Deep is the lizard's eye #tbt
  160. TARC's cashless fare system screws poor people
  161. Writing begets writing
  162. How much do I really remember?
  163. I love the Idaho-Stop
  164. Scary decisions are the best decisions
  165. Never trust your inputs
  166. That one-off thing with the terrible name will be around forever
  167. The joy of difficulty
  168. Anger and regret
  169. I am not a great programmer
  170. Free-writing: Lissie, Live at Brighton
  171. Don't get too hung up on tools
  172. The urge to grow things
  173. I refuse to let this city beat me
  174. Let's talk about interruptions...again.
  175. Bardstown Rd Businesses That Don't Care About Pedestrians (part 1)
  176. Bikejoring or, How to Wear Out Your Dog as Fast as Possible
  177. Thoughts on wasting time
  178. Tragedy and Perspective
  179. On the idea of admiration
  180. The joy of waiting for things
  181. Advice for junior developers
  182. The 4 common ways cars try to kill me
  183. I ran a marathon
  184. The Madness of Saturday
  185. Keeping a daily work log
  186. A frustrating Web.config transformation error
  187. My first century
  188. How _not_ to compare file versions in C#
  189. Auto-incrementing build numbers in Visual Studio 2012
  190. "The definition of the report 'XYZ' is invalid."
  191. Side effects of bike commuting
  192. By the numbers: Coldest ride ever
  193. The difference between 'git fetch' and 'git pull'
  194. Freshman Lunch Shenanigans
  195. Getting an '__doPostBack is undefined' error in IE10
  196. Noticing an odd difference between different implementations of JSON.stringify
  197. How not to make a sale
  198. Prayer for the repose of the dead
  199. You Meet All Kinds of People Cycling
  200. So iBooks Have a Hidden Unique ID
  201. The Three Most Important Pieces of Information for a Kid
  202. 20 Years Later, I Still Can't Read Ramona the Pest
  203. In which I decide not to bother with New Year's Resolutions
  204. I kinda regret deleting my Instagram account
  205. Hacking my eating habits
  206. I have been a dad for 10 years
  207. The most uncomfortable training session ever
  208. Minor hiccup with Google Drive
  209. I love living in The Highlands
  210. A dark start to the day
  211. Renting an Apartment in Boston
  212. I think I need to get over myself a little bit
  213. Making a mobile site behave like an iOS app
  214. Picasa data API fun: Creating albums and uploading images
  215. SVN working copy is nested?
  216. My one, feeble attempt at being a cracker of software.
  217. My Own Personal Daily WTF v1
  218. Get on your bike. No excuses
  219. Pixel level drawing with the canvas element
  220. New Year's Resolutions
  221. How to write a very simple jQuery Plugin
  222. Must-Have Chrome Extensions
  223. Preserving the $ with jQuery.noConflict
  224. Can't load XRegExp twice in the same frame
  225. Converting a Unix timestamp to a real Postgres date
  226. HTML5 Data Attributes and jQuery.data()
  227. Memories Wrapped Up in Music
  228. A poem for our daughters
  229. Handling Windows API Callbacks in VB .NET
  230. My Favorite Explanation of clip: rect();
  231. Basics of QR Codes
  232. Adding/Deleting Events with the Google Calendar API
  233. Basic Authentication with Titanium.Network.HTTPClient
  234. Even better overriding the Firebug console in IE
  235. SQL Management Studio 2008 says Saving changes is not permitted.
  236. Revert to a previous revision with Subversion
  237. Catching Ajax errors with jQuery
  238. Fun with Vim movement commands
  239. Copying ADODB Recordsets Across Databases
  240. The Proxy Pattern in Javascript
  241. Snippet for popping up a jQuery UI Dialog
  242. A Caveat When Declaring Javascript Arrays
  243. With jQuery, Awesomeness Abounds
  244. One-liner to syntax check a Python script
  245. Coding for Doctors in Haiti
  246. Changing an application's favicon in CherryPy
  247. Localizing PHP with gettext
  248. Running a CherryPy app with Apache and mod_python
  249. Basics of the Alternative PHP Cache (APC)
  250. Converting an RFC 3339 date to a Python timestamp(plus an update to my Google Docs backup script)
  251. Flickr REST API Basics
  252. Short list of required web developer tools
  253. Getting the caption of an image attached to a WordPress post
  254. Simple tabbed HTML navigation buttons
  255. Making sure FireBug console calls don't bomb in IE
  256. You have to be able to talk to people
  257. Not breaking the rules, but still being a jerk
  258. Fear
  259. Growing Up Pyro
  260. Locking Down Facebook
  261. Automatically blocking Twitter spam accounts
  262. File modification date/times in Python
  263. SSH Tunneling: Taming the series of tubes
  264. My single-handed destruction of an Ecuadorian cafe
  265. Basic page routing with CherryPy
  266. Demystifying Python Decorators
  267. Handy VBScript ASP syntax shortcut
  268. Twitter Trends: Experimenting with Adobe Air
  269. Getting started with CherryPy
  270. Installing things on Linux is still a pain in the tuchus
  271. Facebook's OpenID Support: Much Improved!
  272. Basic Lighttpd Setup
  273. Be Safe and Don't Be a Jerk
  274. Facebook's OpenID Support: It's cute and all but...
  275. Basics of the PHP PCRE functions
  276. This Bash trick will make your brain explode
  277. Saving the world with PHP array functions
  278. The PalmOS Browser War That Never Was
  279. 8 years today (and 14 years last March)
  280. It's not hard to avoid sounding like a moran moron
  281. Premature Optimization less harmful than Immature Stupidity
  282. Where am I? Where are you?
  283. Using PrototypeJS with Greasemonkey
  284. Yes, it's a camera. No, it doesn't need film
  285. Backing up your Google Docs
  286. Twitter Search API: Make millions, wow your friends.
  287. The shapening
  288. Writing a simple Twitter-bot in PHP
  289. Event handling with PrototypeJS
  290. Sometimes being a dad is all too real
  291. A refugee from the world
  292. HTML Emails for fun and profit
  293. Javascript awesomeness with Prototype
  294. Regular expressions in VBA
  295. Manipulating PDF files with Visual Basic .NET
  296. Google Client Logins
  297. Your data is your life. Why aren't you protecting it?
  298. RAID basics
  299. My .vimrc file
  300. I'm just a little bit starstruck
  301. In which handiness ensues
  302. It begins
  303. Profiling PHP with APD
  304. Fun with Branching Merging
  305. Comment Engine: Round 2
  306. Comment Engine: Round 1
  307. Foray into the Google App Engine
  308. Un-befuddling OpenID
  309. From Javascript to PHP and Back Again
  310. The fun solution is not always the right one
  311. Good Lazy vs. Bad Lazy
  312. Search Replace with vim
  313. The Editor War
  314. Interviewing is hard and annoying
  315. Further Adventures of a Domino's CSR
  316. How I Single-Handedly Further Disgruntled a Disgruntled Domino's Assistant Manager
  317. Further Tales of a Disgruntled Domino's Manager in Training
  318. Domino's Nightly Stoner Encounter
  319. Most bizzare lack of tip on a delivery
  320. The Saga of an Uhappily-Married-Disgruntled Manager at Domino's: Part 1