This repository has been archived by the owner on Sep 25, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve ngrok error handling in exp/xde/xdl (#817)
* Test ngrok tunnels and use a fallback if necessary Before displaying a tunnel URL in XDE, check that it actually works. If it doesn't, fall back to a LAN URL. Note: there's some existing fallback behavior in `UrlUtils.constructUrlAsync` (see: https://github.com/expo/universe/blob/cbbda0bdcc77795024537d1dcba584879b3ed056/dev/xdl/src/UrlUtils.js#L233-L240) But because it doesn't test the URL, it's only triggered if the tunnel was not created in the first place. We also can't easily detect when this fallback happens. That's why an explicit test and fallback is necessary. * Use `/status` endpoint to check if packager is alive This is less hacky than searching for the string "Cached Bundles" in the `/debug` endpoint output and less likely to break in the future since it's the mechanism react-native itself uses to check if the packager is running. * Upgrade @expo/ngrok to v2.2.9 * Add tunnel URL fallback and warning to exp * Avoid testing tunnel URLs when in offline mode fbshipit-source-id: 3c9d275
- Loading branch information