react-dropzone ignores dropped files in Chrome 157: SecurityError on FileSystemFileHandle.getFile()
SecurityError: Failed to execute 'getFile' on 'FileSystemFileHandle': An attempt was made to break through the security policy of the user agent.
Short answer: Chrome and Edge 157 refuse getFile() on a dropped file that sits in a protected folder, such as AppData. file-selector 1.2 to 4.0.0, which react-dropzone 14 and 15 use, has no fallback, so the drop is lost without a message. Upgrade to react-dropzone 19.2.0 or later, or pass the small getFilesFromEvent function below.
No time to dig in? I upgrade react-dropzone or add the drop fix, and send you a pull request within 48 hours: $49, card, no account. Still failing, full refund. The free steps are below.
Checked on 11 November 2026 against the sources below.
Why it happens
For a dropped file, old file-selector calls item.getAsFileSystemHandle() and then handle.getFile(). Chromium 157 added a blocklist check to that read: for a file in a blocked folder it now answers with a SecurityError. On Windows the blocked folders include %LOCALAPPDATA%, %APPDATA%, %ProgramData%, Program Files and the Windows folder. Classic Outlook hands over a dragged attachment as a temporary copy, and the report below puts that copy under %LOCALAPPDATA%, so the read is refused. The plain File from item.getAsFile() is still readable. Firefox has no getAsFileSystemHandle(), so the old code takes the fallback there and works. The promise rejects inside react-dropzone, so onDrop never runs. How we checked (11 November 2026): we read Chromium's source at two release tags. In 157.0.8103.50, FileSystemAccessFileHandleImpl::AsBlob (the code behind getFile()) runs the new check and returns a security error; 156.0.8078.82 has no such check. We then ran ten file-selector versions in Node 24 with a simulated drop whose getFile() throws this error. Versions 1.2.0, 2.1.0, 2.1.2, 3.0.0, 3.1.2 and 4.0.0 rejected the drop. Versions 0.6.0, 4.0.2, 4.1.0 and 5.0.2 returned the file. The function below returned the file on every version. We did not reproduce the drop from Outlook in a real Chrome 157: that part comes from the Documenso report and Chromium's source. file-selector 2.1.2 alone had 12.2 million npm downloads in the week of 3 to 9 November 2026.
You may also see
Dragging an attachment from Outlook onto the upload area does nothing in Chrome 157 or Edge 157onDrop is never called and no error is shown; the same drop works in FirefoxUncaught (in promise) SecurityError in file-selector fromDataTransferItem
Fix
- Check it's this: in Chrome or Edge 157 on Windows, drag an attachment from classic Outlook (or a file from
%TEMP%, which is inside%LOCALAPPDATA%) onto your drop zone. Nothing happens and the console shows the SecurityError above. Then check the library:npm ls file-selectorshows a version from 1.2 to 4.0.0. - Best fix: upgrade react-dropzone to 19.2.0 or later (20.2.0 is current, 8 November 2026). From 19.2.0 it requires file-selector 4.1.0 or later, which reads
item.getAsFile()first. Versions 18 and later need React 18 or later, and it is a jump of several major versions from 14, so read the release notes and run your upload tests.npm install react-dropzone@latest npm ls file-selector - Can't upgrade yet (React 16 or 17, or a pinned design system): keep your version and pass
getFilesFromEvent. It reads plain files during the drop and leaves folders, file-input changes and everything else to the library. CallgetAsFile()before anyawait: the items are empty once the drop event has finished.import { useDropzone } from "react-dropzone"; import { fromEvent } from "file-selector"; async function getFilesFromEvent(event) { if (event.type === "drop" && event.dataTransfer && event.dataTransfer.items) { const items = Array.from(event.dataTransfer.items).filter((i) => i.kind === "file"); const hasFolder = items.some((i) => { const entry = typeof i.webkitGetAsEntry === "function" ? i.webkitGetAsEntry() : null; return entry && entry.isDirectory; }); if (!hasFolder) { const files = items.map((i) => i.getAsFile()).filter(Boolean); if (files.length) { files.forEach((f) => { if (!("path" in f)) { Object.defineProperty(f, "path", { value: "./" + f.name, enumerable: true }); } }); return files; } } } return fromEvent(event); } const { getRootProps, getInputProps } = useDropzone({ onDrop, getFilesFromEvent }); - Using file-selector without react-dropzone: upgrade it to 4.1.0 or later. Its
fromEvent(event)call is unchanged for drop and change events. - A UI kit wraps the dropzone for you (an upload component from a design system): check with
npm ls file-selectorwhich package pulls the old version, and look for agetFilesFromEventor dropzone-options prop on that component. - Test after the change: drop a file from the desktop, a file from
%TEMP%, an Outlook attachment and a folder, and pick a file through the button. All five should reachonDrop.
Get it fixed: $49
Pay by card, no account needed. Pull request within 48 hours; build still failing, full refund.
How it works: 1. Pay on Gumroad; the checkout asks for the repository. 2. Invite my GitHub user, Donrulezz, to that repository only (private is fine), or email a zip with the failing log to hello@deadlinefix.com. 3. You get a pull request with a list of every change; you review, merge and deploy. I never ask for cloud passwords or production keys.
Who does the work: me, Ashish, the owner of this site, based in India. My public code and tools are on GitHub: github.com/Donrulezz.
Watch out
- An npm
overridesentry for file-selector is not enough by itself. In react-dropzone 14.3.8 the ES module build (dist/es) imports file-selector, so an override changes it. The CommonJS build (dist/index.js) has file-selector 2 bundled inside, so an override does nothing there. We checked both files. - With the function above, dropped files have no
handleproperty. file-selector 2 set it from the file system handle. If your code writes back to dropped files throughfile.handle, upgrade instead. - Dropped folders still go through the library. On old file-selector they are read with
webkitGetAsEntry(), notgetFile(), so this error should not appear for them. We did not test folders in Chrome 157. - react-dropzone 14.2.3 and older use file-selector 0.6.0, which never asks for a file handle and passed our test. If
npm ls file-selectorshows 0.x, this page is not your problem. - Electron apps get the same error once their Chromium has this check: electron/electron issue #55529 reports it for files in the app's own userData folder on 46.0.0-alpha.2.
- The Upload button stopped working too, in a narrow pane or small pop-up? That is a different Chrome 157 change: see File chooser dialog was suppressed.
Sources
- Chromium source, tag 157.0.8103.50: file_system_access_file_handle_impl.cc (AsBlob runs the blocklist check)
- Chromium source, tag 157.0.8103.50: the blocked folders on Windows
- Chromium source, tag 156.0.8078.82: the same file without the check
- Documenso issue #3586: dropping Outlook attachments fails silently in Chrome/Edge 157
- Electron issue #55529: getFile() throws SecurityError for dropped userData files
- react-dropzone on npm: versions and their file-selector requirement
Other errors breaking soon
- GitHub Actions: "Event 'pull_request_target' is not allowed to trigger Actions workflows"
- Unable to display RD Web Access: Chrome 158 and Edge 159 turn off XSLT
- OpenAI Agent Builder shuts down on 30 November 2026: export your workflows, keep ChatKit, move prompt objects
- Claude Sonnet 4.5 retires on 30 November 2026: the 400 errors on Sonnet 5.5 and the fix
- Exchange Online POP and IMAP: TLS 1.0 and 1.1 refused, imap-legacy.office365.com gone
- Windows KB5127648: 802.1X Wi-Fi, wired and VPN sign-in fails (NTLMv1 SSO blocked)
- Firebase: Runtime Node.js 20 was decommissioned
- Firebase Hosting deploy fails: 403 "Permission denied to get service [firebasehosting.googleapis.com]"
- GitHub webhooks: "Failed to connect to host" after GitHub added 3 webhook IP ranges (29 October 2026)
- AWS CodeBuild: Unknown runtime version named '20' of nodejs
- Google Cloud Python: non-supported Python version (3.10)
- Azure OpenAI o1, o3, o3-mini and o4-mini retired on 19 November 2026: 410 Gone
- OpenAI: "The model โฆ has been deprecated" or "Model not found" after a shutdown
- Nextcloud desktop 35.0.1 won't start: "UNIQUE constraint failed: metadata.inode"
- Contact Form 7 6.2: "Composer detected issues in your platform" (PHP 8.3 required)
- Biome 2.6: biome check fails on README.md and YAML files after the upgrade
- pytest 9.2: xdist_group tests run on different workers (--dist loadgroup)
- WordPress 7.2 ignores data-wp-init--, data-wp-watch-- and data-wp-run-- directives
- Ubuntu 26.04 upgrade stops with "Unable to upgrade MySQL" (mysql_native_password accounts)
- Excel for Mac crashes when you refresh a pivot table (version 16.114)
- Outlook.com / Hotmail rejects your email: "Message lacks SPF/DKIM/DMARC Auth Records (AS9031519)"
- HubSpot Pipelines API V1 stops on 4 December 2026: move /crm-pipelines/v1/pipelines calls (and the n8n HubSpot node's stage lists)
- Typer 0.29: 'TyperOption' object has no attribute 'type', click_type and typer._types are gone
- Upload button does nothing in Office panes and small windows: "File chooser dialog was suppressed" (400x300)
- Playwright v1.64.1 Docker image now has Node 26: "Cannot read properties of undefined (reading 'prototype')"
- Playwright for Python 1.65 in Docker: driver/node: error while loading shared libraries: libatomic.so.1
- NumPy 2.4+: einsum with optimize=True returns wrong results for bool and small-integer arrays