:SubscribeAsync() yields silently and indefinetly on Team Test

In regular local Roblox studio testing MessagingService:SubscribeAsync() doesn’t function like in live servers, but using it doesn’t halt the running coroutine. However in Team Testing it seems like calling MessagingService:SubscribeAsync() will halt the running coroutine completely without any warning or thrown error.

This was found in this block of code:

	print("Subscribe start") -- Runs!

	local last_roblox_message = 0

	profile.roblox_message_subscription = MessagingService:SubscribeAsync("PS_" .. unique_session_id, function(message)
		if type(message.Data) == "table" and message.Data.LoadCount == profile.SessionLoadCount then
			-- High reaction rate, based on numPlayers × 10 DataStore budget as of writing
			if os.clock() - last_roblox_message > 6 then 
				last_roblox_message = os.clock()
				if profile:IsActive() == true then
					if message.Data.EndSession == true then
						SaveProfileAsync(profile, true, false, "External")
					else
						profile:Save()
					end
				end
			end
		end
	end)
	
	print("Subscribe end") -- Never runs in Team Test

I would expect MessagingService:SubscribeAsync() to have consistent behaviour in local studio testing and team testing where it would not halt.

15 Likes

+1 to this. This is a high severity issue and needs to be fixed urgently.

1 Like

This got me one day for several hours. I felt like I was losing my mind trying to track it down. lol

1 Like

Thanks for the report. Yeah the MessagingService is not supported in Team Test because such test messages shouldn’t be messing up with the regular messages in production. Meanwhile, Team Test runs in a game server so it’s also different from the local test in Studio which isolates the messages in its own space. That being said, we’re evaluating how to allow messaging in Team Test.

1 Like

Allowing MessagingService to be used in Studio, even if the messages are only sent to Studio sessions, would be so helpful for certain games. Some games rely on this service and are unable to test their games in Studio, having to resort to publishing the update and testing it in live servers instead.