#Redis not working

171 messages · Page 1 of 1 (latest)

shy agate
#

Need help with redis

lyric ledgeBOT
#

Project ID: N/A

shy agate
#

N/A

reef skiff
#

You'll need to provide a lot more information than that

shy agate
#

This is the error I am getting on the back

#

This is my backend code

#

Nevermind I found the issue

#

I have an issue where the front end is trying to connect to this backend endpoint, but is throwing a weird error

reef skiff
#

As it says, youre missing an Access-Control-Allow-Origin header to allow requests between the two

plush onyx
#

Hi, Im the developer working for FlippingPal (hes out for now, he went to sleep) but I will ask some stuff about this error we were having

#

So these CORS errors happened to me the other day too, I realised it was some other error that I ended up fixing and that got fixed automatically. So the CORS error seems to be misleading sometimes or at least gets caused right in coincidence with other unrelated error.

#

So we are allowing cors from everywhere in the code as well

#

What seems strange is that I already had this deployed on my server before help him getting setup the backend on his own railway, and code is same but in mine is working, its quite strange

#

I guess we will double check env variables when hes around again but until then I wonder what else could it be, no idea tbh

jagged gulch
#

open the backend url directly in your web browser

plush onyx
#

which one, my own backend server or the one from FlippingPal (my customer) ?

jagged gulch
#

the one you are having issues with

plush onyx
#

it says it cannot get /, which seems normal because I dont have any route in my code pointing to the base url

#

although the console gives me that error and probably thats not so normal anymore, right?

jagged gulch
#

check your http logs on the deployment

plush onyx
#

oh, yeah, i guess i will have to wait until hes back for that, dont have his railway access

jagged gulch
#

going forward you should probably both be on the same railway team

plush onyx
#

yeah I saw that and told him I didnt know how to use that yet but we will probably use it

#

is it hard to setup? I have never ever used that

#

can he just add my railway user to it or something like that?

jagged gulch
#

you already have a team on Railway, just add them to it

plush onyx
#

hes the one who will pay the bill tho

#

so i assume he should be the owner of the team

jagged gulch
#

whatever works best for you

plush onyx
#

yeah we will do like that, when hes back we get to talk about this

#

#

i just checked, error cannot be that because it also appears in my working backend:

#

so its gotta me something else

#

I guess I will just add some console.logs and be pushing so I can see whats going on, thats also a way

jagged gulch
#

check the http logs first when he is back

plush onyx
#

ah right, so you recommend me to wait for him before trying stuff, right?

#

otherwise the http logs gonna scroll up and disappear eventually i think

#

idk

jagged gulch
#

my gut feeling is that your backend is crashing

plush onyx
#

yeah, whats crazy is that we managed to register a user and still throws us an error but database working fine

#

i know theres a payment processor thingy we dont have setup correctly yet but it should not crash the entire thing

#

but yeah i will just check when hes back, we see the logs on his railway then

plush onyx
#

Btw out of curiosity for future projects, does Railway support a backend running on Rust?

plush onyx
#

@shy agate So we are having issues with the login-with-token endpoint now for some reason, it throws a CORS error. But the normal register and login seem to work fine

shy agate
plush onyx
#

thats the error we are getting

shy agate
#

@plush onyx is helping me with the project

plush onyx
#

yes

#

so we added some console.logs to that endpoint to see if theres like any errors and it wont even show the 1st console.log which is right at the start of the endpoint

#

its basically as if it was not receiving the request even

#

we really need help here I got no idea how to debug it

vagrant ruin
plush onyx
plush onyx
# vagrant ruin any error on the backend side?

theres no logs on the backend when I hit the endpoint although I did place few console.logs, none of that appears as if basically the endpoint is just not getting hit, which seems extremely strange to me and basically impossible to debug

vagrant ruin
plush onyx
#

And btw some of the endpoint in the same router going through the same cors() middleware are not throwing that cors error, so I dont believe its actually anything CORS related but rather cors error being a side effect of some other error

vagrant ruin
plush onyx
#

maybe some settings on the railway service, idk, something like that, no idea tbh

vagrant ruin
#

sounds weired tbh, i have never seen the same

#

is the webserver actually reachable?

plush onyx
#

me neither and i have been programming for few years already, no idea

#

lets do some test with my postman

#

with correct token as well, but like, it just doesnt reach anything

vagrant ruin
plush onyx
#

oh sorry i made accidentally post request with postman, its a get

#

let me try again

plush onyx
#

seems like the token is different because is customer database, its whatever, but i get a proper error so the endpoint in theory its working

#

when hes back i will check his backend service logs after doing a get request with my postman hopefully through the console.logs maybe something appears, idk

#

wait wtf

#

mine isnt working either now

#

and this one was working 2 days ago last time i deployed, i havent changed anything

#

somethings weird here, any support available?

#

oh I found an issue, about external APIs im using, could be that

jagged gulch
#

just to clear any possible confusion, this is not an issue with the platform.

plush onyx
#

okey so now the external APIs are working

#

and i get it working on my own backend deployment

#

but not on the customers deployment

jagged gulch
#

check the http logs for it

plush onyx
#

@jagged gulch Hold on we got to fix small step due to env variable

#

so thats 1 thing

#

now we need to delete redis storage so that our backend re-fetches data again, how can we do a flush all of the redis service?

jagged gulch
#

connect to it and delete the keys

plush onyx
#

yeah we did, im just so surprised that some data fetchs that are not even using env variables are literally coming undefined while in my backend deployment with the same exact thing it wont, it makes 0 sense to me, makes me think maybe numeric domains are blocked automatically due to security or something like that

#

which is the main difference i see here, code is same. env variables are same. (except for reference ones like backend/frontend where we checked like 5 times they are the correct ones for each)

#

have you ever heard of anything like this, Brody? maybe some people are blocking domains with numbers on it due to usually coming from non-trusted places?

jagged gulch
#

have you checked the http logs yet?

plush onyx
#

yes

#

sorry i was talking with customer

jagged gulch
plush onyx
#

we checked like 50 times

#

http logs, deploy logs, we getstrange errors

jagged gulch
#

please send a link to the service in question

plush onyx
#

yeah the customer service or my working service?

jagged gulch
#

the service with the domain from the cors errors

plush onyx
#

yeah the customer service... he just went to sleep :S

#

thats why im writing here now we were trying to debug looking at the logs and my console.logs

jagged gulch
#

thats a different url than whats in the screenshot?

plush onyx
#

oh sorry

#

i manually changed it because i hsd copied the front thing

#

yeah numbers are different

#

i will copy correct one

#

got it on postman i think 1 sec

#

ye

#

can you find the project somehow with the url?

jagged gulch
#

yes

plush onyx
#

🙂

#

so basically, on the logs im logging some length of some stuff im fetching, some cases it shows undefined but i double check the urls they give me undefined (its just a json file) and i can see it right away on the browser, like, the endpoint is not failing, and my code on my project is exactly the same and it will work but how the same code on his domain wont work then? this seems like black magic to me

jagged gulch
plush onyx
jagged gulch
#

backend

plush onyx
#

i havent seen those, you see anything strange there?

#

dont know where they are

#

i double check now

#

on my backend tho dont have his now he was screensharing with me but went to sleep

#

cause we different timezones

#

i see mines

#

im blind i never see that

#

so do you see anything to strange in those?

#

304 is fine i dont have stripe setup thats normal

jagged gulch
#

i see /market/ah-data-new/us giving a 502

plush onyx
#

i saw that as well just from the frontend network and console errors when he was screensharing, but code is identical and env variables as well, which makes me completely lost

jagged gulch
#

that would be an issue with your backend code

plush onyx
#

but in my railway it works and its same code, so how can him fail then

#

😢

#

i guess next day we will just redo the entire backend setup, its only thing I can even think of, something cursed there i cant figure out so just re-launch the entire thing on different service

jagged gulch
#

you need better logging, your app is failing to respond to a request

plush onyx
#

im not using asia region, why is that there? im using us region

#

where it says edgeRegion

#

whats that

#

none of us are from asia neither our railway server

jagged gulch
#

thats the region the request was made from

plush onyx
#

none of us are from asia we dont using VPNs or proxies, wtfunk?

jagged gulch
#

i dont make the rules haha

plush onyx
#

ah

#

Im thinking one thing, domain has numbers, I believe only china domains usually have numbers

#

therefore railway is thinking its coming from China

jagged gulch
#

no, again, this is not a platform issue

plush onyx
#

then i got some chinese hacker or something lol

#

nothing to hack there tho idk what he looking for 😄

jagged gulch
#

it doesnt mean its someone from china

#

thats just the closest region we own for that ip

plush onyx
#

ah right, i can imagine then

jagged gulch
#

geoip on that ip places it in Australia

plush onyx
#

that makes sense

#

hes from there

#

and im from europe

#

right, yeah

#

please remove his ip from the image or delete the image, he takes security very seriously. but thanks for the help attempt i will just look further with him and try to figure out a way to debug this

jagged gulch
#

ip addresses are not sensitive info fwiw

plush onyx
jagged gulch
#

either way, theres not much more we can help with as these issues you are facing are not platform issues, but issues with your own code

plush onyx
#

yeah i will try to fight that on my own i guess see what i can do

jagged gulch
#

i wish you the best of luck

plush onyx
#

thank

#

❤️

#

one platform question this time tho

#

can he just make a team and i fight the project on my own without him having to be on call, do i get like full access to the services?