watchman: MacOS: Packing rn's bundle always stuck with Recrawled
I’m facing many ‘Recrawled’ problems recently.They stuck me in the packing process.The total process takes me an hour and a half what took me just several minutes before.
I have solved several problems with raising the default per-process descriptor limit and updating the ruby version(other packages with the same updating).
But I have the last problem with the info of ‘FSEvents flag’, I have no idea to resolve it
Recrawled this watch 1 times, most recently because: MustScanSubDirs UserDroppedTo resolve, please review the information on https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl To clear this warning, run: 'watchman watch-del '/Users/lanleilei/temp/mobile' ; watchman watch-project '/Users/lanleilei/temp/mobile' '
MacOS: 11.6 Big Sur ruby: 2.7.5p203 watchman: 2021.12.06.00
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 110
- Comments: 59 (1 by maintainers)
Same issue here, really annoying. I had to run
watchman watch-del-all
regularly to keep this away temporarily.watchman watch-del-all
This worked for me.
I had this issue since moving to M1 with Monterey.
And I fixed this by modifying my .watchmanconfig as follows;
{ "fsevents_latency": 0.05, "fsevents_try_resync": "true", "prefer_split_fsevents_watcher": "true" }
The default for
fsevents_latency
is0.01
in later versions of Watchman. By increasing we allow the system to batch more change notifications together.Then run;
watchman shutdown-server
, and then try running Watchman again.You can refer to: https://facebook.github.io/watchman/docs/config.html#fsevents-latency
For me this started happening since I switched to a MacBook with M1 chip. Never have seen this before.
I have also been experiencing this issue for the last month or so.
I’ve seen that warning in one standard React Native project and one Expo project.
I got an M1 Mac at around the same time the issue started happening, so I’m not sure if the issue is related to the new architecture or to the fact that the version of watchman that was released around then is problematic.
for MacOS M1 solved for me;
$ watchman shutdown-server
$ brew update
$ brew reinstall watchman
for more question; https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
That doesn’t work for long, my system is the same…
Well, i have the same issue, but my solution to that was reseting the Watchman, like this
https://stackoverflow.com/questions/49443341/watchman-crawl-failed-retrying-once-with-node-crawler
I am also seeing
after moving development to an M1 Macbook
any updates?
I ran this and brew upgraded watchman to
2023.08.28.00
but I still get the same issue on a MacBook Pro with M1 Maxwith
2023.10.09.00
I’m also getting this warning.I can clear the warning, but it will come back pretty quickly.
I’ve checked https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl and did not find any mention of
MustScanSubDirs UserDroppedTo resolve
.Any idea what ‘MustScanSubDirs UserDroppedTo resolve’ means? It seems like this GitHub issue is one of the very few pages that Google can find that mention it at all.
Searching within this repo, there’s only one occurrence of
MustScanSubDirs
: https://github.com/facebook/watchman/blob/28b3a655a2de1b7940ca67440e7489604d199fbb/watchman/watcher/fsevents.cpp#L73This also shows up in the
fsevents
package, which looks like an unrelated nodejs wrapper around fsevents: https://github.com/search?q=repo%3Afsevents%2Ffsevents MustScanSubDirs&type=code They added handling ofMustScanSubDirs
back in April: https://github.com/fsevents/fsevents/commit/a77340f4f96a6e02cd5bfabaaebd4e10535ee533In Apple’s docs I found this page: https://developer.apple.com/documentation/coreservices/1455361-fseventstreameventflags/kfseventstreameventflagmustscansubdirs/
Since the warning mentions both
MustScanSubDirs
andUserDroppedTo
I guess this means we cankFSEventStreamEventFlagMustScanSubDirs
andkFSEventStreamEventFlagUserDropped
. Aka “the bottleneck happened in your client”.I know way too little about fsevents to do anything with that though.
My watchman crashes with this config and I cannot start metro at all. Here’s the output:
I can confirm I’m experiencing this issue with watchman version
2022.03.21.00
This started when I switched from an intel based mac to arm64Shutting down the server and reinstalling it via brew did not solve my issue, warnings come back shortly.
watchman warning: Recrawled this watch 45 times, most recently because: MustScanSubDirs UserDroppedTo resolve, please review the information on https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl To clear this warning, run:
watchman watch-del '/Users/rodrigodiasdefigueiredo/Desktop/test-app' ; watchman watch-project '/Users/rodrigodiasdefigueiredo/Desktop/test-app
I’m using a MacBook air M1, react-native. 0.67.2. and MacOs Monterey Ps: I’m not using expo!
I suspect it’s related to a watchman change in recent releases, I’m seeing it on an Intel Mac here.
Bumping this issue, still happening in 2023 on macOS Monterey 12.6, on a MacBook Pro (16", 2019, not M1). Is there a solution which is compatible with recent macOS versions?
Any update on this, same problem here after migrating to m1 mac
This is happening to me as well when running jest tests on a NextJS project (not react native):
Clearing the warning does not resolve the issue.
Using M1 Max Macbook Pro on Monterey 12.2.1
Acording to https://facebook.github.io/watchman/docs/cookies#limitation-macos-fsevents I add { “ignore_dirs”: [“build”, “ios”, “android”, “.git”] } into .watchmanconfig of project’s root path, and then restart my Mac, it works.
For future Googlers: I fixed the issue eventually by just uninstalling watchman. 🙃 (Obviously only helps people who don’t need watchman directly, maybe you installed it incidentally.) It was coming up because of running Jest, and apparently it doesn’t need to be installed for that to run, and was causing issues with Jest.
it keeps showing this to me
watchman warning: Recrawled this watch 9 times, most recently because: MustScanSubDirs UserDroppedTo resolve, please review the information on https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl To clear this warning, run:
I’ve tried many things, but none solved it
my .watchmanconfig is {}
@Harris-Miller I was able to fix this using the troubleshooting guide on the Watchman docs here and [here] (https://facebook.github.io/watchman/docs/install.html#system-specific-preparation).
TL;DR Run the following commands to increase the per-process descriptor limit:
To persist this change across reboots, create a file at
/etc/sysctl.conf
if it doesn’t already exist. Add the following into the file.The manual says Only applicable on macOS 10.6 and earlier. Just tried it on M1 Monterey, the issue still here.
upd. This approach also wasn’t helpful https://superuser.com/questions/1634286/how-do-i-increase-the-max-open-files-in-macos-big-sur
@sergtimosh that’s right. See https://github.com/facebook/watchman/issues/880#issuecomment-749687420 for confirmation. In theory nothing is required for macOS 10.7+
The same issue on
M1
Mac Book Pro.Same problem here, using M2 Air Ventura 13.0
I’ve got this error when using the config above
All requests will continue to fail with this message until you resolve the underlying problem. You will find more information on fixing this at https://facebook.github.io/watchman/docs/troubleshooting.html#poison-opendir. Make sure watchman is running for this project. See https://facebook.github.io/watchman/docs/troubleshooting
Any updates on this issue?
Macbook Pro 2018 fresh installed has same issue.
@jason0x43
then it’s related to the latest watchman versions. As I mentioned earlier the MacBook I was setting up first doesn’t had this issue(versions 2021.10.18.00 and 2021.09.06.00). The one I started to work with on December (watchman: 2021.12.20.00) was spitting this Recrawled message into the output.