2 months ago
Hi,
My existing deployment is running normally, but new deployments have started failing during the build using Railpack v0.36.4.
The build fails with:
failed to solve: secret [REDACTED] not found
The environment variable is already configured under the service's Railway Variables, and the currently running deployment can access it successfully.
In the application code, the variable is only accessed normally through process.env. I searched the repository and found no railpack.json, railpack-plan.json, Dockerfile, or explicit build-secret configuration referencing this variable.
The relevant build sequence is:
using build driver railpack-v0.36.4
prepare railpack-v0.36.4
load build definition from ./railpack-plan.json
install mise packages: node
install apt packages: libatomic1
Then:
Build Failed: build daemon returned an error < failed to solve: secret [REDACTED] not found >
Redeploying without any code changes produces the same error.
Is there a reason Railpack would treat a normal runtime environment variable as a required build secret? Could this be related to the generated railpack-plan.json or a Railpack build issue?
Thanks!
4 Replies
2 months ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 2 months ago
2 months ago
Just to clarify, is the [REDACTED] part an actual variable used in your code?
0x5b62656e5d
Just to clarify, is the `[REDACTED]` part an actual variable used in your code?
2 months ago
No, [REDACTED] is not the actual variable name. I only redacted the name because this is a public thread.
The actual variable name is TG_RELAY_SECRET.
The build error is:
failed to solve: secret TG_RELAY_SECRET not found
TG_RELAY_SECRET is configured in the Railway service Variables, and in my application it is accessed through process.env.TG_RELAY_SECRET.
Of course, I have not shared the actual value of the secret publicly.
0x5b62656e5d
Try setting `NO_CACHE=1` in your service and redeploy.
2 months ago
I added NO_CACHE=1 and redeployed. The build confirms that caching is disabled, but it still fails with the same error:
failed to solve: secret TG_RELAY_SECRET not found
Relevant log:
Caching Disabled - build performance will be impacted
then:
Build Failed: build daemon returned an error < failed to solve: secret TG_RELAY_SECRET not found >
So the issue persists even with a clean/no-cache build.
Status changed to Solved alikneio • about 2 months ago