playwright
playwright copied to clipboard
Firefox browser launch is failing in windows container
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.
Can we launch web firefox. For me it is laynching the nighty
How to launch web firefox in windows container?
We don't have much experience with windows containers; maybe someone from community can help? So far I'll mark this as P3. Please upvote the issue so that we can see how many people are affected!
https://github.com/microsoft/playwright/issues/14792 could be related issue.
I can sometimes repro with this repo: https://github.com/mxschmitt/playwright-windows-containers# Logs: https://gist.github.com/mxschmitt/a0b5a6b70a42530c6cbabd8ada57d612 version: 1.25
Page.setInitScriptsdoes not resolve.
For the record: we didn't manage to reproduce with the mcr.microsoft.com/windows/server:ltsc2022 as the base image.
This should not be moved beyond 1.26
For me this looks like a bug in the Windows Docker container image. If you do something as simple as New-Item C:\foo.txt -ItemType file before running Playwright with Firefox it works as expected.
@arjaiswa can you try the Windows Server images?
mcr.microsoft.com/windows/server:ltsc2022
For me this looks like a bug in the Windows Docker container image. If you do something as simple as
New-Item C:\foo.txt -ItemType filebefore running Playwright with Firefox it works as expected.@arjaiswa can you try the Windows Server images?
mcr.microsoft.com/windows/server:ltsc2022
is windows server is working ?
For me this looks like a bug in the Windows Docker container image. If you do something as simple as
New-Item C:\foo.txt -ItemType filebefore running Playwright with Firefox it works as expected.@arjaiswa can you try the Windows Server images?
mcr.microsoft.com/windows/server:ltsc2022is windows server is working ?
Yes, mcr.microsoft.com/windows/server:ltsc2022 is working.
Sure . I will test this .
Get Outlook for iOShttps://aka.ms/o0ukef
From: Puneet Agarwal @.> Sent: Monday, September 5, 2022 8:45:37 AM To: microsoft/playwright @.> Cc: Arti Jaiswal @.>; Mention @.> Subject: Re: [microsoft/playwright] Firefox browser launch is failing in windows container (Issue #13679)
For me this looks like a bug in the Windows Docker container image. If you do something as simple as New-Item C:\foo.txt -ItemType file before running Playwright with Firefox it works as expected.
@arjaiswahttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Farjaiswa&data=05%7C01%7CArti.Jaiswal%40microsoft.com%7C5c4ddb6073184cbe461808da8f129ff8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637979607432449151%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8QQuXREUwR4NO%2BLLVQIMzOC3xdYB%2B7MB0LXyqSWw2Nc%3D&reserved=0 can you try the Windows Server images?
mcr.microsoft.com/windows/server:ltsc2022
is windows server is working ?
— Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fplaywright%2Fissues%2F13679%23issuecomment-1236652070&data=05%7C01%7CArti.Jaiswal%40microsoft.com%7C5c4ddb6073184cbe461808da8f129ff8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637979607432449151%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=QCxLu%2BjjVhlTvHNiEe%2F5zT4YVQnvAJgOqUFQdbR5Maw%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FASJBIB47AILA5GTZJZKZFIDV4WQKDANCNFSM5T63X5MA&data=05%7C01%7CArti.Jaiswal%40microsoft.com%7C5c4ddb6073184cbe461808da8f129ff8%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637979607432449151%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=oC2moF%2Bi13wUvnZKG4r%2F9ULcx2m4NoDrxTpSDGxwIbo%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>
Closing for now since it seems like the pure Windows image seems misbehaving, with mcr.microsoft.com/windows/server:ltsc2022 it works as intended.
Reopening to keep the investigation going.
See for the last repro here: https://github.com/mxschmitt/playwright-windows-containers
This works for me on Playwright v1.26
For the record, running the following in PowerShell before starting Playwright seems to work around the issue:
#Start-Process -FilePath 'C:\Users\ContainerAdministrator\AppData\Local\ms-playwright\firefox-1352\firefox\firefox.exe' -ArgumentList '--headless --screenshot shot.png about:blank' -Wait
I had same problem, and when I change image to mcr.microsoft.com/windows/server:win10-21h1-preview it seems to be working now ;)