Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Missing Prefab issue

Discussion in 'Unity Accelerator' started by joaoborks, Jun 7, 2023.

  1. joaoborks

    joaoborks

    Joined:
    Jul 7, 2015
    Posts:
    29
    We're using Unity Accelerator v1.0.941+g6b39b61 and Unity Editor 2021.3.20f1 in a CI Pipeline.

    Our pipeline runs 4 jobs in parallel: test-editmode, test-playmode, build-android and build-ios, and all of them use the Accelerator. However at first we thought the missing prefab issue could be due to the different target platforms, so we've pointed each job to its own namespace prefix:
    • editmode-
    • playmode-
    • android-
    • ios-
    I don't think we should be doing that, but the issue persisted. The way it happens is, some of the jobs will eventually run out of log size reporting the missing prefabs. The logs are:

    1. On build jobs:
    Code (csharp):
    1. Prefab instance problem: GameManager (Missing Prefab with guid: 4ab20b0889aec9d4592cb9b96e3fbc45)
    2. UnityEngine.StackTraceUtility:ExtractStackTrace () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/StackTrace.cs:37)
    3. UnityEditor.Build.Content.ContentBuildInterface:CalculatePlayerDependenciesForSceneInternal (string,UnityEditor.Build.Content.BuildSettings,UnityEditor.Build.Content.BuildUsageTagSet,UnityEditor.Build.Content.BuildUsageCache,UnityEditor.Build.Content.DependencyType)
    4. UnityEditor.Build.Content.ContentBuildInterface:CalculatePlayerDependenciesForScene (string,UnityEditor.Build.Content.BuildSettings,UnityEditor.Build.Content.BuildUsageTagSet,UnityEditor.Build.Content.BuildUsageCache,UnityEditor.Build.Content.DependencyType) (at /home/bokken/build/output/unity/unity/Modules/BuildPipeline/Editor/Managed/ContentBuildInterface.bindings.cs:55)
    5. UnityEditor.Build.Pipeline.Tasks.CalculateSceneDependencyData:Run () (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.21.0/Editor/Tasks/CalculateSceneDependencyData.cs:172)
    6. UnityEditor.Build.Pipeline.BuildTasksRunner:Run (System.Collections.Generic.IList`1<UnityEditor.Build.Pipeline.Interfaces.IBuildTask>,UnityEditor.Build.Pipeline.Interfaces.IBuildContext) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.21.0/Editor/Shared/BuildTasksRunner.cs:56)
    7. UnityEditor.Build.Pipeline.ContentPipeline:BuildAssetBundles (UnityEditor.Build.Pipeline.Interfaces.IBundleBuildParameters,UnityEditor.Build.Pipeline.Interfaces.IBundleBuildContent,UnityEditor.Build.Pipeline.Interfaces.IBundleBuildResults&,System.Collections.Generic.IList`1<UnityEditor.Build.Pipeline.Interfaces.IBuildTask>,UnityEditor.Build.Pipeline.Interfaces.IContextObject[]) (at Library/PackageCache/com.unity.scriptablebuildpipeline@1.21.0/Editor/ContentPipeline.cs:145)
    8. UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode:DoBuild<UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult> (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput,UnityEditor.AddressableAssets.Build.DataBuilders.AddressableAssetsBuildContext) (at Library/PackageCache/com.unity.addressables@1.21.1/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:276)
    9. UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptPackedMode:BuildDataImplementation<UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult> (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput) (at Library/PackageCache/com.unity.addressables@1.21.1/Editor/Build/DataBuilders/BuildScriptPackedMode.cs:73)
    10. Source.Editor.BuildScriptFilteredPacked:BuildDataImplementation<UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult> (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput) (at Assets/_Project/Scripts/Editor/Addressables/BuildScriptFilteredPacked.cs:25)
    11. UnityEditor.AddressableAssets.Build.DataBuilders.BuildScriptBase:BuildData<UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult> (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput) (at Library/PackageCache/com.unity.addressables@1.21.1/Editor/Build/DataBuilders/BuildScriptBase.cs:92)
    12. UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContentImpl (UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput,bool) (at Library/PackageCache/com.unity.addressables@1.21.1/Editor/Settings/AddressableAssetSettings.cs:2707)
    13. UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent (UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult&,UnityEditor.AddressableAssets.Build.AddressablesDataBuilderInput) (at Library/PackageCache/com.unity.addressables@1.21.1/Editor/Settings/AddressableAssetSettings.cs:2675)
    14. UnityEditor.AddressableAssets.Settings.AddressableAssetSettings:BuildPlayerContent (UnityEditor.AddressableAssets.Build.AddressablesPlayerBuildResult&) (at Library/PackageCache/com.unity.addressables@1.21.1/Editor/Settings/AddressableAssetSettings.cs:2652)
    15. MagaluGames.Editor.Build.BuildPipeline:TryBuildAddressables () (at Assets/_Project/Scripts/Editor/BuildCommand.cs:303)
    16. MagaluGames.Editor.Build.BuildPipeline:PerformBuild () (at Assets/_Project/Scripts/Editor/BuildCommand.cs:58)
    17. BuildCommand:PerformBuild () (at Assets/_Project/Scripts/Editor/BuildCommand.cs:335)
    18.  
    19. [/home/bokken/build/output/unity/unity/Modules/BuildPipeline/Editor/Managed/ContentBuildInterface.bindings.cs line 55]
    2. On test jobs:
    Code (csharp):
    1. Prefab instance problem: GameCamera (Missing Prefab with guid: 241f6f274a2f15a41af06b12d9e0c788)
    2. UnityEngine.StackTraceUtility:ExtractStackTrace () (at /home/bokken/build/output/unity/unity/Runtime/Export/Scripting/StackTrace.cs:37)
    3. UnityEditor.SceneManagement.EditorSceneManager:OpenScene (string,UnityEditor.SceneManagement.OpenSceneMode)
    4. UnityEditor.SceneManagement.EditorSceneManager:OpenScene (string) (at /home/bokken/build/output/unity/unity/Editor/Mono/EditorSceneManager.cs:62)
    5. Source.Editor.Tests.LevelValidationTests:Level_HasEssentialObjects_Test (LevelData) (at Assets/_Project/Scripts/Tests/Editor/LevelValidationTests.cs:31)
    6. System.Reflection.RuntimeMethodInfo:Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
    7. System.Reflection.MethodBase:Invoke (object,object[])
    8. NUnit.Framework.Internal.Reflect:InvokeMethod (System.Reflection.MethodInfo,object,object[])
    9. NUnit.Framework.Internal.MethodWrapper:Invoke (object,object[])
    10. NUnit.Framework.Internal.Commands.TestMethodCommand:RunNonAsyncTestMethod (NUnit.Framework.Internal.ITestExecutionContext)
    11. NUnit.Framework.Internal.Commands.TestMethodCommand:RunTestMethod (NUnit.Framework.Internal.ITestExecutionContext)
    12. NUnit.Framework.Internal.Commands.TestMethodCommand:Execute (NUnit.Framework.Internal.ITestExecutionContext)
    13. UnityEngine.TestTools.UnityTestMethodCommand:Execute (NUnit.Framework.Internal.ITestExecutionContext) (at Library/PackageCache/com.unity.test-framework@1.1.33/UnityEngine.TestRunner/NUnitExtensions/Commands/UnityTestMethodCommand.cs:16)
    14. [log truncated]
    15.  
    16. [Library/PackageCache/com.unity.test-framework@1.1.33/UnityEditor.TestRunner/TestRunner/EditModeRunner.cs line 246]
    By investigating a little bit more, we found multiple messages like this in the logs:
    Code (csharp):
    1. An infinite import loop has been detected. The following Assets were imported multiple times, but no changes to them have been detected. Please check if any custom code is trying to import them:
    This message does not exist on the successful jobs.

    Also, not sure if that's related but the shadercache namespace seems to get the prefix of whatever job ran first:
    This is the output of cache list-namespaces, not sure why playmode does not have a metadata.

    Finally, we'd appreciate some help to get this working. Integrating the Unity Accelerator made the jobs run faster, but we need to get it working without failures. Let me know if you have any ideas so we can do test runs.

    EDIT: I read this thread: Question - Stuck in an import loop for a prefab asset - Unity Forum, but it didn't look like the issue we were getting here. Maybe the fix for that is what gets logged as "infinite import loop detected"?