Skip to content

Commit

Permalink
Make the load-script-error less misleading (#17055)
Browse files Browse the repository at this point in the history
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 46aaa02
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ReactAndroid/src/main/jni/react/jni/JSLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.