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

Fix EPERM errors reading transient/locked files on Windows without Watchman #1007

Closed
wants to merge 1 commit into from

Conversation

robhogan
Copy link
Contributor

Summary:
As reported in #1001, fs.lstat operations on Windows can fail with EPERM in certain circumstances - apparently when new files are either still being written or are about to be deleted.

Currently, this bubbles up as a Watcher error, whereas it should be handled gracefully.

Reportedly the OS will follow up with another event on the file when it's ready to read, so we may safely ignore EPERM in add/change event processing.

NOTE: This raises the question of why we're watching build output/intermediate directories in the default React Native Metro config. We should almost certainly be ignoring them from Metro.

 - **[Changelog]** Fix EPERM file watching errors on Windows.

Differential Revision: D46803761

…tchman

Summary:
As reported in facebook#1001, `fs.lstat` operations on Windows can fail with `EPERM` in certain circumstances - apparently when new files are either still being written or are about to be deleted.

Currently, this bubbles up as a Watcher error, whereas it should be handled gracefully.

Reportedly the OS will follow up with another event on the file when it's ready to read, so we may safely ignore `EPERM` in `add`/`change` event processing.

NOTE: This raises the question of why we're watching build output/intermediate directories in the default React Native Metro config. We should almost certainly be ignoring them from Metro.

```
 - **[Changelog]** Fix EPERM file watching errors on Windows.
```

Differential Revision: D46803761

fbshipit-source-id: e9551392208240e91ab813487efb94849f7e41b8
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Jun 19, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D46803761

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 4b22efb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants