Issue 1:
Context:

Playwright Version: 1.30

Operating System: Windows

Node.js version: 14.17.3

Browser: Firefox

Describe the bug

We created one windows docker container with the image that only starts playwright server with all the dependencies installed in it. When we connected to that container from our local client test for firefox browser, it got timeout. This issue comes only first time connection. All subsequent tests pass after first failure.

Here are the container logs -

2023-02-24T09:07:33.491Z pw:server [id=1] serving connection: /
2023-02-24T09:07:33.757Z pw:server [id=1] engaged launch mode for "firefox"
2023-02-24T09:07:33.757Z pw:proxy Starting socks proxy server on port 49158
2023-02-24T09:07:33.757Z pw:server [id=1] started socks proxy on port 49158
2023-02-24T09:07:36.273Z pw:browser <launching> C:\Users\ContainerAdministrator\AppData\Local\ms-playwright\firefox-1372\firefox\firefox.exe -no-remote -headless -profile C:\Users\ContainerAdministrator\AppData\Local\Temp\playwright_firefoxdev_profile-gejPlh -juggler-pipe -silent
2023-02-24T09:07:36.273Z pw:browser <launched> pid=2156
2023-02-24T09:07:37.867Z pw:browser [pid=2156][err] *** You are running in headless mode.
2023-02-24T09:07:38.992Z pw:browser [pid=2156][out]
2023-02-24T09:07:38.992Z pw:browser [pid=2156][out] Juggler listening to the pipe
2023-02-24T09:07:38.992Z pw:protocol SEND ► {"id":1,"method":"Browser.enable","params":{"attachToDefaultContext":false}}
2023-02-24T09:07:38.992Z pw:protocol SEND ► {"id":2,"method":"Browser.getInfo"}
2023-02-24T09:07:38.992Z pw:protocol SEND ► {"id":3,"method":"Browser.setBrowserProxy","params":{"type":"socks","bypass":[],"host":"127.0.0.1","port":49158}}
2023-02-24T09:07:39.164Z pw:protocol ◀ RECV {"id":1}
2023-02-24T09:07:39.164Z pw:protocol ◀ RECV {"id":2,"result":{"version":"Firefox/108.0.2","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0"}}
2023-02-24T09:07:39.164Z pw:protocol ◀ RECV {"id":3}
2023-02-24T09:07:39.594Z pw:browser [pid=2156][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt (t=32.655) [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
2023-02-24T09:07:39.688Z pw:protocol SEND ► {"id":4,"method":"Browser.createBrowserContext","params":{"removeOnDetach":true}}
2023-02-24T09:07:39.891Z pw:protocol ◀ RECV {"id":4,"result":{"browserContextId":"2be0e955-3782-4c1b-951a-db88f76ee078"}}
2023-02-24T09:07:39.891Z pw:protocol SEND ► {"id":5,"method":"Browser.setDownloadOptions","params":{"browserContextId":"2be0e955-3782-4c1b-951a-db88f76ee078","downloadOptions":{"behavior":"saveToDisk","downloadsDir":"C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\playwright-artifacts-PlDz2G"}}}
2023-02-24T09:07:39.891Z pw:protocol SEND ► {"id":6,"method":"Browser.setDefaultViewport","params":{"browserContextId":"2be0e955-3782-4c1b-951a-db88f76ee078","viewport":{"viewportSize":{"width":1280,"height":720},"deviceScaleFactor":1}}}
2023-02-24T09:07:39.891Z pw:protocol SEND ► {"id":7,"method":"Browser.setLocaleOverride","params":{"browserContextId":"2be0e955-3782-4c1b-951a-db88f76ee078","locale":"en-US"}}
2023-02-24T09:07:39.891Z pw:protocol SEND ► {"id":8,"method":"Browser.setExtraHTTPHeaders","params":{"browserContextId":"2be0e955-3782-4c1b-951a-db88f76ee078","headers":[{"name":"Accept-Language","value":"en-US"}]}}
2023-02-24T09:07:39.891Z pw:protocol SEND ► {"id":9,"method":"Browser.setColorScheme","params":{"browserContextId":"2be0e955-3782-4c1b-951a-db88f76ee078","colorScheme":"light"}}
2023-02-24T09:07:39.891Z pw:protocol SEND ► {"id":10,"method":"Browser.setReducedMotion","params":{"browserContextId":"2be0e955-3782-4c1b-951a-db88f76ee078","reducedMotion":"no-preference"}}
2023-02-24T09:07:39.891Z pw:protocol SEND ► {"id":11,"method":"Browser.setForcedColors","params":{"browserContextId":"2be0e955-3782-4c1b-951a-db88f76ee078","forcedColors":"none"}}
2023-02-24T09:07:39.969Z pw:protocol ◀ RECV {"id":5}
2023-02-24T09:07:39.985Z pw:protocol ◀ RECV {"id":6}
2023-02-24T09:07:39.985Z pw:protocol ◀ RECV {"id":7}
2023-02-24T09:07:39.985Z pw:protocol ◀ RECV {"id":8}
2023-02-24T09:07:39.985Z pw:protocol ◀ RECV {"id":9}
2023-02-24T09:07:39.985Z pw:protocol ◀ RECV {"id":10}
2023-02-24T09:07:39.985Z pw:protocol ◀ RECV {"id":11}
2023-02-24T09:07:40.251Z pw:protocol SEND ► {"id":12,"method":"Browser.newPage","params":{"browserContextId":"2be0e955-3782-4c1b-951a-db88f76ee078"}}
2023-02-24T09:07:46.094Z pw:protocol ◀ RECV {"method":"Browser.attachedToTarget","params":{"sessionId":"65e3a260-9b14-4408-846a-0df0cb09ef69","targetInfo":{"targetId":"6b1ab5a2-7871-426b-8752-eac220cb2dc5","type":"page","browserContextId":"2be0e955-3782-4c1b-951a-db88f76ee078"}}}
2023-02-24T09:07:46.094Z pw:protocol SEND ► {"method":"Page.setInitScripts","params":{"scripts":[{"script":"","worldName":"__playwright_utility_world__"}]},"id":13,"sessionId":"65e3a260-9b14-4408-846a-0df0cb09ef69"}
2023-02-24T09:07:47.501Z pw:protocol ◀ RECV {"id":12,"result":{"targetId":"6b1ab5a2-7871-426b-8752-eac220cb2dc5"}}
2023-02-24T09:07:47.501Z pw:browser [pid=2156][err] JavaScript error: resource://gre/modules/URIFixup.sys.mjs, line 302: NS_ERROR_FAILURE: Should pass a non-null uri
2023-02-24T09:07:47.516Z pw:browser [pid=2156][out] console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\playwright_firefoxdev_profile-gejPlh\\search.json.mozlz4", (void 0)))
2023-02-24T09:08:33.245Z pw:server [id=1] disconnected. error: undefined
2023-02-24T09:08:33.245Z pw:protocol SEND ► {"id":14,"method":"Browser.setRequestInterception","params":{"browserContextId":"2be0e955-3782-4c1b-951a-db88f76ee078","enabled":false}}
2023-02-24T09:08:33.245Z pw:server [id=1] starting cleanup
2023-02-24T09:08:33.245Z pw:browser [pid=2156] <gracefully close start>
2023-02-24T09:08:43.412Z pw:browser [pid=2156][out] WARNING: At least one completion condition is taking too long to complete. Conditions: [{"name":"Extension shutdown: webcompat@mozilla.org","state":{"state":"Startup: Run manifest, asyncEmitManifestEntry(\"background\")"},"filename":"resource://gre/modules/addons/XPIProvider.jsm","lineNumber":2629,"stack":["resource://gre/modules/addons/XPIProvider.jsm:startup/<:2629","resource://gre/modules/AsyncShutdown.jsm:observe:560","chrome://juggler/content/protocol/BrowserHandler.js:Browser.close:140"]},{"name":"Extension shutdown: webcompat-reporter@mozilla.org","state":{"state":"Startup: Run manifest, asyncEmitManifestEntry(\"background\")"},"filename":"resource://gre/modules/addons/XPIProvider.jsm","lineNumber":2629,"stack":["resource://gre/modules/addons/XPIProvider.jsm:startup/<:2629","resource://gre/modules/AsyncShutdown.jsm:observe:560","chrome://juggler/content/protocol/BrowserHandler.js:Browser.close:140"]},{"name":"Extension shutdown: pictureinpicture@mozilla.org","state":{"state":"Startup: Run manifest, asyncEmitManifestEntry(\"background\")"},"filename":"resource://gre/modules/addons/XPIProvider.jsm","lineNumber":2629,"stack":["resource://gre/modules/addons/XPIProvider.jsm:startup/<:2629","resource://gre/modules/AsyncShutdown.jsm:observe:560","chrome://juggler/content/protocol/BrowserHandler.js:Browser.close:140"]},{"name":"Extension shutdown: formautofill@mozilla.org","state":{"state":"Startup: Run manifest, asyncEmitManifestEntry(\"background\")"},"filename":"resource://gre/modules/addons/XPIProvider.jsm","lineNumber":2629,"stack":["resource://gre/modules/addons/XPIProvider.jsm:startup/<:2629","resource://gre/modules/AsyncShutdown.jsm:observe:560","chrome://juggler/content/protocol/BrowserHandler.js:Browser.close:140"]},{"name":"Extension shutdown: addons-search-detection@mozilla.com","state":{"state":"Startup: Run manifest, asyncEmitManifestEntry(\"background\")"},"filename":"resource://gre/modules/addons/XPIProvider.jsm","lineNumber":2629,"stack":["resource://gre/modules/addons/XPIProvider.jsm:startup/<:2629","resource://gre/modules/AsyncShutdown.jsm:observe:560","chrome://juggler/content/protocol/BrowserHandler.js:Browser.close:140"]}] Barrier: profile-change-teardown
2023-02-24T09:09:03.257Z pw:browser [pid=2156] <kill>
2023-02-24T09:09:03.257Z pw:browser [pid=2156] <will force kill>
2023-02-24T09:09:03.579Z pw:browser [pid=2156] taskkill stdout: SUCCESS: The process with PID 2968 (child process of PID 2220) has been terminated.
SUCCESS: The process with PID 2220 (child process of PID 2156) has been terminated.
SUCCESS: The process with PID 2156 (child process of PID 1988) has been terminated.

2023-02-24T09:09:03.579Z pw:browser [pid=2156] <process did exit: exitCode=1, signal=null>
2023-02-24T09:09:03.579Z pw:browser [pid=2156] starting temporary directories cleanup
2023-02-24T09:09:03.720Z pw:browser [pid=2156] finished temporary directories cleanup
2023-02-24T09:09:03.720Z pw:browser [pid=2156] <gracefully close end>
2023-02-24T09:09:03.720Z pw:server [id=1] finished cleanup

Issue 2:
Context:

Playwright Version: 1.21.0

Operating System: Windows

Node.js version: 12.4

Browser: Firefox

Extra: [any specific details about your environment]

While Launching the Firefox browser in mcr.microsoft.com/windows:1809

2022-04-21T10:30:15.990Z pw:server [id=1] engaged launch mode for "firefox"
[0] 2022-04-21T10:30:17.490Z pw:browser <launching> C:\Users\ContainerAdministrator\AppData\Local\ms-playwright\firefox-1319\firefox\firefox.exe -no-remote -headless -profile C:\Users\ContainerAdministrator\AppData\Local\Temp\playwright_firefoxdev_profile-u8MLHc -juggler-pipe -silent
[0] 2022-04-21T10:30:17.505Z pw:browser <launched> pid=2396
[0] 2022-04-21T10:30:17.521Z pw:protocol SEND ► {"id":1,"method":"Browser.enable","params":{"attachToDefaultContext":false}}
[0] 2022-04-21T10:30:17.521Z pw:protocol SEND ► {"id":2,"method":"Browser.getInfo"}
[0] 2022-04-21T10:30:17.818Z pw:browser [pid=2396][err] *** You are running in headless mode.
[0] 2022-04-21T10:30:20.209Z pw:browser [pid=2396][out]
[0] 2022-04-21T10:30:20.209Z pw:browser [pid=2396][out] Juggler listening to the pipe
[0] 2022-04-21T10:30:20.506Z pw:protocol ◀ RECV {"id":2,"result":{"version":"Firefox/97.0.1","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0"}}
[0] 2022-04-21T10:30:20.553Z pw:browser [pid=2396][out] console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\playwright_firefoxdev_profile-u8MLHc\\search.json.mozlz4", (void 0)))
[0] 2022-04-21T10:30:21.287Z pw:browser [pid=2396][out] Crash Annotation GraphicsCriticalError: |[0][GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt (t=37.0051) [GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt
[0] 2022-04-21T10:30:23.083Z pw:protocol ◀ RECV {"id":1}
[0] 2022-04-21T10:30:23.630Z pw:protocol SEND ► {"id":3,"method":"Browser.createBrowserContext","params":{"removeOnDetach":true}}
[0] 2022-04-21T10:30:23.630Z pw:protocol ◀ RECV {"id":3,"result":{"browserContextId":"a8d90e81-299f-4328-a6df-e03e0d55fe9a"}}
[0] 2022-04-21T10:30:23.630Z pw:protocol SEND ► {"id":4,"method":"Browser.setDownloadOptions","params":{"browserContextId":"a8d90e81-299f-4328-a6df-e03e0d55fe9a","downloadOptions":{"behavior":"saveToDisk","downloadsDir":"C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\playwright-artifacts-BO5ZuU"}}}
[0] 2022-04-21T10:30:23.630Z pw:protocol SEND ► {"id":5,"method":"Browser.setDefaultViewport","params":{"browserContextId":"a8d90e81-299f-4328-a6df-e03e0d55fe9a","viewport":{"viewportSize":{"width":1280,"height":720},"deviceScaleFactor":1}}}
[0] 2022-04-21T10:30:23.630Z pw:protocol SEND ► {"id":6,"method":"Browser.setIgnoreHTTPSErrors","params":{"browserContextId":"a8d90e81-299f-4328-a6df-e03e0d55fe9a","ignoreHTTPSErrors":true}}
[0] 2022-04-21T10:30:23.630Z pw:protocol SEND ► {"id":7,"method":"Browser.setLocaleOverride","params":{"browserContextId":"a8d90e81-299f-4328-a6df-e03e0d55fe9a","locale":"en-US"}}
[0] 2022-04-21T10:30:23.630Z pw:protocol SEND ► {"id":8,"method":"Browser.setExtraHTTPHeaders","params":{"browserContextId":"a8d90e81-299f-4328-a6df-e03e0d55fe9a","headers":[{"name":"Accept-Language","value":"en-US"}]}}
[0] 2022-04-21T10:30:23.630Z pw:protocol SEND ► {"id":9,"method":"Browser.setColorScheme","params":{"browserContextId":"a8d90e81-299f-4328-a6df-e03e0d55fe9a","colorScheme":"light"}}
[0] 2022-04-21T10:30:23.630Z pw:protocol SEND ► {"id":10,"method":"Browser.setReducedMotion","params":{"browserContextId":"a8d90e81-299f-4328-a6df-e03e0d55fe9a","reducedMotion":"no-preference"}}
[0] 2022-04-21T10:30:23.630Z pw:protocol SEND ► {"id":11,"method":"Browser.setForcedColors","params":{"browserContextId":"a8d90e81-299f-4328-a6df-e03e0d55fe9a","forcedColors":"none"}}
[0] 2022-04-21T10:30:23.630Z pw:protocol ◀ RECV {"id":4}
[0] 2022-04-21T10:30:23.630Z pw:protocol ◀ RECV {"id":5}
[0] 2022-04-21T10:30:23.630Z pw:protocol ◀ RECV {"id":6}
[0] 2022-04-21T10:30:23.630Z pw:protocol ◀ RECV {"id":7}
[0] 2022-04-21T10:30:23.630Z pw:protocol ◀ RECV {"id":8}
[0] 2022-04-21T10:30:23.630Z pw:protocol ◀ RECV {"id":9}
[0] 2022-04-21T10:30:23.630Z pw:protocol ◀ RECV {"id":10}
[0] 2022-04-21T10:30:23.630Z pw:protocol ◀ RECV {"id":11}
[0] 2022-04-21T10:30:24.490Z pw:protocol SEND ► {"id":12,"method":"Browser.newPage","params":{"browserContextId":"a8d90e81-299f-4328-a6df-e03e0d55fe9a"}}
[0] 2022-04-21T10:30:25.912Z pw:protocol ◀ RECV {"method":"Browser.attachedToTarget","params":{"sessionId":"c14e3a8e-25fe-4936-b97d-53a7f20d7827","targetInfo":{"targetId":"1fc6545d-32af-4e66-b9b0-d64c58a572af","type":"page","browserContextId":"a8d90e81-299f-4328-a6df-e03e0d55fe9a"}}}
[0] 2022-04-21T10:30:25.927Z pw:protocol SEND ► {"method":"Page.setInitScripts","params":{"scripts":[{"script":"","worldName":"__playwright_utility_world__"}]},"id":13,"sessionId":"c14e3a8e-25fe-4936-b97d-53a7f20d7827"}
[0] 2022-04-21T10:30:26.693Z pw:protocol ◀ RECV {"id":12,"result":{"targetId":"1fc6545d-32af-4e66-b9b0-d64c58a572af"}}
[0] 2022-04-21T10:31:01.938Z pw:protocol SEND ► {"id":14,"method":"Browser.removeBrowserContext","params":{"browserContextId":"a8d90e81-299f-4328-a6df-e03e0d55fe9a"}}
[0] 2022-04-21T10:31:01.954Z pw:protocol ◀ RECV {"method":"Browser.detachedFromTarget","params":{"sessionId":"c14e3a8e-25fe-4936-b97d-53a7f20d7827","targetId":"1fc6545d-32af-4e66-b9b0-d64c58a572af"}}
[0] 2022-04-21T10:31:01.954Z pw:protocol ◀ RECV {"id":14}
[0] 2022-04-21T10:31:02.235Z pw:protocol SEND ► {"id":15,"method":"Browser.createBrowserContext","params":{"removeOnDetach":true}}
[0] 2022-04-21T10:31:02.235Z pw:protocol ◀ RECV {"id":15,"result":{"browserContextId":"98ee6220-26ed-4b9f-a7a3-1750819f897a"}}
[0] 2022-04-21T10:31:02.235Z pw:protocol SEND ► {"id":16,"method":"Browser.setDownloadOptions","params":{"browserContextId":"98ee6220-26ed-4b9f-a7a3-1750819f897a","downloadOptions":{"behavior":"saveToDisk","downloadsDir":"C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\playwright-artifacts-BO5ZuU"}}}
[0] 2022-04-21T10:31:02.235Z pw:protocol SEND ► {"id":17,"method":"Browser.setDefaultViewport","params":{"browserContextId":"98ee6220-26ed-4b9f-a7a3-1750819f897a","viewport":{"viewportSize":{"width":1280,"height":720},"deviceScaleFactor":1}}}
[0] 2022-04-21T10:31:02.235Z pw:protocol SEND ► {"id":18,"method":"Browser.setIgnoreHTTPSErrors","params":{"browserContextId":"98ee6220-26ed-4b9f-a7a3-1750819f897a","ignoreHTTPSErrors":true}}
[0] 2022-04-21T10:31:02.235Z pw:protocol SEND ► {"id":19,"method":"Browser.setLocaleOverride","params":{"browserContextId":"98ee6220-26ed-4b9f-a7a3-1750819f897a","locale":"en-US"}}
[0] 2022-04-21T10:31:02.235Z pw:protocol SEND ► {"id":20,"method":"Browser.setExtraHTTPHeaders","params":{"browserContextId":"98ee6220-26ed-4b9f-a7a3-1750819f897a","headers":[{"name":"Accept-Language","value":"en-US"}]}}
[0] 2022-04-21T10:31:02.235Z pw:protocol SEND ► {"id":21,"method":"Browser.setColorScheme","params":{"browserContextId":"98ee6220-26ed-4b9f-a7a3-1750819f897a","colorScheme":"light"}}
[0] 2022-04-21T10:31:02.235Z pw:protocol SEND ► {"id":22,"method":"Browser.setReducedMotion","params":{"browserContextId":"98ee6220-26ed-4b9f-a7a3-1750819f897a","reducedMotion":"no-preference"}}
[0] 2022-04-21T10:31:02.235Z pw:protocol SEND ► {"id":23,"method":"Browser.setForcedColors","params":{"browserContextId":"98ee6220-26ed-4b9f-a7a3-1750819f897a","forcedColors":"none"}}
[0] 2022-04-21T10:31:02.251Z pw:protocol ◀ RECV {"id":16}
[0] 2022-04-21T10:31:02.251Z pw:protocol ◀ RECV {"id":17}
[0] 2022-04-21T10:31:02.251Z pw:protocol ◀ RECV {"id":18}
[0] 2022-04-21T10:31:02.251Z pw:protocol ◀ RECV {"id":19}
[0] 2022-04-21T10:31:02.251Z pw:protocol ◀ RECV {"id":20}
[0] 2022-04-21T10:31:02.251Z pw:protocol ◀ RECV {"id":21}
[0] 2022-04-21T10:31:02.251Z pw:protocol ◀ RECV {"id":22}
[0] 2022-04-21T10:31:02.251Z pw:protocol ◀ RECV {"id":23}
[1] [2022-04-21T10:31:02.360Z] "Start time: 1650537015912, End time: 1650537062360 and Duration: 46.448 seconds"
[0] 2022-04-21T10:33:26.681Z pw:browser [pid=2396][err] JavaScript error: resource://activity-stream/lib/PersonalityProvider/PersonalityProvider.jsm, line 68: TypeError: / is not a valid URL.
[0] 2022-04-21T10:35:27.293Z pw:browser [pid=2396][err] JavaScript error: resource://activity-stream/lib/PersonalityProvider/PersonalityProvider.jsm, line 68: TypeError: / is not a valid URL.