Redis not working
flippingpal
PROOP

a year ago

Need help with redis

164 Replies

flippingpal
PROOP

a year ago

N/A


a year ago

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


flippingpal
PROOP

a year ago

This is the error I am getting on the back

1306238024312426500


flippingpal
PROOP

a year ago

This is my backend code

1306238217850196000


flippingpal
PROOP

a year ago

Nevermind I found the issue


flippingpal
PROOP

a year ago

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

1306239781549768700


a year ago

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



magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

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.


magicmike123
HOBBY

a year ago

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

1306255267574317000


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

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


a year ago

open the backend url directly in your web browser


magicmike123
HOBBY

a year ago

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


a year ago

the one you are having issues with


magicmike123
HOBBY

a year ago


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

1306256310467035100


magicmike123
HOBBY

a year ago

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


a year ago

502 bad gateway


a year ago

check your http logs on the deployment


magicmike123
HOBBY

a year ago

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


a year ago

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


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

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


a year ago

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


magicmike123
HOBBY

a year ago

hes the one who will pay the bill tho


magicmike123
HOBBY

a year ago

so i assume he should be the owner of the team


a year ago

whatever works best for you


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago


magicmike123
HOBBY

a year ago

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

1306257293985321000


magicmike123
HOBBY

a year ago

so its gotta me something else


magicmike123
HOBBY

a year ago

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


a year ago

check the http logs first when he is back


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

idk


a year ago

my gut feeling is that your backend is crashing


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

@Flipping Pal 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


flippingpal
PROOP

a year ago

1306561495374631000


magicmike123
HOBBY

a year ago

thats the error we are getting


flippingpal
PROOP

a year ago

@PrivateScript is helping me with the project


magicmike123
HOBBY

a year ago

yes


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

its basically as if it was not receiving the request even


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

Thats nice!


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

i will take note and whenever my customer is available I will tell him to try this, but I will tell you one strange thing: I do have this same backend deployed on my own railway, and it works without any error. Makes me think theres an error somewhere thats not code related.


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

i wonder if its something server related, because as i said code is exactly same code in my own railway and it works perfect, if it was purely cors error why would the same code work on one place and not the other, right?


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

lets do some test with my postman


magicmike123
HOBBY

a year ago

1306616666817302500


magicmike123
HOBBY

a year ago

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

1306616787806322700


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

let me try again


magicmike123
HOBBY

a year ago

yeah something weird like that could be no idea


magicmike123
HOBBY

a year ago

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

1306617214304125000


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

wait wtf


magicmike123
HOBBY

a year ago

mine isnt working either now


magicmike123
HOBBY

a year ago

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

1306620445130231800


magicmike123
HOBBY

a year ago

somethings weird here, any support available?


magicmike123
HOBBY

a year ago

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


a year ago

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


magicmike123
HOBBY

a year ago

okey so now the external APIs are working


magicmike123
HOBBY

a year ago

and i get it working on my own backend deployment


magicmike123
HOBBY

a year ago

but not on the customers deployment


a year ago

check the http logs for it


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

so thats 1 thing


magicmike123
HOBBY

a year ago

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?


a year ago

connect to it and delete the keys


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago


magicmike123
HOBBY

a year ago


magicmike123
HOBBY

a year ago

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)


magicmike123
HOBBY

a year ago

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?


a year ago

have you checked the http logs yet?


magicmike123
HOBBY

a year ago

yes


magicmike123
HOBBY

a year ago

sorry i was talking with customer


a year ago

this is not a platform issue


magicmike123
HOBBY

a year ago

we checked like 50 times


magicmike123
HOBBY

a year ago

http logs, deploy logs, we getstrange errors


a year ago

please send a link to the service in question


magicmike123
HOBBY

a year ago

yeah the customer service or my working service?


a year ago

the service with the domain from the cors errors


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

this is the url thats only thing i got for now: https://back-production-43b4.up.railway.app/


a year ago

thats a different url than whats in the screenshot?


magicmike123
HOBBY

a year ago

oh sorry


magicmike123
HOBBY

a year ago

i manually changed it because i hsd copied the front thing


magicmike123
HOBBY

a year ago

yeah numbers are different


magicmike123
HOBBY

a year ago

i will copy correct one


magicmike123
HOBBY

a year ago

got it on postman i think 1 sec


magicmike123
HOBBY

a year ago

ye



magicmike123
HOBBY

a year ago

can you find the project somehow with the url?


a year ago

yes


magicmike123
HOBBY

a year ago

🙂


magicmike123
HOBBY

a year ago

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


a year ago

you havent checked the http logs


magicmike123
HOBBY

a year ago

wait http logs you mean the network logs in the frontend?


a year ago

backend


magicmike123
HOBBY

a year ago

i havent seen those, you see anything strange there?


magicmike123
HOBBY

a year ago

dont know where they are


magicmike123
HOBBY

a year ago

i double check now


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

cause we different timezones


magicmike123
HOBBY

a year ago

1306668898581745700


magicmike123
HOBBY

a year ago

i see mines


magicmike123
HOBBY

a year ago

im blind i never see that


magicmike123
HOBBY

a year ago

so do you see anything to strange in those?


magicmike123
HOBBY

a year ago

304 is fine i dont have stripe setup thats normal


a year ago

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


magicmike123
HOBBY

a year ago

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


a year ago

that would be an issue with your backend code


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

😢


magicmike123
HOBBY

a year ago

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


a year ago

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


a year ago

1306670223427899400


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

where it says edgeRegion


magicmike123
HOBBY

a year ago

whats that


magicmike123
HOBBY

a year ago

none of us are from asia neither our railway server


a year ago

thats the region the request was made from


magicmike123
HOBBY

a year ago

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


a year ago

i dont make the rules haha


magicmike123
HOBBY

a year ago

ah


magicmike123
HOBBY

a year ago

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


magicmike123
HOBBY

a year ago

therefore railway is thinking its coming from China


a year ago

no, again, this is not a platform issue


magicmike123
HOBBY

a year ago

then i got some chinese hacker or something lol


magicmike123
HOBBY

a year ago

nothing to hack there tho idk what he looking for 😄


a year ago

it doesnt mean its someone from china


a year ago

thats just the closest region we own for that ip


magicmike123
HOBBY

a year ago

ah right, i can imagine then


a year ago

geoip on that ip places it in Australia


magicmike123
HOBBY

a year ago

that makes sense


magicmike123
HOBBY

a year ago

hes from there


magicmike123
HOBBY

a year ago

and im from europe


magicmike123
HOBBY

a year ago

right, yeah


magicmike123
HOBBY

a year ago

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


a year ago

ip addresses are not sensitive info fwiw


magicmike123
HOBBY

a year ago

i told him this as well, will screenshot this for proof xd


a year ago

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


magicmike123
HOBBY

a year ago

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


a year ago

i wish you the best of luck


magicmike123
HOBBY

a year ago

thank


magicmike123
HOBBY

a year ago

❤️


magicmike123
HOBBY

a year ago

one platform question this time tho


magicmike123
HOBBY

a year ago

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?


a year ago

yes as long as he adds you as an adminn to his team, you have full access


Loading...