Suppress recurring 'still connecting' errors
Summary: https://fb.workplace.com/groups/flippersupport/permalink/1304868459993809/ Changelog: Don't show errors for clients that fail to connect in a timely fashion repeatedly. I think this change is fine, as even once the error is supressed, the clients will show up as 'still connecting...' in the app selector dropdown, which gives the same signal, but a bit less in the face. Reviewed By: lawrencelomax Differential Revision: D33976460 fbshipit-source-id: 7c5a02f3cd645ed1cbda47d186798857a05906f1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
762267bccc
commit
4f9cec718e
@@ -72,6 +72,7 @@ export class FlipperServerImpl implements FlipperServer {
|
|||||||
ios?: IOSDeviceManager;
|
ios?: IOSDeviceManager;
|
||||||
keytarManager: KeytarManager;
|
keytarManager: KeytarManager;
|
||||||
pluginManager: PluginManager;
|
pluginManager: PluginManager;
|
||||||
|
unresponsiveClients: Set<string> = new Set();
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public config: FlipperServerConfig,
|
public config: FlipperServerConfig,
|
||||||
@@ -118,14 +119,22 @@ export class FlipperServerImpl implements FlipperServer {
|
|||||||
medium: CertificateExchangeMedium;
|
medium: CertificateExchangeMedium;
|
||||||
deviceID: string;
|
deviceID: string;
|
||||||
}) => {
|
}) => {
|
||||||
this.emit('notification', {
|
const clientIdentifier = `${client.deviceName}#${client.appName}`;
|
||||||
type: 'error',
|
if (!this.unresponsiveClients.has(clientIdentifier)) {
|
||||||
title: `Timed out establishing connection with "${client.appName}" on "${client.deviceName}".`,
|
this.unresponsiveClients.add(clientIdentifier);
|
||||||
description:
|
this.emit('notification', {
|
||||||
medium === 'WWW'
|
type: 'error',
|
||||||
? `Verify that both your computer and mobile device are on Lighthouse/VPN that you are logged in to Facebook Intern so that certificates can be exhanged. See: https://fburl.com/flippervpn`
|
title: `Timed out establishing connection with "${client.appName}" on "${client.deviceName}".`,
|
||||||
: 'Verify that your client is connected to Flipper and that there is no error related to idb or adb.',
|
description:
|
||||||
});
|
medium === 'WWW'
|
||||||
|
? `Verify that both your computer and mobile device are on Lighthouse/VPN that you are logged in to Facebook Intern so that certificates can be exhanged. See: https://fburl.com/flippervpn`
|
||||||
|
: 'Verify that your client is connected to Flipper and that there is no error related to idb or adb.',
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.warn(
|
||||||
|
`[conn] Client still unresponsive: "${client.appName}" on "${client.deviceName}"`,
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user