TeleportService.TeleportAsync doesn't work after a shutdown has been performed

This started happening within the last 2-3 days for my SoftShutdown2 resource - there has not been any updates since June 27 2023, and now all of a sudden teleports aren’t going through via TeleportAsync when the server is marked as closing via “Shut Down All Servers” through the website.

Nothing prints, no errors, but the client appears to immediately close connection to the server (you can’t move your character for example). Sometimes it’ll give you an error, and sometimes it’ll stay unresponsive.

image

Reproduction Files

SoftShutdown2 Template Place.rbxl (58.1 KB)
as well as the standalone code to help reproduce this problem (no teleporting gui).

Additionally, I tested the place file above for PlaceId 14674873030.

System Information

CPU: Intel(R) Core™ i7-9700K CPU @ 3.60GHz
GPU: NVIDIA GeForce RTX 4080
Memory: 16.0GB

Expected behavior

I expect previous behavior shown here. All players should be teleported back to the same place in a new server.

35 Likes

I also noticed that when using BindToClose and datastores (no waiting involved) the server basically loses connection and no kick message appears.

5 Likes

Thanks for filing! We’ll take a look when we’re back in office Tuesday

11 Likes

I’ve noticed that by wrapping the teleport call into a pcall it does return an “error”, “The Source Game is invalid.”, it’s very odd behavior to say the least

2 Likes

Just started noticing this as well. Was so confused on how it was broken, thanks for reporting it!

4 Likes

Hi! I don’t suppose you have any more info? It’s hurting playcount on my game as I update daily

3 Likes

Hi, I have tried to reproduce the issue a few times now but no success. I have set up the place and script and on shut down the script seems to run fine and I am teleported.

Do you have client logs of the most recent time this has happened?

3 Likes

I also have this issue using SoftShutdown2 & it only occurs when there are multiple people in a server. When I test alone I’m able to teleport after shutdown. Just thought I’d note that :slight_smile:

4 Likes

As a temporary fix you can reserve a server, teleport players to that server, and teleport them back to a non-reserved server (Unfortunately, this is defeats the purpose of SoftShutdown2 but it’s the best you’ll get until the issue is fixed!)

2 Likes

Hi,

To replicate you need multiple (2+) people in one server.

I am 100% confident this is a new and reproducible issue, I used this script for the entirety of August and when updating servers I would drop from 25k CCU to like 24.8k, which is expected. On the 31st August when I updated servers I dropped from 25k to 8k as the players weren’t automatically rejoined. Over the next 30+ minutes my playercount returned as players manually joined back.

Currently I’m using a workaround fix which teleports players to a reserved server first, and then teleports them again to a normal (non reserved) server which seems to mostly work however it’s not an ideal solution as it counts as +2 visits for each player, and I believe it is hurting my session time.

If you would like to reach out I’m happy to demonstrate to you with another game of mine (300 CCU~) which still has softshutdown.

4 Likes

Thanks for the additional information. I will try reproducing the issue again.

3 Likes

Hello! I’m experiencing this issue in my game too. I teleport all the players back to the game once it shutdowns, and as of recently (past week ish) they just hang indefinitely and don’t teleport nor crash or close or anything. Keep me updated!

2 Likes

Hi, do you have any more information on this? It is still negatively impacting my game due to me having to use a subpar workaround

1 Like

Hi, thanks everyone for reporting. We have a fix that should be released next week.

8 Likes

@SuperPat77 Hey! Following up to your post here:

I’ve just tested and this bug is still prevalent. Are there any updates you can provide on this?

3 Likes

I’ve just tested too and the issue is still there

2 Likes

We attempted to roll out the fix with a flag but there was an issue with it. We’re regrouping to discuss next steps on this one

5 Likes

Thank you for the update, I’m eagerly awaiting the fix!

I’m being affected by this too. Can consistently reproduce in servers of 2+ people

3 Likes

A temporary solution I found is instead of teleporting everyone in the server using a single table with TeleportAsync’s second parameter, you have to teleport every player individually.

Put this at the end of your soft shutdown code:

--Teleporting each player individually instead as one group
for _, player in Players:GetPlayers() do
	task.spawn(function()
		pcall(function()
			return TeleportService:TeleportAsync(targetPlaceId, {player}) -- teleport the user in a protected call to prevent erroring
		end)
	end)
end

-- TeleportService:TeleportAsync(targetPlaceId, CurrentPlayers)
-- Keep the server alive until all of the player(s) have been teleported.
while Players:GetPlayers()[1] do
	task.wait(1)
end

@SuperPat77 So it could be an issue with teleporting a group of players using TeleportAsync in the BindToClose function

3 Likes