Skip to content
Permalink
Browse files

Make the load-script-error less misleading (#17055)

Summary:
For most cases, people saw this error when they are running a debug version. So they should check metro server first. However, they were misled to search for "bundle" keywords and finally they executed "react-native bundle" command and got an app that can never reload.
Pull Request resolved: #17055

Differential Revision: D13421737

Pulled By: cpojer

fbshipit-source-id: 8e108df06b7d416a74c33581457f3213b28306c1
  • Loading branch information...
sunnylqm authored and facebook-github-bot committed Jan 28, 2019
1 parent 54534e7 commit 46aaa02274a51ebe2aaa9fca2422dcebf9323475
Showing with 3 additions and 2 deletions.
  1. +3 −2 ReactAndroid/src/main/jni/react/jni/JSLoader.cpp
@@ -59,8 +59,9 @@ std::unique_ptr<const JSBigString> loadScriptFromAssets(
}
}

throw std::runtime_error(folly::to<std::string>("Unable to load script from assets '", assetName,
"'. Make sure your bundle is packaged correctly or you're running a packager server."));
throw std::runtime_error(folly::to<std::string>("Unable to load script. Make sure you're "
"either running a Metro server (run 'react-native start') or that your bundle '", assetName,
"' is packaged correctly for release."));
}

}}

0 comments on commit 46aaa02

Please sign in to comment.
You can’t perform that action at this time.