#Strapi won't load on Railway App

67 messages · Page 1 of 1 (latest)

worthy seal
#

I keep getting a message saying WARNING: An error occurred while requesting the API

This is a fresh install and not sure what I'm missing. It's working on localhost but not on Railway.

solid sableBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

slate flameBOT
#

Project ID: d6360c76-95aa-49e2-90db-62587e583b43

worthy seal
#

d6360c76-95aa-49e2-90db-62587e583b43

azure ember
#

can you show me a screenshot of your service variables please

worthy seal
azure ember
worthy seal
#

Yes, I have done that. Not sure what else to do. I'm matching up with the other Strapi on Railway and everything aligned the same

azure ember
#

please show me the screenshot again?

worthy seal
#
2023-07-12 19:07:08.019 UTC [1] LOG:  starting PostgreSQL 13.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, 64-bit
2023-07-12 19:07:08.019 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2023-07-12 19:07:08.019 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2023-07-12 19:07:08.023 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-07-12 19:07:08.029 UTC [62] LOG:  database system was shut down at 2023-07-12 19:07:07 UTC
2023-07-12 19:07:08.034 UTC [1] LOG:  database system is ready to accept connections
2023-07-12 19:07:08.036 UTC [68] LOG:  TimescaleDB background worker launcher connected to shared catalogs
2023-07-12 19:07:08.454 UTC [72] LOG:  the "timescaledb" extension is not up-to-date
2023-07-12 19:07:08.454 UTC [72] HINT:  The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 19:10:09.872 UTC [99] LOG:  could not accept SSL connection: No error information
2023-07-12 20:07:07.994 UTC [468] LOG:  the "timescaledb" extension is not up-to-date
2023-07-12 20:07:07.994 UTC [468] HINT:  The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 20:07:08.386 UTC [469] LOG:  the "timescaledb" extension is not up-to-date
2023-07-12 20:07:08.386 UTC [469] HINT:  The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 21:07:07.634 UTC [836] LOG:  the "timescaledb" extension is not up-to-date
2023-07-12 21:07:07.634 UTC [836] HINT:  The most up-to-date version is 2.11.1, the installed version is 2.1.1.
2023-07-12 21:07:08.377 UTC [837] LOG:  the "timescaledb" extension is not up-to-date
2023-07-12 21:07:08.377 UTC [837] HINT:  The most up-to-date version is 2.11.1, the installed version is 2.1.1.
azure ember
#

why are they all shared variables??

#

i never mentioned anything about shared variables, please undo all of that

worthy seal
#

Done

azure ember
#

another screenshot please

worthy seal
azure ember
worthy seal
#

[2023-07-12 21:28:58.340] debug: ⛔️ Server wasn't able to start properly.
[2023-07-12 21:28:58.342] error: database "containers-us-west-203.railway.app" does not exist

#
PGDATABASE=${{DATABASE_NAME}}
PGHOST=${{DATABASE_HOST}}
PGPASSWORD=${{DATABASE_PASSWORD}}
PGPORT=${{DATABASE_PORT}}
PGUSER=${{DATABASE_USERNAME}}```
azure ember
#

another screenshot please

worthy seal
azure ember
#

without cropping please

worthy seal
azure ember
worthy seal
#

What am I missing?

azure ember
#

your database variables are not variable references

worthy seal
#

so I need to delete all the DATABASE_?

azure ember
#

sure, whatever is easiest for you

worthy seal
azure ember
#

it is highly advisable to use the standardized names

worthy seal
#

Okay, so I'll have to change it on Strapi's end?

azure ember
#

one thing at a time

#

please use the standardized variable names for your reference variables

worthy seal
#

show me an example

azure ember
#

the drop-down uses these variable names by default, you would have had to change them manually, don't do that please

worthy seal
#

It still doesn't work. I found my solution

azure ember
#

a lot of bad practices in that guide

#

all you needed to do was setup your variables correctly in railway and then we would have moved on to utilizing the variables correctly in strapi

worthy seal
#

The way you're explaining it, I'm not understanding

#

I'm sorry if I sound difficult

azure ember
#

it just seems like you weren't trying

worthy seal
#

believe me, I am. I'm changing things and reading this over and over

azure ember
#

well you said it works now?

worthy seal
#

No

azure ember
#

so may we continue?

worthy seal
#

yes, please

azure ember
#

your railway variables now look good

#

please send your database.js file

worthy seal
azure ember
#

lots of stuff going on there that you don't need, just simply use this instead

worthy seal
#

done

#

waiting for build

worthy seal
#

Okay, the problem was never the variables. The problem was this

#

I don't know where that came from but that was the problem.

azure ember
#

correction, the variables where a problem, but not the only problem

worthy seal
#

This is strapi@latest and that was new to me. All the other strapi doesn't have it. It was weird that I was able to connect on localhost but then not on serverside.

#

well, yes the variables was a problem too because I kept changing them LOL

#

azure ember
#

well finally solved 🥳

worthy seal
#

Sorry for the headache