A specific environment variable never reaches the running container, despite being correctly configured
halitelustun
FREEOP

a month ago

Hi, I've been debugging an issue on my service footballagent-production for several hours and have isolated it as follows:

I added a variable (tried both GOOGLE_CLIENT_ID and later renamed to GAUTH_CLIENT) via the Variables tab, confirmed via Raw Editor (both ENV and JSON views) that the name and value are correct, with no trailing whitespace and no duplicate entries.

Every deployment since adding it shows "Deployment successful."

I opened the Console (SSH) for the running deployment and ran cat src/config.js — confirms the correct, currently-deployed code is reading process.env.GAUTH_CLIENT.

In that same Console session, printenv | grep -i gauth returns no matching variable — only an incidental substring match inside RAILWAY_GIT_COMMIT_MESSAGE.

Meanwhile, other variables added the exact same way on the exact same service (AUTH_SIGNING_KEY, DATABASE_URL, APIFOOTBALL_KEY) ARE correctly present in process.env and work fine.

I also hit an unrelated issue earlier where a variable named JWT_SECRET caused the build to fail with failed to solve: secret JWT_SECRET not found — renaming it to AUTH_SIGNING_KEY fixed that. This new issue looks different (build succeeds, just silently missing at runtime) but is the second time a single specific variable behaves incorrectly while others don't.

Could you check why this one variable isn't being injected into the running container, while others on the same service are? Happy to share screenshots/deployment IDs if useful.

Solved

1 Replies

Railway
BOT

a month ago

The GAUTH_CLIENT variable is currently staged but has not been deployed yet, so it exists in the Variables tab but is not part of any running container's environment. You'll see a pending-changes indicator (a "Deploy" bar or an "N changes" badge) at the top of the environment view. Click it to apply the staged variable, and the next deployment will include GAUTH_CLIENT alongside your other five variables.


Status changed to Awaiting User Response Railway • 29 days ago


Railway
BOT

22 days 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 • 22 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...