ExperienceNotificationService CanPromptOptIn not working

we have been using this code for a long time

		local ExperienceNotificationService = game:GetService("ExperienceNotificationService")

		local function canPromptOptIn()
			local success, canPrompt = pcall(function()
				return ExperienceNotificationService:CanPromptOptInAsync()
			end)
			return success and canPrompt
		end

		local canPrompt = canPromptOptIn()
		if canPrompt then
			local success, errorMessage = pcall(function()
				ExperienceNotificationService:PromptOptIn()
			end)
		end

which is copied from the doc

although there might be less than 3 of this error usually, suddenly have a lot of this error reported since Feb 7:
The player cannot be prompted. Please check ExperienceNotificationService:CanPromptOptIn first before calling ExperienceNotificationService:PromptOptIn

because the code had used CanPromptOptIn already, it would either be CanPromptOptIn wrongly returned true, or PromptOptIn wrongly reported such error

Expected behavior

i expect ZERO such error reported.

2 Likes

Hi EtNowis, we confirmed that you are using the code in the right way. We think we have fixed the backend bug that returned the incorrect error:

The player cannot be prompted. Please check ExperienceNotificationService:CanPromptOptIn first before calling ExperienceNotificationService:PromptOptIn

Now, you should get the right error about the failed prompt opt in call.

Note that it’s expected that you’ll still get some errors at the current rate.

Could you check if you are still having this problem?

1 Like

Thanks, we haven’t been receiving that many since Feb 9.