19 days 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 foundinstall 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!
18 Replies
19 days 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 • 19 days ago
dharmateja
are you referencing these variables in your build step?
18 days 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.
18 days 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
18 days 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
18 days 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: node25msERROR: failed to build: failed to solve: secret SESSION_GRACE_EXIT_TIMEOUT_SECONDS: not found
18 days 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..
18 days ago
Yeah super strange. I wonder if something misconfigured when I cloned our staging environment when we launched? Kind of at a loss here
18 days 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
18 days 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
18 days 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?
18 days 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.
18 days ago
can you share build logs before error?
18 days 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 ..
18 days 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.
18 days 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?
18 days 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.
18 days ago
Ah nice, glad you found it...those leftover variables were tripping up the build!!!
