#BUG

57 messages · Page 1 of 1 (latest)

spare barn
#

my railway project keeps crashing

woeful pineBOT
#

Project ID: N/A

#

It is most likely an issue on Railway's end, since they had an incident posted in #🚨|incidents reguarding build errors. Try building your application again, since the issues with Railway should be resolved. If your build still fails, try building it locally.

spare barn
#

i just deployed my first node js project with it but after some few mintues it keepss crashing. NB: this works well locally

hallow wagon
#

Please provide any relevent logs and a project id

spare barn
#

@hallow wagon

#

when i click on check logs it shows me the current buld

#

could the error be coming from my node.js

hallow wagon
#

you need to tell your app to listen on the value provided in the eviroment variable PORT

spare barn
#

how do i do that please

hallow wagon
#

google. how to read environment variables < insert your language here >

spare barn
#

didn't find anything useful but when i restart the bot it's works well

spare barn
#

@hallow wagon i really don't understand why my app keeps crashing and the logs don't help much

#

please help me out

hallow wagon
#

Beacuse its not listening on the port provided by the environment variable PORT

#

Without the relevant code snippets I can't tell really

spare barn
#

where is the code that runs on rail way server please help me out

hallow wagon
#

const port = process.env.PORT || 9000; looks alright. Does it even start?

spare barn
#

Locally yes

hallow wagon
#

Yes but on railway what are the logs?

spare barn
#

nothing in partcular

#

i don't see anything

hallow wagon
#

Can you share the logs please

#

Like the top 5 mins or so

spare barn
#

i also have this slight issue not serious but worth nothing, railway logs me out occasionally

#

i'm logged out now i can't log in

hallow wagon
#

The logs are found when you click the service

#

And it seems to be running

hallow wagon
spare barn
spare barn
hallow wagon
#

I seem to be able to login

hallow wagon
spare barn
spare barn
hallow wagon
#

Will need the logs

#

If it crashes after a while that will be a code issue

#

Unfortunately we can't really help with that

#

Look for the appropriate stack traces to find your issue

hallow wagon
spare barn
hallow wagon
#

Right. So you just need to fix the crash ig

spare barn
#

cause i'm new to this

hallow wagon
#

Unfortunately I don't have the bandwidth to look at everyone's project in depth. It sounds like an uncaught exception is being throw causing the app to crash ?

#

Then railway restarts your project. Right?

#

Also I've just realised you have committed your node modules. You should remove them idealy

#

Your also commiting your API key which you should now rotate as everyone can see it

spare barn
hallow wagon
#

On the canvas click the web service in the center of your screen

spare barn