Better error message format
Summary:
The existing error message was not in the centre and didn't give any possible remediation steps.
{F1015240268}
Reviewed By: passy
Differential Revision: D46394149
fbshipit-source-id: 09d450bef9df83c5b3af3ba49c7e0fafb81bfdce
This commit is contained in:
committed by
Facebook GitHub Bot
parent
80c201b10f
commit
353e51e2ea
@@ -231,8 +231,8 @@ async function start() {
|
|||||||
|
|
||||||
start().catch((e) => {
|
start().catch((e) => {
|
||||||
console.error('Failed to start Flipper desktop', e);
|
console.error('Failed to start Flipper desktop', e);
|
||||||
document.getElementById('root')!.textContent =
|
document.getElementById('loading')!.textContent =
|
||||||
'Failed to start Flipper desktop: ' + e;
|
'Failed to start Flipper. ' + e;
|
||||||
});
|
});
|
||||||
|
|
||||||
function getStaticPath(appPath: string) {
|
function getStaticPath(appPath: string) {
|
||||||
|
|||||||
@@ -47,7 +47,11 @@ export function createFlipperServerWithSocket(
|
|||||||
let initialConnectionTimeout: ReturnType<typeof setTimeout> | undefined =
|
let initialConnectionTimeout: ReturnType<typeof setTimeout> | undefined =
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
reject(
|
reject(
|
||||||
new Error('Failed to connect to flipper-server in a timely manner'),
|
new Error(
|
||||||
|
`Failed to connect to the server in a timely manner.
|
||||||
|
It may be unresponsive. Run the following from the terminal
|
||||||
|
'lsof -nP -iTCP -sTCP:LISTEN | grep 52342' and kill the listed process, if any.`,
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}, CONNECTION_TIMEOUT);
|
}, CONNECTION_TIMEOUT);
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
@@ -8,9 +9,34 @@
|
|||||||
<link rel="stylesheet" href="graphiql/graphiql.css">
|
<link rel="stylesheet" href="graphiql/graphiql.css">
|
||||||
<link rel="stylesheet" href="vis/vis.min.css">
|
<link rel="stylesheet" href="vis/vis.min.css">
|
||||||
<title>Flipper</title>
|
<title>Flipper</title>
|
||||||
|
<style>
|
||||||
|
#loading {
|
||||||
|
-webkit-app-region: drag;
|
||||||
|
z-index: 999999;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
padding: 50px;
|
||||||
|
overflow: auto;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 20px;
|
||||||
|
color: #525252;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root">
|
||||||
|
<div id="loading">
|
||||||
|
Loading...
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<script>
|
<script>
|
||||||
global.electronRequire = window.require;
|
global.electronRequire = window.require;
|
||||||
</script>
|
</script>
|
||||||
@@ -29,4 +55,5 @@
|
|||||||
</script>
|
</script>
|
||||||
<script src="bundle.js"></script>
|
<script src="bundle.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user