Watchman: `"watchman" would like to access your contacts` when watching home dir on macOS

Created on 4 Nov 2018  路  12Comments  路  Source: facebook/watchman

Most helpful comment

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.

All 12 comments

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.
screenshot 2018-12-06 at 08 26 37

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ideahitme picture ideahitme  路  5Comments

cpojer picture cpojer  路  7Comments

export-mike picture export-mike  路  4Comments

habeebrahmanpt picture habeebrahmanpt  路  5Comments

ACoolmanBigHealth picture ACoolmanBigHealth  路  4Comments