diff --git a/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js b/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js index 1df11aa8ace623..4099a7bfadfc6f 100644 --- a/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js +++ b/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js @@ -18,7 +18,6 @@ import type {NextHandleFunction} from 'connect'; import type {IncomingMessage, ServerResponse} from 'http'; import getDevToolsFrontendUrl from '../utils/getDevToolsFrontendUrl'; -import crypto from 'crypto'; import url from 'url'; const debuggerInstances = new Map(); @@ -58,7 +57,11 @@ export default function openDebuggerMiddleware({ (experiments.enableOpenDebuggerRedirect && req.method === 'GET') ) { const {query} = url.parse(req.url, true); - const {appId, device}: {appId?: string, device?: string, ...} = query; + const { + appId, + device, + launchId, + }: {appId?: string, device?: string, launchId?: string, ...} = query; const targets = inspectorProxy.getPageDescriptions().filter( // Only use targets with better reloading support @@ -108,7 +111,6 @@ export default function openDebuggerMiddleware({ return; } - const launchId = crypto.randomUUID(); const useFuseboxEntryPoint = target.reactNative.capabilities?.prefersFuseboxFrontend;