Error using SetCoreGuiEnabled when emulating a mobile device

Reproduction Steps
Run this in a LocalScript using a mobile test preview:

game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false) -- hide the player's name

Expected Behavior
No errors when testing the game in a mobile emulator in Studio

Actual Behavior
When running the mobile emulator, Studio shows theses errors repeatedly:


CoreGui.RobloxGui.Modules.PlayerList.Components.PresentationMobile.PlayerDropDown:92: setState cannot be used in the willUnmount lifecycle method.
A component that is being unmounted cannot be updated!

Check the definition of willUnmount in the component “PlayerDropDown”.
Stack Begin
Script ‘CorePackages.Packages._Index.roblox_roact.roact.Component’, Line 116 - function setState
Script ‘CoreGui.RobloxGui.Modules.PlayerList.Components.PresentationMobile.PlayerDropDown’, Line 92
Script ‘CorePackages.Packages._Index.roblox_otter.otter.createSignal’, Line 50 - function fire
Script ‘CorePackages.Packages._Index.roblox_otter.otter.createSingleMotor’, Line 65 - function step
Script ‘CorePackages.Packages._Index.roblox_otter.otter.createSingleMotor’, Line 34
Stack End
CoreGui.RobloxGui.Modules.PlayerList.Components.PresentationMobile.PlayerDropDown:92: setState cannot be used in the willUnmount lifecycle method.
A component that is being unmounted cannot be updated!

5 Likes

Thank you! This explains why I see this exact error over 50,000 times per day in my game Growing Up. It is not just a Studio mobile emulator bug. It is happening in live games. I think it is related to the new Mobile Leaderboards Are Now Available! - Updates / Announcements - DevForum | Roblox. The SetCoreGuiEnabled function “seems” to work correctly, but the number of error messages is becoming a problem.

3 Likes

This is happening to me too. I’ve disabled All SetCoreGuiEnabled and it’s still happening.

FYI: OuterSpaceNemo (Dev Relations) reported that this problem (SetCoreGuiEnabled on mobile) is now fixed. And it looks good to me. :grinning:

2 Likes

If this issue is still occurring, please create a new topic for us to look into.