HTTP Requests keep 404ing

I’m using Koa which is kind of Express v5. The morgan middleware informs me of all hits that happen. So if I were to GET /nonexistentendpoint and /nonexistentendpoint is not routed anywhere, it would tell me that there was a GET request and it gave a 404. I am 100% sure that the requests aren’t coming at all.

Well make sure RequestAsync works, and if it doesn’t half the time, output all the data it returns to see if we can narrow it down.

It happened again, here’s what the console shows.

The server shows:

HttpError_Conenct :laughing: roblox messed up error.
So the last announcement returned a 200 code, and also errored?

No, the last batch of announcements were received and it worked. However, when I tried to get them again, the request never hit the server. It just showed that in the console.

Ahh i see, where are you hosting it? if at home, just note that ISPs dont like people hosting websites on residential connections (if that’s what you’re doing). I’ve experienced this in the past with my ISP

You’re also using HTTP and not HTTPS correct? i see in the images in the OP it says HTTP, just want to make sure though.

Let’s not tell my ISP what I’m doing :eyes:. It’s not a permanent thing, just temporary while I make my thing work so I don’t have to constantly re-upload the file back up to my VPS every time I make a change. However this can’t be the problem because it also happens to my other stuff which are on my VPS.

I am using HTTP, that is correct.

Alright, could you show some code (with redacted domain) how you’re sending it?
i can’t think of anything that would be causing it

Here’s the code:

local response = HTTPService:RequestAsync({ Url = 'http://hahaha.net:3333/announcements' });
	
for a,b in pairs (response) do
	if (type(b) == "table") then
		for c,d in pairs (b) do
			print(c, d);
		end;
	end;
    print(a, b);
end;
	
-- Inspect the response table
if response.Success then
	print("Status code: " .. response.StatusCode .. " " .. response.StatusMessage)
	print("Response body:\n" .. response.Body)
else
	print("The request failed: " .. response.StatusCode .. " " .. response.StatusMessage)
end	
	
data = response.Body;

Do all your apps with this issue not use port 80 (default) to connect?

Yes, I use ports 3334 and 3333 mainly. I reserve port 80 for Apache.

I see, well you can setup a reverse proxy on apache (not sure the config as I use Nginx personally), but it’d allow you to use multiple domains on virtual hosts, so when making requests with domain hahahaha.net it’ll automatically route to your node app, that’s what I do for my production APIs via expressjs

Not entirely sure if using ports other than 80/443 would be the issue, if it is, then it’s entirely roblox’s fault, or it’s got to be. No reason why it shouldn’t connect. I also tested some code myself to random non-existant domains, and the error codes are not super helpful (like telling you whether its a DNS error, connection refused, etc.)

This tutorial might help https://www.1and1.com/cloud-community/learn/application/misc/set-up-a-nodejs-app-for-a-website-with-apache-on-ubuntu-1604/

after setting up a reverse proxy, if it’s still an issue, you might want to work with an engineer to solve it.

I don’t think I need a reverse proxy. I don’t use multiple domains either, I just create/remove subdomains with Cloudflare.

I’m using No-IP right now to map a free domain to my public IP with a port forward on port 3333. It does seem like Roblox’s fault because no matter how many times I spam my API with Postman or my browser, it always resolves and gives me a response.

Reverse proxy just makes it so you can use multiple domains on the same port, but if you dont want to, do what you want i guess :stuck_out_tongue:

It could entirely be a DNS resolve issue on roblox’s side, or even the DNS provider is limiting how much they can do it (as far as i know, roblox doesnt cache DNS based on my experience), so try using a direct ip to the host so like http://192.168.2.1/example and see if the issue continues

Tried a direct IP, didn’t work. :thinking:

This is complete whack.

make sure you use external IP, not like 192.168.* range (which is local subnet)

Yeah, that is what I used.

Well, I tried, i have no idea what could be causing it. I know i had issues with HTTPS completely failing after a while, but this is beyond me. :\

1 Like

I know I’m late but did you try using Postman yet to send a request and see what response and body are returned? I had the same issue with RequestAsync but it was an issue with my lua code, not my express server side.

1 Like

Yeah, Postman works. There’s really not much to it because it’s just a simple GET.