diff --git a/desktop/flipper-ui/src/app-connection-updates.tsx b/desktop/flipper-ui/src/app-connection-updates.tsx
index 36000b07f78..786a30e5fde 100644
--- a/desktop/flipper-ui/src/app-connection-updates.tsx
+++ b/desktop/flipper-ui/src/app-connection-updates.tsx
@@ -8,13 +8,16 @@
*/
import {css} from '@emotion/css';
-import {Button, message, notification, Typography} from 'antd';
+import {Button, message, Modal, notification, Typography} from 'antd';
import React from 'react';
import {Layout} from './ui';
+import {Dialog} from 'flipper-plugin';
+import {getFlipperServer} from './flipperServer';
type ConnectionUpdate = {
key: string;
type: 'loading' | 'info' | 'success' | 'success-info' | 'error' | 'warning';
+ os: string;
app: string;
device: string;
title: string;
@@ -97,7 +100,7 @@ export const connectionUpdate = (
duration = 3;
} else if (update.type === 'loading') {
// seconds until show how to debug hanging connection
- duration = 10;
+ duration = 30;
}
message.open({
key: update.key,
@@ -111,29 +114,131 @@ export const connectionUpdate = (
message.destroy(update.key);
}
: undefined,
+ // NOTE: `onClose` is only called when the message is closed by antd because of `duration`
+ // It is not closed when we call `message.destroy(key)`.
+ // Thus we can use it trigger a timeout modal for hanging "attempting to connect" messages
onClose: () => {
- // only called if closed by timeout
- console.log('on close called for ', update.key);
if (update.type === 'loading') {
- // TODO show conect timeout modal NEXT DIFF
- console.log('show a modal with step');
-
- notification.error({
- key: update.key,
- message: 'App failed to connect',
- description: (
-
+
+ Connecting to {app} has timed out.
+
+
+ This is usually can be fixed in a few ways. Try the following in the
+ order presented.
+
+
+ Least involved
+
+
+
+
+ Completly close the app on the device
+
+
+
+
+
+
+ Launch the app on the device
+
+
+
+ More involved
+
+
+
+ Restart device
+
+
+
+
+
+
+ Most involved
+
+
+ This can be frequently fixed by restarting your computer.
+
+