diff --git a/desktop/flipper-server-client/src/FlipperServerClient.tsx b/desktop/flipper-server-client/src/FlipperServerClient.tsx index 834e91fce..0993bd0e7 100644 --- a/desktop/flipper-server-client/src/FlipperServerClient.tsx +++ b/desktop/flipper-server-client/src/FlipperServerClient.tsx @@ -50,7 +50,7 @@ export function createFlipperServerWithSocket( new Error( `Failed to connect to the server in a timely manner. It may be unresponsive. Run the following from the terminal - 'sudo lsof -i :52342' and kill the listed process, if any.`, + 'sudo kill $(lsof -t -i :52342)' as to kill any existing running instance, if any.`, ), ); }, CONNECTION_TIMEOUT); diff --git a/desktop/flipper-ui-core/src/chrome/SettingsSheet.tsx b/desktop/flipper-ui-core/src/chrome/SettingsSheet.tsx index a47197347..b75e23bc2 100644 --- a/desktop/flipper-ui-core/src/chrome/SettingsSheet.tsx +++ b/desktop/flipper-ui-core/src/chrome/SettingsSheet.tsx @@ -432,11 +432,7 @@ class SettingsSheet extends Component { process listening at port 52342. See below:
- - sudo lsof -i :52342 -
- sudo kill <PID> -
+ sudo kill $(lsof -t -i :52342) ) : ( <> diff --git a/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx b/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx index 0afb35618..8be377205 100644 --- a/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx +++ b/desktop/flipper-ui-core/src/dispatcher/flipperServer.tsx @@ -210,7 +210,7 @@ function handeEADDRINUSE(errorMessage: string) {

Please try to kill the offending process by running{' '} - kill $(lsof -ti:PORTNUMBER) and restart flipper. + sudo kill $(lsof -ti:PORTNUMBER) and restart flipper.

{errorMessage}