Skip to content
CLI deployment fails with “Failed to create code snapshot” before build starts
maxpaleo
OP

a month ago

Hi Railway team,

I’m trying to deploy a Next.js website from a local monorepo using railway up --path-as-root.

The upload fails before a build starts, with this error:

Failed to create code snapshot. Please review your last commit, or try again. If this error persists, please reach out to the Railway team.

The CLI also reports error sending request for the deployment upload endpoint.

Some details:

  • Railway CLI version: 5.45.10, running on macOS.
  • The compressed upload is approximately 207 MB.
  • It includes a 177 MB signed macOS update archive that the website needs to serve.
  • Three attempts failed with the same error.
  • The failed deployments have no associated build logs.
  • The existing deployment continues to work.
  • I haven’t received an explicit HTTP 413 or upload-size error.

One failed deployment ID is cf5efff9-8597-49a0-9a34-9cd0b4d0d47e.

Could you help identify why snapshot creation fails? Is there an upload-size limit or a known CLI issue that could explain this? If bundling an update archive in the deployment isn’t recommended, what would be the best way to serve it through the website’s update URL?

Thanks!

Screenshot 2026-10-08 at 10.07.28 PM.png

Solved

1 Reply

Status changed to Awaiting Railway Response Railway • about 1 month ago


chandrika
EMPLOYEE

a month ago

The failed deployment stopped at the code snapshot step about 90 seconds into processing the upload, before any build began, which is why there are no build logs. The CLI only reports an explicit file-too-large error when the upload is rejected with a 413, and you didn't get one, so this isn't a confirmed size rejection.

A 177 MB binary is the obvious difference from your working deploys, so the quickest way to isolate it is to add the archive to a .railwayignore file (the CLI respects it, along with .gitignore) and run railway up --path-as-root again. If that upload goes through, the archive is what breaks snapshot creation, and it's better kept out of the deployment upload and served from storage your update URL can point to or redirect to, rather than shipped with every deploy.


Status changed to Awaiting User Response Railway • about 1 month ago


Railway
BOT

a month ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • 27 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...