You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MCP]: browser_file_upload emits invalid code and does not cancel file chooser when paths is omitted #44091
Hi, I'm the Playwright bot. I reproduced this and checked #44092.
Reproduced on main; fixed by #44092 at fd8a561f6c4bbe49ff65754ce39ffc69691607ff. Chromium, Firefox and WebKit behave the same on Linux. Omitting paths generates setFiles(undefined) and skips the actual setFiles call. The PR supplies [] and always calls setFiles, fixing both parts.
Reproduction and results
On main, version 1.66.0-next, commit 8534271f0413bae6a455b7cf43b2637391bc614b:
The generated code is instead await fileChooser.setFiles(undefined).
I also extended the existing upload test independently: upload a file, reopen the chooser, call the tool with {}, then check input.files.length and the generated code. On main, the file count stays at 1; on the PR, it becomes 0 and the code uses setFiles([]).
Check
Chromium
Firefox
WebKit
Independent regression on main
Fails as reported
Fails as reported
Fails as reported
PR regression with main's implementation
Fails as reported
Fails as reported
Fails as reported
Independent regression on the PR
Passes
Passes
Passes
PR's upload regression
Passes
Passes
Passes
Checks run
All browser runs were headless on Linux:
npm run test-mcp -- files.spec.ts --project=chromium --project=firefox --project=webkit --grep 'browser_file_upload$'
npm run test-mcp -- files.spec.ts file-paths.spec.ts dialogs.spec.ts --project=chromium --project=firefox --project=webkit --workers=2
npm run build
npm run flint
The broader test run passed 65 tests, with 4 existing skips. Build and all lint checks passed. WebKit initially needed system libraries; after installing them, its tests ran successfully. The PR remains open, is not a draft, and has no merge conflicts. Its CLA check passed; no browser CI jobs have run on the fork PR. No second fix is proposed.
Activity
halcyon-past commentedon Nov 13, 2026
I have submitted a pull request with the fix and regression coverage in #44092.
Johanl001 commentedon Nov 13, 2026
Hi, I'd like to work on this issue. Could you please assign it to me? I'm interested in contributing and will work on implementing a solution. Thanks!
microsoft-playwright-automation commentedon Nov 13, 2026
microsoft-playwright-automation commentedon Nov 13, 2026
Hi, I'm the Playwright bot. I reproduced this and checked #44092.
Reproduced on main; fixed by #44092 at
fd8a561f6c4bbe49ff65754ce39ffc69691607ff. Chromium, Firefox and WebKit behave the same on Linux. OmittingpathsgeneratessetFiles(undefined)and skips the actualsetFilescall. The PR supplies[]and always callssetFiles, fixing both parts.Reproduction and results
On main, version
1.66.0-next, commit8534271f0413bae6a455b7cf43b2637391bc614b:The generated code is instead
await fileChooser.setFiles(undefined).I also extended the existing upload test independently: upload a file, reopen the chooser, call the tool with
{}, then checkinput.files.lengthand the generated code. On main, the file count stays at1; on the PR, it becomes0and the code usessetFiles([]).Checks run
All browser runs were headless on Linux:
npm run test-mcp -- files.spec.ts --project=chromium --project=firefox --project=webkit --grep 'browser_file_upload$' npm run test-mcp -- files.spec.ts file-paths.spec.ts dialogs.spec.ts --project=chromium --project=firefox --project=webkit --workers=2 npm run build npm run flintThe broader test run passed 65 tests, with 4 existing skips. Build and all lint checks passed. WebKit initially needed system libraries; after installing them, its tests ran successfully. The PR remains open, is not a draft, and has no merge conflicts. Its CLA check passed; no browser CI jobs have run on the fork PR. No second fix is proposed.
chore: mark v0.0.86 (#1873)
chore(deps): update all non-major dependencies (#383)
chore(deps): update dependency @playwright/mcp to v0.0.86 (#3298)
chore(deps): update dependency npm:@playwright/mcp to v0.0.86 (#25)