microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
65.59k stars 3.57k forks source link

[BUG] installation of channels msedge-beta, msedge-dev and chrome-beta fails on windows11 #29004

Closed fenchu closed 4 months ago

fenchu commented 8 months ago

System info

Source code

[We will only be able to work on the issues that we can reproduce.]

playwright.exe cr --channel msedge-dev https://www.vg.no
Error: Chromium distribution 'msedge-dev' is not found at C:\Users\mobj\AppData\Local\Microsoft\Edge Dev\Application\msedge.exe
Run "playwright install msedge-dev"

playwright install msedge-dev
Downloading Microsoft Edge Dev
Installing Microsoft Edge Dev
ERROR: failed to install Microsoft Edge
Failed to install browsers
Error: Failed to install msedge-dev

[Please provide a self-contained example in a form of a snippet, archive or a repository.]

[Repro scenario can't be large or have external dependencies.]

Steps

Expected install the beta and dev channels, we are on AppData\Local so there is no admin requirements.

Actual no beta and dev channels installed

mxschmitt commented 8 months ago

It's unfortunately required to have administrator rights in order to install Google Chrome and Microsoft Edge. This requirement is given by the browser vendors. If you want to have non-admin browsers, we recommend sticking with our default ones which are portable.

The reason why \Local\ gets reported is because of this line which uses prefixes[0] while we check also the global installed path. In this case only the global one is relevant: https://github.com/microsoft/playwright/blob/f9c4955fe812aad3e73c452e2bfeafc814b76dd3/packages/playwright-core/src/server/registry/index.ts#L695

Does it work with admin permissions for you to install Edge?

fenchu commented 7 months ago

Hi again

I can go to https://www.microsoft.com/en-us/edge/download/insider?form=MA13FJ and install msedge-dev without being asked for admin root.

playwright install msedge-dev
Failed to install browsers
Error:
╔═════════════════════════════════════════════════════════════════════╗
║ ATTENTION: "msedge-dev" is already installed on the system!         ║

it is being installed here: "C:\Users\mobj\AppData\Local\Microsoft\Edge Dev\Application\msedge.exe" nothing under program Files

mxschmitt commented 7 months ago

Note: I've marked it as a feature request for now and we'll improve the error message in the meantime.

fenchu commented 7 months ago

I can use the execute_path so no problem. I added a wrapper just like for selenium. But we mostly test dev and beta browsers so it is a great feature.

pavelfeldman commented 4 months ago

Why was this issue closed?

Thank you for your contribution to our project. This issue has been closed due to its limited upvotes and recent activity, and insufficient feedback for us to effectively act upon. Our priority is to focus on bugs that reflect higher user engagement and have actionable feedback, to ensure our bug database stays manageable.

Should you feel this closure was in error, please create a new issue and reference this one. We're open to revisiting it given increased support or additional clarity. Your understanding and cooperation are greatly appreciated.