my service keeps failing
dweber2026
PROOP

14 days ago

My service keeps failing with: fsutil.NewFS: lstat /var/lib/builder/.../snapshot-target-unpack/dweber2026/hermes-agent: no such file or directory. The root directory setting is blank but Railway keeps trying to unpack into dweber2026/hermes-agent. I need the cached snapshot sha256:ea81a5cb62599320b1409e7bc985904563f4e436c9a89fcf11015a6b8a7b30a6 cleared for my service.

Service name: Hermes Agent

Project: Hermes Agent (the independent one)

Snapshot hash: sha256:ea81a5cb62599320b1409e7bc985904563f4e436c9a89fcf11015a6b8a7b30a6

Error: fsutil.NewFS: lstat .../snapshot-target-unpack/dweber2026/hermes-agent: no such file or directory

Root cause: Old root directory setting dweber2026/hermes-agent got cached and won't clear

Solved

6 Replies

Status changed to Awaiting Railway Response Railway 14 days ago


sam-a
EMPLOYEE

14 days ago

Set the environment variable NO_CACHE=1 on your service, then trigger a redeploy. This forces a full rebuild without cached layers, bypassing the stale snapshot referencing the old root directory path. Once the build succeeds, you can remove NO_CACHE=1 to re-enable caching with the correct configuration going forward.


Status changed to Awaiting User Response Railway 14 days ago


Status changed to Solved sam-a 14 days ago


sam-a

Set the environment variable `NO_CACHE=1` on your service, then trigger a redeploy. This forces a full rebuild without cached layers, bypassing the stale snapshot referencing the old root directory path. Once the build succeeds, you can remove `NO_CACHE=1` to re-enable caching with the correct configuration going forward.

dweber2026
PROOP

14 days ago

The NO_CACHE=1 variable you suggested worked once but the build is still intermittently failing with the same snapshot error sha256:ea81a5cb62599320b1409e7bc985904563f4e436c9a89fcf11015a6b8a7b30a6. The snapshot keeps being reused. Please permanently delete/invalidate this specific snapshot from your build cache for my service. Project: Hermes Agent, Service ID visible at hermes-agent-production-cb05.up.railway.app.


Status changed to Awaiting Railway Response Railway 14 days ago


sam-a
EMPLOYEE

13 days ago

Looking at your service config right now, the Root Directory field is actually set to dweber2026/hermes-agent, not blank. That's the value causing the failure.

There's no cached snapshot to delete on our side. The "snapshot" in the build log is just your source code being unpacked for this build session, which is why the same hash keeps appearing (it's the same source content). The error happens immediately after unpack, when the builder tries to enter the configured Root Directory inside the unpacked source:

unpacking archive
Build Failed: lstat .../snapshot-target-unpack/dweber2026: no such file or directory

dweber2026/hermes-agent is your GitHub repo path (owner/name). The Root Directory setting expects a subdirectory inside the repo, like apps/web or services/api. Since there's no dweber2026/ folder inside the repo, the builder can't cd into it.

Fix:

  1. Open the service's Settings tab
  2. Under Source, clear the Root Directory field (leave it blank, or set it to /)
  3. Redeploy

You can also remove the NO_CACHE=1 variable once that's done. Apologies for the earlier suggestion, it wouldn't have fixed this since the failure is in the source unpack step before any build caching applies.


Status changed to Awaiting User Response Railway 13 days ago


sam-a

Looking at your service config right now, the Root Directory field is actually set to `dweber2026/hermes-agent`, not blank. That's the value causing the failure. There's no cached snapshot to delete on our side. The "snapshot" in the build log is just your source code being unpacked for this build session, which is why the same hash keeps appearing (it's the same source content). The error happens immediately after unpack, when the builder tries to enter the configured Root Directory inside the unpacked source: ``` unpacking archive Build Failed: lstat .../snapshot-target-unpack/dweber2026: no such file or directory ``` `dweber2026/hermes-agent` is your GitHub repo path (owner/name). The Root Directory setting expects a subdirectory *inside* the repo, like `apps/web` or `services/api`. Since there's no `dweber2026/` folder inside the repo, the builder can't `cd` into it. Fix: 1. Open the service's Settings tab 2. Under Source, clear the Root Directory field (leave it blank, or set it to `/`) 3. Redeploy You can also remove the `NO_CACHE=1` variable once that's done. Apologies for the earlier suggestion, it wouldn't have fixed this since the failure is in the source unpack step before any build caching applies.

dweber2026
PROOP

13 days ago

the root directory is blank. dweber2026/hermes-agent was in it previously, but i deleted it. must cached somewhere... see screenshot for reference

root directory.jpg

Attachments


Status changed to Awaiting Railway Response Railway 13 days ago


sam-a
EMPLOYEE

13 days ago

Thanks for the screenshot, that confirmed it. The issue is on our side, not something you can fix from the UI.

Your service had the root directory persisted in a legacy field that our newer UI doesn't read from, so the UI was showing it as cleared while the builder was still using the old dweber2026/hermes-agent value. There's no cache to invalidate either - the snapshot hash you keep seeing is just the hash of your source archive, which stays identical until your source changes.

I cleared the legacy value on our end. To pick up the fix, trigger a fresh deploy rather than clicking "Redeploy" on the failed one - push a commit to main, use the Deploy button on the Deployments tab, or run railway up from the CLI. Once that succeeds, you can also remove the NO_CACHE=1 variable. Apologies for the runaround.


Status changed to Awaiting User Response Railway 13 days ago


dweber2026
PROOP

13 days ago

That worked, thank you for the help! You can close this issue


Status changed to Awaiting Railway Response Railway 13 days ago


Status changed to Solved Railway 13 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...