From ead78b99d42ff8e59ac77950d8f8315ea0e68020 Mon Sep 17 00:00:00 2001 From: Ben Roth Date: Mon, 24 Jul 2017 19:30:14 -0700 Subject: [PATCH] Add more information to `__fbBatchedBridge is undefined` error --- React/Executors/RCTJSCExecutor.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/React/Executors/RCTJSCExecutor.mm b/React/Executors/RCTJSCExecutor.mm index 1d5c0b3b03b9e1..397d64bb227449 100644 --- a/React/Executors/RCTJSCExecutor.mm +++ b/React/Executors/RCTJSCExecutor.mm @@ -596,7 +596,11 @@ - (void)_executeJSCall:(NSString *)method } } else { if (!errorJSRef && JSC_JSValueGetType(ctx, batchedBridgeRef) == kJSTypeUndefined) { - error = RCTErrorWithMessage(@"Unable to execute JS call: __fbBatchedBridge is undefined"); + error = RCTErrorWithMessage(@"Unable to execute JS call: __fbBatchedBridge is undefined. This can happen " + "if you try to execute JS and the bridge has not set up, for example if it encountered " + "an incomplete bundle or a fatal script execution error during startup. Verify that a " + "valid JS bundle is included with your app and that it loaded correctly, or try " + "reinstalling the app."); } }