Staging deployments fail at “Snapshot code” before build
j-chamberlain
HOBBYOP

19 days ago

Hi Railway team — this staging service deployed successfully on Hobby until September 9. On September 26, four normal deployments began failing about three seconds into Initialization → Snapshot code with:

“Failed to snapshot repository. Please try again in a few minutes.”

No build or deployment logs are created.

I reproduced the same failure using a clean 318 KB / 231-file source upload. The project builds and runs successfully in Docker locally, the existing staging deployment remains healthy, and I found no relevant service-configuration change.

This appears to be failing in Railway’s source snapshot/intake step rather than in the application build. Could you trace the snapshot failure and help restore the normal Hobby deployment path?

Project: continuity-coach-staging

Service: continuity-coach-api

Failed deployments: a43eac15, 83e150a1, 60406f54, bb93ac30

Last successful deployment: 3dbc428f

Solved

5 Replies

Status changed to Awaiting Railway Response Railway • 19 days ago


echohack
EMPLOYEE

19 days ago

Hey Josiah,

Looks like you deleted the service in your staging project, so I don't have anything to debug. Could you try again?


Status changed to Awaiting User Response Railway • 19 days ago


j-chamberlain
HOBBYOP

19 days ago

Thanks — the service is still present in the staging environment of continuity-coach-staging. The project’s production environment is empty, which may explain the confusion. Both the API and Postgres remain online, and failed deployment bb93ac30 is still accessible. Please check this direct staging deployment link: https://railway.com/project/0a557e8e-d7d6-4c3c-b2f5-e4e992a9e3c6/service/51b38511-6c99-4bf9-9717-6d7caf15a10c?environmentId=8c3fda99-5669-493d-b29c-4a929f016f30&id=bb93ac30-145e-4422-8f43-e77110c3c9ce


Status changed to Awaiting Railway Response Railway • 19 days ago


echohack
EMPLOYEE

19 days ago

Hey Josiah,

Sorry about my last reply. You're right, the service is there.

I traced all four failed deployments and each one hit the same error underneath: service config at '/apps/ai-coach/railway.json' not found.

The service has Root Directory set to /apps/ai-coach and its config file at /apps/ai-coach/railway.json, so it expects an upload of the whole repo. These four uploads were only the 231 files inside apps/ai-coach, with railway.json at the top level. By default railway up uploads the directory the project is linked in. So either the link lives in apps/ai-coach, or the deploy command used --path-as-root.

Your deploy history shows the same pattern going back to August. Folder-only uploads failed with this error, and the next full-repo upload succeeded.

To fix it, run railway up from the repo root without --path-as-root. If you'd rather keep uploading only that folder, clear Root Directory in the service settings and set the config file path to /railway.json.

The "Failed to snapshot repository" message is on us. It should have shown you the real error, and that's a bug on our side.


Status changed to Awaiting User Response Railway • 19 days ago


echohack
EMPLOYEE

19 days ago

Hey Josiah,

The build is failing with: service config at '/apps/ai-coach/railway.json' not found.

The service has Root Directory set to /apps/ai-coach and its config file at /apps/ai-coach/railway.json, so it expects an upload of the whole repo. These four uploads were only the 231 files inside apps/ai-coach, with railway.json at the top level. By default railway up uploads the directory the project is linked in. So either the link lives in apps/ai-coach, or the deploy command used --path-as-root.

Your deploy history shows the same pattern going back to August. Folder-only uploads failed with this error, and the next full-repo upload succeeded.

To fix it, run railway up from the repo root without --path-as-root. If you'd rather keep uploading only that folder, clear Root Directory in the service settings and set the config file path to /railway.json.


j-chamberlain
HOBBYOP

18 days ago

Thanks — confirmed resolved. We reran railway up from the repository root without --path-as-root, which preserved apps/ai-coach/railway.json, and the staging deployment completed successfully.

We’ll keep the current Root Directory/config-path settings and use the repo-root deployment method going forward.

The generic “Failed to snapshot repository” message was what made this difficult to diagnose, so I appreciate you tracing the underlying path error.

Thanks again for the help.


Status changed to Awaiting Railway Response Railway • 18 days ago


Status changed to Solved Railway • 18 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...