Old project stopped working after re-deploying

I had a running project that go destroyed to to resource outage! so i just brought the hobby plan! and redeployed the project! But now it is failing ! the error i am getting errors maybe because of env variables not being recognized properly!
requests.js:17
GET http://localhost:5000/v1/launches net::ERR_BLOCKED_BY_CLIENT
requests.js:10
GET http://localhost:5000/v1/planets net::ERR_BLOCKED_BY_CLIENT
requests.js:17
GET http://localhost:5000/v1/launches net::ERR_BLOCKED_BY_CLIENT
requests.js:10
GET http://localhost:5000/v1/planets net::ERR_BLOCKED_BY_CLIENT
my request .js part which deciding the url:
const API_URL =
process.env.REACT_APP_ENV === "prod"
? "https://the-nasa-project-production.up.railway.app/v1"
: `http://localhost:${process.env.REACT_APP_SERVER_PORT}/v1`;
const API_URL =
process.env.REACT_APP_ENV === "prod"
? "https://the-nasa-project-production.up.railway.app/v1"
: `http://localhost:${process.env.REACT_APP_SERVER_PORT}/v1`;
so in prod is should get the url https://the-nasa-project-production.up.railway.app/v1 not the
localhost
localhost
url that it is trying to sent the request to ! But looks like inspite of my env the project is not working : But the app is working:
NASA Mission Control
NASA Mission Control Dashboard
No description
No description
57 Replies
Percy
Percy5mo ago
Project ID: bc1834fc-5106-4839-bf78-b34a80a5af88
Rahat Bin Taleb
Rahat Bin Taleb5mo ago
bc1834fc-5106-4839-bf78-b34a80a5af88
Brody
Brody5mo ago
How old are we talking?
Rahat Bin Taleb
Rahat Bin Taleb5mo ago
well according to deployment logs it is 6 months but i didn't needed that so i ran out of free resources and railway blocked it but i need that projeect to up! so i just brought the plan and click the redeployed button! no changes was made! but looks like it's having issue in recognizing env! by no change i meant no change was made to the lastly deployed codebase
Brody
Brody5mo ago
do you build it with nixpacks or a dockerfile?
Rahat Bin Taleb
Rahat Bin Taleb5mo ago
its showing nixpacks! actually when i built this project node was in v14 ! so yeah pretty old project! so i am even scared to touch it because renwing it up will take me a lot effort in terms of depedncy resolving and version patchings and lot of things even could break! and it doesnt even looks like it a problem to my code base! just the problem here is maybe the app is not recgnizing env! so i can introduce a log just to prove you that! but i don't think i need it
Adam
Adam5mo ago
What part of your code checks the env variable? Nothing on Railway’s side has changed how env variables work. Add print statements to your code to debug if it’s retrieving the env variable correctly and we’ll go from there
Brody
Brody5mo ago
does it need node 14? because nixpacks will not build with node 14 (unless you pin to an old version of nixpacks)
Rahat Bin Taleb
Rahat Bin Taleb5mo ago
so may be thats a node platform issue that deploying the code wth a non node version? guys it suddenlt started working now ! XD
Brody
Brody5mo ago
can you console.log an environment variable just for sure like Adam asked, and in the mean also send your latest build logs - https://bookmarklets.up.railway.app/log-downloader/
Rahat Bin Taleb
Rahat Bin Taleb5mo ago
that means maybe it was some platform issues
Brody
Brody5mo ago
nothing is reported, so please let's not jump to such conclusions
Rahat Bin Taleb
Rahat Bin Taleb5mo ago
No description
Rahat Bin Taleb
Rahat Bin Taleb5mo ago
earlier this was showing empty
Brody
Brody5mo ago
I'd still be very interested in seeing your build logs, would you mind sending them anyway?
Want results from more Discord servers?
Add your server