I'm getting this error when trying to set up a pan...
# development
b
I'm getting this error when trying to set up a pants development environment and running a single python test file:
Copy code
native_engine.IntrinsicError: materialize_directory() request to sandboxer process failed: transport error
Claude unhelpful in diagnosing (suggested killing pants daemon and re-running). I'm on the stable release tag
release_2.32.0
release_2.31.0
. Cleared out dev deps cache. Not sure what else to do at this point… (logs in thread)
Untitled
w
That release doesn't exist - feels like problem #1
b
Sorry, typing from memory — it's
release_2.31.0
commit id
29576ba14d
w
Are you running using the scie-pants runner? What os?
b
macOS and I'm not sure what
scie-pants
is. I've cloned the project and attempting to follow this guide: https://www.pantsbuild.org/stable/docs/contributions/development/setting-up-pants#configure-your-ide-optional
w
Are you trying to use pants? Or to modify pants?
b
I'm trying to fix a bug in the prettier backend
w
👍 Okay, so the command you used to run was "./pants test ...prettier" ?
b
https://pantsbuild.slack.com/archives/C0D7TNJHL/p1775690377591379 Ideally I'd be able to run the tests locally, but so far I haven't been able to get them to run. I'm running:
Copy code
./pants -ldebug test src/python/pants/backend/javascript/lint/prettier/rules_integration_test.py
w
Alright, let me test that out
Alright, so, seems to work for me - I have an idea to test. One note: I think you're using pyenv - I can't see how it's related to your error, but I will note anecdotally that a lot of problems seem to arise using pyenv and pants. For whatever reason, those two don't like each other.
b
What's the preferred way of managing python versions in the development environment?
w
I don't think there is one yet. I'd like to setup a python-build-standalone, or even more preferably, just use the python downloaded by scie-pants runner already. But at the moment, it's just whatever is on the dev's machine Again, I don't know how it would be related - just something I've noticed in general
Trying to reproduce your error, I have a long-shot idea
b
If you can't reproduce it, are there any threads that I can pull with regards to what this error message might mean? I don't know enough about pants internals to know what's happening and the error message isn't clarifying enough to know where to look next
w
It's just looking for a service we have, and it can't connect to it for some reason. I've never that actually. Usually connects in about 100ms
@happy-kitchen-89482 Any ideas why this would happen?
Copy code
09:05:37.40 [DEBUG] Completed: acquire_command_runner_slot
09:05:37.40 [DEBUG] Running Find interpreter for constraints: CPython==3.11.* under semaphore with concurrency id: 1, and concurrency: 1
09:05:37.40 [DEBUG] Materializing via sandboxer to "/private/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/pants-sandbox-rP4WKf": DirectoryDigest {
    digest: Digest {
        hash: Fingerprint<5d50ded2b49d794982266f6fa2b0f1a8d13333c3c7d30d4a3b7355ae25e156a2>,
        size_bytes: 338,
    },
    tree: "Some(..)",
}
09:05:37.40 [DEBUG] Spawning sandboxer with cmd: /Users/jack.jennings/code/pantsbuild/pants/src/python/pants/bin/sandboxer --socket-path /var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock --local-store-path /Users/jack.jennings/.cache/pants/lmdb_store
09:05:37.42 [DEBUG] Spawned sandboxer process Some(70108)
09:05:37.42 [DEBUG] Completed: pants.backend.python.util_rules.python_sources.prepare_python_sources
09:05:37.47 [DEBUG] Waited 50ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:37.52 [DEBUG] Waited 100ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:37.57 [DEBUG] Waited 150ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:37.62 [DEBUG] Waited 200ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:37.68 [DEBUG] Waited 250ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:37.73 [DEBUG] Waited 300ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:37.78 [DEBUG] Waited 350ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:37.83 [DEBUG] Waited 400ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:37.89 [DEBUG] Waited 450ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:37.94 [DEBUG] Waited 500ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:37.99 [DEBUG] Waited 550ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:38.04 [DEBUG] Waited 600ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:38.10 [DEBUG] Waited 650ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:38.15 [DEBUG] Waited 700ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:38.20 [DEBUG] Waited 750ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:38.25 [DEBUG] Waited 800ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:38.31 [DEBUG] Waited 850ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:38.36 [DEBUG] Waited 900ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:38.41 [DEBUG] Waited 950ms to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:38.46 [DEBUG] Waited 1s to connect to sandboxer at "/var/folders/dh/m032fx9n7zd5xx7840xmzvt00000gp/T/run/pants/19ff3c3ca6043241/sandboxer.sock"
09:05:38.47 [DEBUG] Completed: setup_sandbox
09:05:38.47 [DEBUG] Completed: Find interpreter for constraints: CPython==3.11.*
Also, in the event we don't connect to the sandboxer, should that raise an error eagerly?
@big-ability-26837 Are your temp folder, pants folder, and cache all on the same drive?
b
Yes, they are
w
damn, that would have been an easy one
b
Is there any way that I can essentially start over? Is re-cloning the project enough or are there going to be other files / cache / venv artifacts that I need to clean up outside of the pants directory?
w
Wipe current dir re-clone Wipe ~/.cache/pants There may be stuff in ~/Library/Caches - but I think that would only be if you use scie-pants runner
b
Okay, let me try that
w
👍
b
Thanks for your help
w
Not really help until it works
b
Well, that worked for some reason.
I wish that I could report something more actionable …
it crowd turn on off
w
Yeah, that's basically it - I guess one thing I didn't think to ask was to check
ps
and see if there was a pantsd or sandboxer that somehow were still alive.
b
Going back to the other checked out repo, I do see this message at the top of the output that I don't see when it succeeds:
Copy code
Fingerprint mismatched: f347a9ab0c8d50a36376db30c3f0d7a0d2aa81c752f8129647a2a9fd49fe652a vs 547842e5ba85bceaa479a9e38964dd53a30627d149a59f2980cea20968b304eb.
Not sure what this means, but maybe it's instructive 🤷
w
Copy code
native_engine.IntrinsicError: materialize_directory() request to sandboxer process failed: transport error
Holy crap, i just ran into this randomly
Ran immediately after though
h
Yikes. I don't know what kind of corruption would cause this, if it happens again let us know because it would be instructive to see if nuking just the sandboxer unix-domain socket file helps
FWIW I use pyenv for my development pythons when hacking on Pants and it's fine
w
Yeah, I can’t speak to pyenv as I never use it. I have enough abstractions in my life. I just see people’s issues in the chat and pyenv not playing well with Pants (or some sort of setup configuration) comes up a lot. I used to use homebrew, but now on linux and mac, I just download python-build-standalone and call it a day