R
Railway9mo ago
Corfitz

Referenced variables are empty

If I hardcode the url in env variables, the deployment is successful, however using a reference to a service variable, the application doesn't build as the environment variable is empty.
No description
No description
15 Replies
Percy
Percy9mo ago
Project ID: 497a7953-e85b-4044-b984-112dc9defad9
Corfitz
Corfitz9mo ago
497a7953-e85b-4044-b984-112dc9defad9
Brody
Brody9mo ago
you want to reference RAILWAY_PUBLIC_DOMAIN instead https://docs.railway.app/develop/variables#railway-provided-variables
Corfitz
Corfitz9mo ago
Yes - But it gave me the option to use a variable from a sibling service. I am trying to use the RAILWAY_PUBLIC_DOMAIN assigned to service A as a variable in service B
Brody
Brody9mo ago
i am unable to reproduce this, please check you have everything setup correctly
No description
No description
Corfitz
Corfitz9mo ago
Hmm.. you are right.. Seems to be working now... My bad.
Corfitz
Corfitz9mo ago
@Brody Nah sry man.. I really don't know what it is I am doing wrong. But it doesn't work again.
No description
No description
No description
Brody
Brody9mo ago
are you building payload with a dockerfile?
Corfitz
Corfitz9mo ago
no.. The only "difference" would be that it is deployed from a turbo repo What confuses me is that the KEY is being created - but the value is empty. If I Write an actual string in the env variable instead of the railway reference, the value appears.
Brody
Brody9mo ago
remove the period from the next.js service name
Corfitz
Corfitz9mo ago
Aye,... I'll try that.
Brody
Brody9mo ago
I've seen names with parentheses fail to render properly
Corfitz
Corfitz9mo ago
That would seem to be the culprit. Thank you.
Brody
Brody9mo ago
no problem, I'll whip up an example project for me to test names that won't pass through the variable rendering system and let railway know all i can come up with is service names with periods dont render, perhaps if the reference strings where split at the last period it would render properly? cc @jr
jr
jr9mo ago
I can take a look today. Perhaps the parser needs to be updated to handle it