AdService:GetAdAvailabilityNowAsync() permanently freezes after second call

The player @k55zz reached out to me telling a feature isnt working.

Turns out when the player enters a vehicle, leaves it and then enters it again, causes the script to get stuck without any output at print(“SSSSSSS”)

  • Everytime a player enters a vehicle a new ScreenGui containing the “LocalScript” is being cloned into the player.
  • It does not happen to me “Owner” @TypKris
  • No errors visible on Client and Server.
  • After asking him about other ad rewards turns out it stops working for any script! (Adjusted info!)
  • The single time it may works, result.AdAvailabilityResult is Enum.AdAvailabilityResult.NoFill
local function initVideoAds()
	print("HHHHHHHHHH")
	
	if player.UserId == game.CreatorId or player.UserId == 412563323 then return end -- Devs can see regardless for testing
	
	print("SSSSSSS")

	local success, result = pcall(function()
		return AdService:GetAdAvailabilityNowAsync(Enum.AdFormat.RewardedVideo)
	end)
	
	print(success, result.AdAvailabilityResult)
	
	if not success or isIneligible(result.AdAvailabilityResult) then
		videoAdRefillFrame.Visible = false
	end
end

initVideoAds()
print("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")

I do use a Retry module but that was never an issue and is a simple function, i do tested it without.

local success, result = Retry(function()
	return AdService:GetAdAvailabilityNowAsync(Enum.AdFormat.RewardedVideo)
end, 3, 1)

Retry module:

return function(callback, retries, retryDelay, ...)
	local success, results
	local attempts = 0	
	
	repeat 
		success, results = pcall(callback, ...)
		if not success then
			task.wait(retryDelay)
		end
		attempts += 1
	until success or attempts >= retries
	
	return success, results
end

The Game:

I assume (this/a similar) bug was already reported a while ago:

Thank you for reporting! We are following up with you through PMs. I will also post an update here if there is a resolution.

1 Like