diff --git a/front_end/entrypoints/rn_inspector/rn_inspector.ts b/front_end/entrypoints/rn_inspector/rn_inspector.ts index 13af5b1626e..54d2a596854 100644 --- a/front_end/entrypoints/rn_inspector/rn_inspector.ts +++ b/front_end/entrypoints/rn_inspector/rn_inspector.ts @@ -62,7 +62,17 @@ class FuseboxClientMetadataModel extends SDK.SDKModel.SDKModel { SDK.SDKModel.SDKModel.register( FuseboxClientMetadataModel, - {capabilities: SDK.Target.Capability.None, autostart: true}, + { + capabilities: SDK.Target.Capability.None, + autostart: true, + // Ensure FuseboxClient.setClientMetadata is sent before most other CDP domains + // are initialised. This allows the backend to confidently detect non-Fusebox + // clients by the fact that they send e.g. Runtime.enable without sending any + // Fusebox-specific messages first. + // TODO: Explicitly depend on this model in RuntimeModel and LogModel, and + // remove the `early` and `autostart` flags. + early: true, + }, ); // @ts-ignore Exposed for legacy layout tests