diff --git a/app/package.json b/app/package.json index 5bc0d3e2..dd012b5a 100644 --- a/app/package.json +++ b/app/package.json @@ -26,7 +26,7 @@ "dependencies": { "@expo/bunyan": "^1.8.10", "@expo/json-file": "^5.0.1", - "@expo/ngrok": "2.2.8", + "@expo/ngrok": "2.2.9", "@exponent/electron-cookies": "^2.0.0", "aphrodite": "^1.2.3", "autobind-decorator": "^1.3.4", diff --git a/src/ui/MainScreen.js b/src/ui/MainScreen.js index 9c7c1a06..033f7535 100644 --- a/src/ui/MainScreen.js +++ b/src/ui/MainScreen.js @@ -1162,12 +1162,24 @@ class MainScreen extends React.Component { } } - async _computeUrlAsync(root) { - if (!root) { + async _computeUrlAsync(projectRoot) { + if (!projectRoot) { return null; } - return UrlUtils.constructManifestUrlAsync(root); + const { + url, + isUrlFallback, + } = await Project.getManifestUrlWithFallbackAsync(projectRoot); + + if (isUrlFallback) { + this._logError( + 'Switched to a LAN URL because the tunnel appears to be down. ' + + 'Only devices in the same network can access the app. ' + + 'You can restart the project to try reconnecting.' + ); + } + return url; } _registerLogs() {