Closed
Bug 2083461
Opened 1 month ago
Closed 1 month ago
[firefox-devtools-mcp] upload_file_by_uid reports success but sets no file (regression in 0.10.5)
Categories
(Developer Infrastructure :: Firefox MCP, defect, P2)
Developer Infrastructure
Firefox MCP
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: gmipf64, Assigned: jdescottes)
References
(Blocks 1 open bug)
Details
Attachments
(1 external file)
Steps to reproduce
- Start firefox-devtools-mcp 0.10.5 or 0.10.6 with
--headless. - Open a local page with
<input type=file id=e>and achangelistener on it. - Call
take_snapshot, thenupload_file_by_uidwith the uid of that input and the path of an existing file. - Read
document.getElementById('e').files.lengthwithevaluate_script.
Actual results
The tool returns upload e1 without an error, but files.length is 0 and no change event fires.
Expected results
The file is set and a change event fires. With 0.10.4 and the same page and steps, files.length is 1 and the change event fires.
Additional notes:
- Good: 0.10.4. Bad: 0.10.5 and 0.10.6 (latest).
- Firefox 157.0 on Linux (Fedora 44), Node 22.22.2, headless, fresh profile.
- 0.10.4 sets the file with WebDriver classic Element Send Keys. Since bug 2074460 (commit c5b79a9a, first released in 0.10.5) the tool sends key actions to the focused element instead, which does not set files on a file input. WebDriver BiDi has
input.setFilesfor this. - With 0.10.4, several newline-separated paths in
filePathon amultipleinput end up as one selection with onechangeevent. It would help to keep that working.
Prepared with AI assistance (Claude Opus 5.5) and reviewed before submission.
| Assignee | ||
Comment 1•1 month ago
|
||
Thanks for filing, will take a look at this regression (had a similar issue when using it yesterday).
Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jdescottes)
Priority: -- → P2
| Assignee | ||
Comment 2•1 month ago
|
||
The most straightforward way to fix this is indeed to migrate the upload_file_by_uid tool to use WebDriver BiDi input.setFiles. Let's do that.
Flags: needinfo?(jdescottes)
Comment 3•1 month ago
|
||
(via GitHub webhook, authenticated as firefox-devtools-mcp@bots.tld)
| Assignee | ||
Updated•1 month ago
|
Assignee: nobody → jdescottes
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•