Railpack build fails at install mise packages: secret ID missing for empty environment variable
redesvanessa88
FREEOP

a month ago

Same symptom as the open thread "Railpack / Metal builder fails before application build - secret N not found" (station.railway.com/questions/railpack-metal-builder-fails-before-ap-1a946b05), but on a Java 21 + Maven service, EU West, and the missing secret name is an empty string instead of N.

Build log:

using build driver railpack-v0.38.0

load build definition from ./railpack-plan.json

install mise packages: java (136ms)

install mise packages: java, maven (115ms)

Build Failed: build daemon returned an error < failed to solve: secret ID missing for '' environment variable >

Fails before Maven even runs, same as the linked thread fails before dependency install.

What I ruled out:

  • No Dockerfile / railway.json / nixpacks.toml in the repo, Railpack default detection only.
    • Compared against the last successful deploy from 3 days ago: no build-related config changed since then, only app code and one new Maven dependency.
    • Checked all 6 custom Service Variables (CORS_ALLOWED_ORIGINS, DATABASE_URL, JWT_SECRET, SPRING_DATASOURCE_PASSWORD, SPRING_DATASOURCE_URL, SPRING_DATASOURCE_USERNAME) plus the 8 Railway-provided ones, none empty or malformed.
    • status.railway.com shows Fully Operational for EU West Builds/Deployments.
    • Retried 3 times including a fresh empty commit to force a new build, same failure every time within 12-14s on a Metal builder.

Project: content-healing / production / sportzlink-backend

Repo: redesvanessa88/sportzlink (private), root directory /backend

Region: EU West

Railpack: 0.38.0

Solved

1 Replies

Railway
BOT

a month ago

The variable CORS_ALLOWED_ORIGINS on this service has a leading space in its name (the name is stored as " CORS_ALLOWED_ORIGINS" rather than "CORS_ALLOWED_ORIGINS"), which produces an empty secret ID during the Railpack build and causes the failure you are seeing. Removing the leading space from the variable name in the service's Variables tab will clear this.


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


Status changed to Solved redesvanessa88 • about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...