Service Environment vairable sfailing to deploy
pebblespaces
PROOP

4 months ago

Hey folks,

Trying to deploy some environment variables to a couple of my services

@pebble/worker

@pebble/web

And I keep getting errors like this when I go to deploy the changes:


install apt packages: libatomic1

install mise packages: node

ERROR: failed to build: failed to solve: secret SESSION_GRACE_EXIT_TIMEOUT_SECONDS: not found
install apt packages: libatomic1
ERROR: failed to build: failed to solve: secret SESSION_PAUSE_TIMEOUT_SECONDS: not found

We have these variables defined, but they're not able to be shared with these services due to the errors above when I deploy.

Any help here would be super appreciated!

$10 Bounty

19 Replies

Railway
BOT

4 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open Railway 4 months ago


4 months ago

are you referencing these variables in your build step?


dharmateja

are you referencing these variables in your build step?

pebblespaces
PROOP

4 months ago

Not in the build step specifically, no. These variables are used in the applications hosted on the services themselves. I've even gone so far as to delete the environment variables entirely, and redeploy the services. The build logs are still showing the same errors, referencing env variables that no longer exist.


4 months ago

I think its build cache issue..Did you try to redeploy ? Try adding NO_CACHE=1 as a service variable and redeploy. That disables build layer caching.

https://docs.railway.com/builds/build-configuration#disable-build-layer-caching


pebblespaces
PROOP

4 months ago

Same deal on both services even with no cache

install mise packages: node

25ms

ERROR: failed to build: failed to solve: secret SESSION_GRACE_EXIT_TIMEOUT_SECONDS: not found


pebblespaces
PROOP

4 months ago

Removed the env variables from the codebase entirely too, still no dice


pebblespaces

Same deal on both services even with no cache install mise packages: node 25ms ERROR: failed to build: failed to solve: secret SESSION\_GRACE\_EXIT\_TIMEOUT\_SECONDS: not found

4 months ago

For some reason your build plan is trying to load those values as “build secrets”, but Railpack can’t find variables with those exact names available to that environment..


dharmateja

For some reason your build plan is trying to load those values as “build secrets”, but Railpack can’t find variables with those exact names available to that environment..

pebblespaces
PROOP

4 months ago

Yeah super strange. I wonder if something misconfigured when I cloned our staging environment when we launched? Kind of at a loss here


4 months ago

Can you also check your railpack.json for a "secrets" field? It should be empty or not present if you've removed everything. Also do a quick search across your repo


pebblespaces
PROOP

4 months ago

No secrets field in the railpack.json in any of my 3 services, no references across the entire codebase for those .env variables either


pebblespaces

No secrets field in the railpack.json in any of my 3 services, no references across the entire codebase for those .env variables either

4 months ago

can you also check in railpack-plan.json if it exists ? also you redeployed right?


dharmateja

can you also check in railpack-plan.json if it exists ? also you redeployed right?

pebblespaces
PROOP

4 months ago

No railpack-plan exists. And yep yep! Redeployed both services with the same result.


pebblespaces

No railpack-plan exists. And yep yep! Redeployed both services with the same result.

4 months ago

can you share build logs before error?


pebblespaces
PROOP

4 months ago

Absolutely, see attached!

Attachments


4 months ago

Did you seal any variables in staging before cloning to production? sealed variables don't copy over when duplicating environments ..


dharmateja

Did you seal any variables in staging before cloning to production? sealed variables don't copy over when duplicating environments ..

pebblespaces
PROOP

4 months ago

None at all - for what it's worth we have many other env variables, all behaving properly.

I Have not yet tried to share them with other services (they're all shared appropriately as it stands, and the app is working), but don't want to try in case it breaks as well.


pebblespaces

None at all - for what it's worth we have many other env variables, all behaving properly. I Have not yet tried to share them with other services (they're all shared appropriately as it stands, and the app is working), but don't want to try in case it breaks as well.

4 months ago

so other variables are working fine..how are those variables shared with the services ?. are you using reference variables like ${{shared.SESSION_GRACE_EXIT_TIMEOUT_SECONDS}} on each service?


dharmateja

so other variables are working fine..how are those variables shared with the services ?. are you using reference variables like ${{shared.SESSION\_GRACE\_EXIT\_TIMEOUT\_SECONDS}} on each service?

pebblespaces
PROOP

4 months ago

ohhh my goodness....they were somehow still stuck in the services themselves? Removed them manually from there as well and the deploy went through. Testing a couple more things but I think we're good here.


pebblespaces

ohhh my goodness....they were somehow still stuck in the services themselves? Removed them manually from there as well and the deploy went through. Testing a couple more things but I think we're good here.

4 months ago

Ah nice, glad you found it...those leftover variables were tripping up the build!!!


krisnaw
HOBBY

2 months ago

What the solution? I'm having similar issue, regenerating package-lock has no effect


Welcome!

Sign in to your Railway account to join the conversation.

Loading...