Disconnect Error Code 257 on TeleportToPrivateServer

This issue is currently affecting my live game Starscape: https://www.roblox.com/games/679715583/Starscape-Pre-Beta

My game has a number of star systems, each of which is its own server. When players rejoin the game or travel between systems, I use TeleportToPrivateServer to send them to the server that corresponds to the system.

A few hours ago, a bug began to occur for players where they try to enter a system, the game begins the teleport process, and then disconnects them with the message "Lost connection due to an error: (Error Code 257)". The only information I could find on this error anywhere on the internet was this page suggesting it is the result of a bad hash: https://developer.roblox.com/en-us/api-reference/enum/ConnectionError

Once the error begins occurring for a specific private server ID, it will happen 100% of the time anyone tries to teleport to that private server ID. Strangely, this does not seem to affect every private server in my game at this time, but does seem to be affecting more and more as the hours pass. I have made no updates to the game in the past couple days, so I am assuming this is the result of a Roblox bug.

I have no isolated reproduction yet, but the following should help you get an idea of the environment the bug is occurring in:

  • I am using TeleportToPrivateServer on a single player at a time
  • I am not passing spawnName, teleportData, or customLoadingScreen to TeleportToPrivateServer
  • I have a custom loading screen set using TeleportService:SetTeleportGUI()

You can also join Starscape and try warping from The Citadel (starter system) to Nad Vel (an adjacent system) to force the issue to occur.

6 Likes

Running into the same issue, looks like identical symptoms and identical conditions. Once the error code starts happening, all subsequent attempts to used the reserved server access code fail.

1 Like

Thought I would update this post with some findings for Roblox engineers or future devs who run into the issue. A long time passed between the first and most recent times this issue occurred on Starscape, but on March 25th, I encountered the exact same issue that I describe in the original post: players failing to teleport to a reserved server because of Error Code 257. Thankfully, this time, I had additional tools at my disposal to diagnose what was going on.

I have an admin panel that gives me details of every active system (synonymous with servers) in Starscape, and one of these is a MessagingService update broadcast from the servers with a little bit of info about what’s going on in them. The two relevant pieces of information for this error were the player count of the server and the uptime.

While this error was occurring, the affected servers were sending updates via MessagingService indicating that they were still up and running, but also that they had no players in them. The servers continued sending these updates for as long as I watched them. So it would seem from my layman’s perspective that the issue is related to a server only partially shutting down into a state of limbo, as it refuses any new connections but still appears to be running code.

This issue is exceedingly rare (at least for me), but hopefully some day this new info comes in handy!

3 Likes

I’ve actually been experiencing this problem a lot lately. I generate a private server that many players (thousands daily) are placed in and out of. In the past few days, I have been experiencing problems with this server. The server will work great for just under a day, but then something somehow causes it to no longer accept teleports for the rest of its life (unknown cause). After the server enters this state of error, anyone teleported to it receives the following message: "Lost connection due to an error." This is very frustrating as all of the sudden this private server becomes completely unusable and I have to create a new one for it to work again, just for it to stop working again less than a day later.

Except after shutting down all servers in the place, and quickly teleporting myself over the the game (4 others also teleported), I was able to get in. A few seconds later, the server snapped right back into it’s connection refusal state and was unable to be recovered, but the server itself was still up and running just fine. This is very peculiar, but it’s causing severe issues in my game and I’d like to see it fixed.

Useful diagnosage information

JobId for this server, currently refusing all connections but is up and running for all players inside (Jun 24, 2020, 10:10 PM EST): bcbf9c31-ab27-c018-da02-7a2d62fcdfcc

GameId: 108629575

PlaceId for the server that players are being teleported to: 5048618378

PlaceId of the game that connections/teleports are coming from (start place): 270499015

Log files: https://devforum.roblox.com/t/log-files-jun-24-2020-10-19-10-25-pm-est/642980

Specific occurrence and information of this disconnect:

  • UserId: 32201999
  • Time of occurrence: Within a minute of June 24, 2020, 10:19 PM EST

Error screenshot:

Code used to teleport people from start place to private server:

local placeId = 5048618378

local teleportDebounce = {}

local TS = game:GetService("TeleportService")
local Players = game:GetService("Players")
local DSS = game:GetService("DataStoreService")
local DS = DSS:GetGlobalDataStore()
 
-- Get the saved code
local code = DS:GetAsync("ReservedServer2")
if type(code) ~= "string" then -- None saved, create one
	code = TS:ReserveServer(placeId)
	DS:SetAsync("ReservedServer2",code)
end
 
script.Parent.Touched:Connect(function(hit)
	local plr = Players:GetPlayerFromCharacter(hit.Parent)
	if plr then
		if teleportDebounce[plr] then return end
		teleportDebounce[plr] = true
		pcall(function()
			TS:TeleportToPrivateServer(placeId,code,{plr})
		end)
		wait(1)
		teleportDebounce[plr] = false
	end
end)
3 Likes

hi @Vmena - I was curious to see if you were still experiencing this error. we made some fixes on the backend that should prevent teleports to a server winding down.

2 Likes

I don’t think I’ve been experiencing this anymore, it is probably fixed. I’ll let you know if anything goes wrong, thank you.

1 Like

Bumping this, as I’ve recently run into the same issue and it’s unfortunately been pretty persistent in the last week. I’ve been making a similar teleportation system for a game, and upon testing with multiple accounts, most if not all lose connection. Everything described in the first post matches with what is happening to me. The only difference with this compared to Zolar’s case is that the server being teleported to, is not empty.