Open Eightyplus opened 6 years ago
There's no code in watchman that would do anything remotely like this; since it is an open source project you can verify this for yourself.
There are other projects that call themselves watchman. Perhaps you're running one of those? Perhaps you have a malware problem on that system?
No, I don't think so. No point in trusting this. Maybe it is not a watchman issue, but definitely something Facebook created. Create-react-app then?!?
Warning: opendir(/Users/X/Library/Caches/CloudKit/com.apple.Safari) -> Operation not permitted. Warning: opendir(/Users/X/Library/PersonalizationPortrait) -> Operation not permitted.
Maybe your watchman instance was instructed to watch /Users
or /Users/$USER
in its entirety and those prompts are just side effects of macOS throwing up a dialog? Could you run watchman watch-list
and share the output? Do you have a .git
directory in your home directory? That can cause watchman to attempt to aggregate a watch on your home directory rather than at a more specific deeper path.
I had a watchman warning: opendir(/Users/$USER/Library/Caches/CloudKit/com.apple.Safari) : Operation not permitted
warning when I was launching my react-native app through expo start
, I did a watchman watch-list
, found out that my /Users/$USER
was in the list, I did a watchman watch-del /Users/$USER
and now everything is alright.
We should consider adding an option to preventing watching the home directory of a user and defaulting it to false as a way to prevent this alarming dialog and also because a home directory is often very large and undesirable to watch. Watchman often considers aggregating at the home directory level because it is common practice for folks to place their dotfiles under version control, so their entire home directory is a git repo and is seen as a good project aggregation point by watchman.
I still don't know why watchman is traversing my home folder. And I do not have a .git
to trigger this behavior.
I agree, this should be disabled by default!
Yeah, I thought it was strange. I kinda feel exposed now, I accepted them by mistake. Disabling it.
Watchman requested access to my documents on startup. Is this also not expected?
where to run watchman watch-list and watchman watch-del /Users/$USER
I re-summarized the background and what you can do about it over in this SO answer:
https://stackoverflow.com/a/59367502/149111
@saashwath I just realized that you are probably the same person as that asking the question on SO! You would run those commands from your terminal application.
Same Problem With me in my mac!!
I had the same problem because I had a .watсhmanconfig
file in my Users/NAME
directory, so I just deleted it and it worked.
running jest causes this hmmm
just chiming in to say that I had the same issue on my Mac when I tried to run watchman-make on a particular directory: pop-ups with "watchman" wants to access your Photos/Contacts/etc. on my Mac, which I declined. Then when I tried to run watchman again the same particular directory, I got a message "WARNING: opendir(/Users/$myuser/Library/Application Support/CloudDocs/session/db) -> Operation not permitted. Marking this portion of the tree deleted"
when I ran "watchman watch-list", I got not only the directory that I had set the watch on, but also 'Users/$myuser', which I hadn't set any watch on. That home directory doesn't have any dot files either, so that's strange behaviour by watchman...
That looks like Cleanmymac in action