Error: "CorePackages.Packages._Index.RoactCompat" caused by game.ReplicatedFirst:RemoveDefaultLoadingScreen()’

Reproduction Steps

I started getting this error a few hours ago, but apparently it’s not causing any issues with the game.

Expected Behavior

No errors.

Actual Behavior

When starting the game, I get:

CorePackages.Packages._Index.RoactCompat-9c8468d8-8a7220fd.RoactCompat.RoactTree:130: attempt to index nil with ‘root’


Edit

WORKAROUND
move the game.ReplicatedFirst:RemoveDefaultLoadingScreen() to the very first line ReplicatedFirst LocalScript


Issue Area: Engine
Issue Type: Other
Impact: Low
Frequency: Constantly
Date First Experienced: 2022-11-14 20:11:00 (-03:00)

12 Likes

I got the same issue and have no clues what happen with my scripts.

It seems I have found the issue with this bug.
When I close this function ‘game.ReplicatedFirst:RemoveDefaultLoadingScreen()’ the error disappears.

1 Like

Adding to this, the error only happens if the script yields before calling RemoveDefaultLoadingScreen. At least on my end.

1 Like

I can confirm that’s the problem.
I changed the title to reinforce the cause.
Thanks.

This might be related due to how Roblox is changing the loading screen, which is currently visible in the mobile and the BETA app, and the Studio.

3 Likes

Hey Roblox!
This error has been constantly showing for 3 days and so far no one from Roblox has paid any attention!

This error is popping up on my output as well since a couple days, figured someone else posted it but seems like it still needs to be patched.

@WillyChan15 @Pseudoisochromatic @SomeFedoraGuy @punisherholic

I don’t know if this is the case with you, but in my case I moved the game.ReplicatedFirst:RemoveDefaultLoadingScreen() to the very first line ReplicatedFirst LocalScript and the errors went away.

Could you confirm?

3 Likes

Like I said, it seems to only error when there is any sort of yielding before calling RemoveDefaultLoadingScreen. Were you using any functions that yield, like WaitForChild?

1 Like

Yes.
This is why moving the instruction to the first line solved the problem.
But, as I mentioned, this bug was introduced a few days ago, so I’ll leave this bug report open.

I can’t seem to get the error in either case:

  • No yield
  • Yield for 1 second
  • Yield for 2 seconds
1 Like

Mine simply uses game:GetService("ReplicatedFirst"):RemoveDefaultLoadingScreen() as the second line.


I had the same issue, but this was very helpful, thank you :slight_smile:

1 Like

It seems not yield now when I put it in the RF service.

I’m also getting this weird error; My loading script’s first line is this, so it shouldn’t need to wait for any instances to replicate/yield:

script.Parent.Parent:RemoveDefaultLoadingScreen()

(This is a LocalScript inside a ScreenGui, so its parent’s parent is ReplicatedFirst.)
image

Despite this, that error shows up twice when my experience loads:

  18:39:00.966  CorePackages.Packages._Index.RoactCompat-9c8468d8-8a7220fd.RoactCompat.RoactTree:130: attempt to index nil with 'root'  -  Client - RoactTree:130
  18:39:00.966  Stack Begin  -  Studio
  18:39:00.966  Script 'CorePackages.Packages._Index.RoactCompat-9c8468d8-8a7220fd.RoactCompat.RoactTree', Line 130 - function unmount  -  Studio - RoactTree:130
  18:39:00.967  Script 'LoadingScript', Line 1024 - function handleRemoveDefaultLoadingGui  -  Studio
  18:39:00.967  Stack End  -  Studio
  18:39:01.460  Starting time found! This server is starting at 19:00.  -  Server - TimeSystem_Server:46
  18:39:01.478  JoyfulFlowerMary's Character wasn't located in workspace.Players. It should be moved.  -  Server - PreparePlayers:146
  18:39:01.494  A time sync update was received from JoyfulFlowerMary! They aren't done with loading yet, so their time sync can't be reported.  -  Server - TimeSystem_Server:69
  18:39:01.538  Time: Synced with server, now set to 19.  -  Client - TimeSystem_Client:130
  18:39:01.719  Requiring asset 6738245247.
Callstack:
cloud_4987562465.InCommand.PluginUpdates, line 36
cloud_4987562465.InCommand.PluginUpdates, line 35 - getLatestVersion
cloud_4987562465.InCommand.Main, line 22
  -  Server
  18:39:02.980  CorePackages.Packages._Index.RoactCompat-9c8468d8-8a7220fd.RoactCompat.RoactTree:130: attempt to index nil with 'root'  -  Client - RoactTree:130
  18:39:02.980  Stack Begin  -  Studio
  18:39:02.980  Script 'CorePackages.Packages._Index.RoactCompat-9c8468d8-8a7220fd.RoactCompat.RoactTree', Line 130 - function unmount  -  Studio - RoactTree:130
  18:39:02.980  Script 'LoadingScript', Line 1024 - function handleRemoveDefaultLoadingGui  -  Studio
  18:39:02.981  Script 'LoadingScript', Line 1053  -  Studio
  18:39:02.981  Stack End  -  Studio
1 Like

Once this bug is happening while there’s some yieldind, try to put your local script as parent of everything inside ReplicatedFirst.

I just moved the LocalScript to ReplicatedFirst like you said; That did get rid of the first error, but the second appears a couple seconds into the loading screen. Commenting out the “remove default loading screen” line also makes the second one not appear but that’s not the solution.
image
Since this at least hid the first error, it’s still helpful, though!

The bug here is that you can’t have any yielding before RemoveDefaultLoadingScreen(), so move it to the very first line of your script.
As we don’t know when Roblox will fix this, try to create all your gui objects via script, AFTER RemoveDefaultLoadingScreen(), instead of having these already existing Gui objects.

My loadingscreen logic completely stopped working an hour ago or so… is anyone else experiencing that? My loading screen no longer pops-up and I get errors all over about player values not existing, or about replicatedstorage not existing?! Some weird stuff.