Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Chromium not launching on Windows #2901

Closed
arjunattam opened this issue Jul 10, 2020 · 5 comments
Closed

[BUG] Chromium not launching on Windows #2901

arjunattam opened this issue Jul 10, 2020 · 5 comments

Comments

@arjunattam
Copy link
Contributor

Context:

  • Playwright Version: 1.1.1
  • Operating System: Windows
  • Browser: Chromium

@JYC-99 is running into an issue launching Chromium on Windows. Reporting on his behalf.

Code Snippet

const playwright = require("playwright");

(async () => {
  const browser = await playwright.chromium.launch();
  const context = await browser.newContext()
  const page = await context.newPage();
  await page.goto('https://example.com');
  await page.screenshot({ path: `example.png` });
  await browser.close();
})();

Running with DEBUG=* reveals missing dlls (find lines with ERROR:dxva_video_decode_accelerator_win.cc). Relevant for #2745

pw:api => chromium.launch started +0ms
pw:browser <launching> C:\Users\yucongj\AppData\Local\ms-playwright\chromium-775089\chrome-win\chrome.exe --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI,BlinkGenPropertyTrees,ImprovedCookieControls,SameSiteByDefaultCookies --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --user-data-dir=C:\Users\yucongj\AppData\Local\Temp\playwright_chromiumdev_profile-UX5hK7 --remote-debugging-pipe --headless --hide-scrollbars --mute-audio --no-startup-window +0ms
pw:browser <launched> pid=8524 +408ms
pw:protocol SEND ► {"id":1,"method":"Target.setAutoAttach","params":{"autoAttach":true,"waitForDebuggerOnStart":true,"flatten":true}} +0ms
pw:protocol ◀ RECV {"id":1,"result":{}} +895ms
pw:api <= chromium.launch succeeded +1s
pw:protocol SEND ► {"id":2,"method":"Target.createBrowserContext","params":{"disposeOnDetach":true}} +2ms
pw:protocol ◀ RECV {"id":2,"result":{"browserContextId":"1F3605F4D9FE27D4DBE82D3E85E1099F"}} +2ms
pw:protocol SEND ► {"id":3,"method":"Browser.setDownloadBehavior","params":{"behavior":"deny","browserContextId":"1F3605F4D9FE27D4DBE82D3E85E1099F","downloadPath":"C:\\Users\\yucongj\\AppData\\Local\\Temp\\playwright_downloads-XaSJEs"}} +1ms
pw:protocol ◀ RECV {"id":3,"result":{}} +2ms
pw:protocol SEND ► {"id":4,"method":"Target.createTarget","params":{"url":"about:blank","browserContextId":"1F3605F4D9FE27D4DBE82D3E85E1099F"}} +2ms
pw:protocol ◀ RECV {"method":"Target.attachedToTarget","params":{"sessionId":"B27E73BB6CB069E1BE874710D51203FE","targetInfo":{"targetId":"CE1D0D93B69A01B41224728C1137F38B","type":"page","title":"","url":"","attached":true,"browserContextId":"1F3605F4D9FE27D4DBE82D3E85E1099F"},"waitingForDebugger":true}} +2ms
pw:protocol SEND ► {"id":5,"method":"Page.enable","sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +3ms
pw:protocol SEND ► {"id":6,"method":"Page.getFrameTree","sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +1ms
pw:protocol SEND ► {"id":7,"method":"Log.enable","params":{},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +1ms
pw:protocol SEND ► {"id":8,"method":"Page.setLifecycleEventsEnabled","params":{"enabled":true},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +1ms
pw:protocol SEND ► {"id":9,"method":"Runtime.enable","params":{},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +0ms
pw:protocol SEND ► {"id":10,"method":"Page.addScriptToEvaluateOnNewDocument","params":{"source":"\n//# sourceURL=__playwright_evaluation_script__0\n","worldName":"__playwright_utility_world__"},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +1ms
pw:protocol SEND ► {"id":11,"method":"Network.enable","sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +1ms
pw:protocol SEND ► {"id":12,"method":"Target.setAutoAttach","params":{"autoAttach":true,"waitForDebuggerOnStart":true,"flatten":true},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +1ms
pw:protocol SEND ► {"id":13,"method":"Emulation.setFocusEmulationEnabled","params":{"enabled":true},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +0ms
pw:protocol SEND ► {"id":14,"method":"Emulation.setDeviceMetricsOverride","params":{"mobile":false,"width":1280,"height":720,"screenWidth":1280,"screenHeight":720,"deviceScaleFactor":1,"screenOrientation":{"angle":90,"type":"landscapePrimary"}},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +0ms
pw:protocol SEND ► {"id":15,"method":"Emulation.setGeolocationOverride","params":{},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +2ms
pw:protocol SEND ► {"id":16,"method":"Network.setExtraHTTPHeaders","params":{"headers":{}},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +0ms
pw:protocol SEND ► {"id":17,"method":"Network.emulateNetworkConditions","params":{"offline":false,"latency":0,"downloadThroughput":-1,"uploadThroughput":-1},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +2ms
pw:protocol SEND ► {"id":18,"method":"Emulation.setEmulatedMedia","params":{"media":"","features":[{"name":"prefers-color-scheme","value":"light"}]},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +1ms
pw:protocol SEND ► {"id":19,"method":"Runtime.runIfWaitingForDebugger","sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +1ms
pw:protocol ◀ RECV {"id":4,"result":{"targetId":"CE1D0D93B69A01B41224728C1137F38B"}} +1ms
pw:protocol ◀ RECV {"id":15,"result":{},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +1ms
pw:browser:err [0710/094000.057:ERROR:dxva_video_decode_accelerator_win.cc(1368)] DXVAVDA fatal error: could not LoadLibrary: mf.dll: The specified module could not be found. (0x7E) +0ms
pw:browser:err [0710/094000.058:ERROR:dxva_video_decode_accelerator_win.cc(1368)] DXVAVDA fatal error: could not LoadLibrary: mfplat.dll: The specified module could not be found. (0x7E) +1ms
pw:browser:err [0710/094000.059:ERROR:dxva_video_decode_accelerator_win.cc(1368)] DXVAVDA fatal error: could not LoadLibrary: msmpeg2vdec.dll: The specified module could not be found. (0x7E) +1ms
pw:browser:err [0710/094000.060:ERROR:dxva_video_decode_accelerator_win.cc(1376)] DXVAVDA fatal error: could not LoadLibrary: msvproc.dll: The specified module could not be found. (0x7E) +0ms
pw:protocol ◀ RECV {"method":"Network.loadingFailed","params":{"requestId":"189AFF5D97B7DD4C922DFB96E1BB34CD","timestamp":1773229.832268,"type":"Document","errorText":"net::ERR_ABORTED","canceled":true},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +805ms
pw:protocol ◀ RECV {"id":12,"result":{},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +1ms
pw:protocol ◀ RECV {"method":"Inspector.targetCrashed","params":{},"sessionId":"B27E73BB6CB069E1BE874710D51203FE"} +1m
@pavelfeldman
Copy link
Member

Relevant code https://chromium.googlesource.com/chromium/src/+/master/media/gpu/windows/dxva_video_decode_accelerator_win.cc

@pavelfeldman
Copy link
Member

Looks like Windows 10 N is missing the media pack:

https://support.microsoft.com/en-us/help/4475817/media-feature-pack-for-windows-10-n-may-2019

Chrome is probably bundling something proprietary, while Chromium fails here.

@JYC-99
Copy link

JYC-99 commented Jul 14, 2020

Thanks @arjun27 @pavelfeldman for the investigation. We encountered with the same issue on windows server 2012 and windows server 2016 as well.

@yury-s
Copy link
Member

yury-s commented Jul 31, 2020

@JYC-99 did installing Media Pack resolve the problem or it's still failing on some of the windows server instances?

@pavelfeldman
Copy link
Member

We have some hints landed that should help resolving dependencies now. Closing for now, please file with additional details if the issue is still there.

The-Compiler added a commit to qutebrowser/qutebrowser that referenced this issue Dec 4, 2020
When trying to release in my Windows VM, I get:

    [1568:5924:1204/204551.986:ERROR:dxva_video_decode_accelerator_win.cc(1399)]
    DXVAVDA fatal error: could not LoadLibrary: mf.dll: The specified
    module could not be found. (0x7E)
    [1568:5924:1204/204551.986:ERROR:dxva_video_decode_accelerator_win.cc(1399)]
    DXVAVDA fatal error: could not LoadLibrary: mfplat.dll: The
    specified module could not be found. (0x7E)
    [1568:5924:1204/204551.986:ERROR:dxva_video_decode_accelerator_win.cc(1399)]
    DXVAVDA fatal error: could not LoadLibrary: msmpeg2vdec.dll: The
    specified module could not be found. (0x7E)
    [1568:5924:1204/204551.986:ERROR:dxva_video_decode_accelerator_win.cc(1407)]
    DXVAVDA fatal error: could not LoadLibrary: msvproc.dll: The
    specified module could not be found. (0x7E)

This seems to happen on Windows 10 N only, where the Windows Media
features (and thus probably DLLs) are missing.

See microsoft/playwright#2901
The-Compiler added a commit to qutebrowser/qutebrowser that referenced this issue Dec 4, 2020
When trying to release in my Windows VM, I get:

    [1568:5924:1204/204551.986:ERROR:dxva_video_decode_accelerator_win.cc(1399)]
    DXVAVDA fatal error: could not LoadLibrary: mf.dll: The specified
    module could not be found. (0x7E)
    [1568:5924:1204/204551.986:ERROR:dxva_video_decode_accelerator_win.cc(1399)]
    DXVAVDA fatal error: could not LoadLibrary: mfplat.dll: The
    specified module could not be found. (0x7E)
    [1568:5924:1204/204551.986:ERROR:dxva_video_decode_accelerator_win.cc(1399)]
    DXVAVDA fatal error: could not LoadLibrary: msmpeg2vdec.dll: The
    specified module could not be found. (0x7E)
    [1568:5924:1204/204551.986:ERROR:dxva_video_decode_accelerator_win.cc(1407)]
    DXVAVDA fatal error: could not LoadLibrary: msvproc.dll: The
    specified module could not be found. (0x7E)

This seems to happen on Windows 10 N only, where the Windows Media
features (and thus probably DLLs) are missing.

See microsoft/playwright#2901

(cherry picked from commit 2e65f73)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants