Chrome crashpad crashes on xattr

I have a macos High Sierra 10.13.3. When running Chrome in headless mode to execute automated tests, I get this error:

[0207/114344.742771:ERROR:xattr.cc(64)] setxattr org.chromium.crashpad.database.initialized on file /var/folders/8c/s_296_fd25sfywfxclkjcz_w0000gp/T/: Operation not permitted (1)
[karma2] [0207/114344.743721:INFO:crashpad_client_mac.cc(292)] restarting handler in 0.980s

I have tried to clear the extended attributes on that file with xattr -c /var/folders/8c/s_296_fd25sfywfxclkjcz_w0000gp/T/ but I'm also getting an Operation Not Permitted, even with sudo.

I can list the attributes:

$ xattr /var/folders/8c/s_296_fd25sfywfxclkjcz_w0000gp/T
com.apple.rootless

So how can I fix the permissions on this file? It use to work until recently.


There is a simple workaround. Just provide a different directory for "crash dumps" when starting Chrome, like this:

path_to_chrome --headless --crash-dumps-dir=/tmp