HttpError: Timedout happening in game servers but not studio

  1. What do you want to achieve? Keep it simple and clear!
    I am making a build import/export system (similar to to F3X)
  2. What is the issue? Include screenshots / videos if possible!
    In studio, requests work fine. However, in live servers, requests fail with “HttpError: Timedout”
    Studio:
    image
    Game:
    image

Logs on the site show that the request from the game server is not being recieved (both these have RobloxStudio useragents)
image
Code used:

local HttpService = game:GetService("HttpService")

local success, result = pcall(function()
	return HttpService:GetAsync("https://highspeedtrain.net/api/bt/export")
end)

print(success)
print(result)
  1. What solutions have you tried so far? Did you look for solutions on the Creator Hub?
    RequestAsync / PostAsync do not work either
    The issue still happens in a blank baseplate
    Disabling website firewall does not fix

I use Vercel, but this was also happening on my previous host, Bluehost
Any help appreciated

Make sure your endpoint uses https:// not http:// .. server is picky and serious.

1 Like

Could it be that vercel is filtering out bots? or the server could be erroring and crashing

I would assume: stricter security policies on live servers compared to Studio.

The free Vercel tier does indeed have stricter security measures, so I’m pretty sure they are getting detected as bots, as when you request into Studio, it doesn’t use Roblox’s user agent, but in the game it does.

Also just going to mention, you said it works in studio? Because in the studio screenshot it doesn’t seem to be working either and gives a 404 error.

It gives a 401 because I didn’t provide an API key, but the server is actually responding unlike ingame

Oh ok then. Just wanted to clarify. Anyway, I probably can’t help you cause I usually don’t do this kind of stuff. Good luck!

There hasn’t been anything denied in firewall logs for over 2 hours
image

Does your vercel script return 401 somewhere anywhere

Yes, when no API key / an invalid API key is provided

are you sure your vercel is receiving the api key and are you sure that it’s valid?

local data = HttpService:RequestAsync({
	Url = "https://highspeedtrain.net/api/bt/export",
	Method = "POST",
	Headers = {
		["api-userid"] = tostring(Player.UserId),
		["api-authkey"] = HttpService:GetSecret("export_key")
	},
	Body = HttpService:JSONEncode({
		["build-data"] = SerializedBuildData
	}),
})

The function is recieving the API key

Is the data you’re sending large?

Is there some sort of response times logs in vercel?

Are you able to do this with uhh cloudflare workers? Just to see if it works?

163 characters

For some reason it works with Cloudflare Workers.

Okay so just avoid these in the future
Vercel
Netlify
Cloudflare Free & Pro (Except workers)
Bluehost
GoDaddy
Squarespace
DigitalOcean App Platform (NOT droplets)

Roblox loves them extra and just refuses to receive requests from them sometimes for some unknown reason

1 Like