UE5 Dedicated server Error: Assertion failed: Index != INDEX_NONE

I found the same error today. Although the solution of removing the animation works, it can’t be the final solution. I sent as well a detailed report about it. Let’s see what they answer.
Also, I tried to create a blank project using C++ and add the third person components later. For this case, the game runs, but it can’t find the player when is loaded. So the camera is totally free. Does anyone has a suggestion for it? The error for this case is:
Default Property warnings and errors:
Error: CDO Constructor (TP_ThirdPersonGameMode): Failed to find /Game/ThirdPerson/Blueprints/BP_ThirdPersonCharacter.BP_ThirdPersonCharacter_C

Thanks.

I’ve also encountered the same issue. Just wanted to add that to the thread lol

An answer I posted on Udemy a few days ago:

[EDIT] In your content folder click on C++ Classes>MenuSystem. Double click MenuSystemGameMode. Visual Studio should open the file. There are two options at this point:

Option 1) Change the code below to point to the correct path of your character blueprint.

  1. AMenuSystemGameMode::AMenuSystemGameMode()
  2. {
  3. //set default pawn class to our Blueprinted character
  4. static ConstructorHelpers::FClassFinder PlayerPawnBPClass(TEXT("/Game/ThirdPerson/Blueprints/BP_ThirdPersonCharacter"));
  5. if (PlayerPawnBPClass.Class != NULL)
  6. {
  7. DefaultPawnClass = PlayerPawnBPClass.Class;
  8. }
  9. }

Option 2) Comment out the code within the constructor. Go back to the Unreal Editor and recompile your changes. In the editor go to Window>World Settings. World settings should become visible in the editor. Expand Game Mode. Ensure your game mode is selected in GameMode override. Expand selected GameMode. Ensure Default Pawn Class is your blueprint character class.

Same error here.

ThirdPersonMP build as C++ project.

Same error.

Using C++ TopDown template on UE 5.0 with Visual Studio 2022 build from source.

Just wanted to say I’m seeing this same problem so I can follow the thread in case another fix is found.

I found a pull request on github may solve this problem.

this file => Engine/Source/Runtime/Engine/Private/Animation/AttributeTypes.cpp

EDelayedRegisterRunPhase::ObjectSystemReady => EDelayedRegisterRunPhase::PreObjectSystemReady

build the UE solution.

4 Likes

My solution was to similar to what @AdmiralSlim suggested.

I commended out the default pawn code in the GameMode class
I created a new BP Game mode derived from my code GameMode
I changed the project settings to set the default game mode to my BP game mode
I changed the project settings to set the default pawn to BP_ThirdPersonCharacter

I would add for option 2: You need to make a new blueprint Game Mode class with a base class from MenuSystemGameMode. Then set BP_ThirdPersonCharacter as default pawn there. In World settings set that new game mode.

same issue !! can any one make a video tutorial to make it clear :melting_face:

Quick fix for it. Just change Animation class to None. Package will not crash, but you character will not have animation. You will need to setup your own Animation Class to make it work properly.

1 Like

Thank you so much, this worked perfectly

Finally, there is the ONLY ONE solution this issue, don’t waste your time, all other suggestions are fake, except for the only correct solution proposed by [xuefujun].

So, change: Engine/Source/Runtime/Engine/Private/Animation/AttributeTypes.cpp
EDelayedRegisterRunPhase::ObjectSystemReady => EDelayedRegisterRunPhase::PreObjectSystemReady

& fully rebuild UE5 then.

It may help track where the problem comes from. I noticed that the problem arise when you start with a C++ project and not when you convert a Blueprint project to C++ right after creating it.

I think your solution is the right one but how can I apply this solution using normal UE5(not built from source)? Any idea?

1 Like

Ayllk_Oxfeef thank you!!! i put in a pull request (or whatever its called) to unreal on epic to hopefully help others with this issue!

https://github.com/EpicGames/UnrealEngine/commit/2d750f27951d0a18c820c38f873fbf5e6a3587c7

I can’t find “MenuSystemGameMode” in my project. There’s very little in my C++ Classes folder. Should this definitely be there?

:tada: I found a fix that does not require recompiling the engine OR giving up on animations! :tada:

I’m also hit by this exception running a project based on the Third Person (C++) template.

Find the AYourProjectGameMode.cpp file the engine provided for you, and get rid of everything in the constructor, like so

// Copyright Epic Games, Inc. All Rights Reserved.

#include "YourProjectGameMode.h"
#include "YourProjectCharacter.h"
#include "UObject/ConstructorHelpers.h"

AYourProjectGameMode::AYourProjectGameMode()
{
	// DELETE OR COMMENT OUT ALL OF THIS (you don't really need it anyway!)
	// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
	//
	// // set default pawn class to our Blueprinted character
	// static ConstructorHelpers::FClassFinder<APawn> PlayerPawnBPClass(TEXT("/Game/ThirdPerson/Blueprints/BP_ThirdPersonCharacter"));
	// if (PlayerPawnBPClass.Class != NULL)
	// {
	// 	DefaultPawnClass = PlayerPawnBPClass.Class;
	// }
}

After that, recompile (Live Code/Hot Reload did not work - you will need to close the editor) and repackage, you should be good to go (with animations working!)

Found this out after I built the game with the DebugEditor configuration and saw these few calls in the big ol’ error stacktrace:

ConstructorHelpersInternal::FindOrLoadClass()
ConstructorHelpers::FClassFinder<APawn>::FClassFinder<APawn>()
AYourProjectGameMode::AYourProjectGameMode()
InternalConstructor<AYourProjectGameMode>()

so avoid using FClassFinder for APawn, I guess.

Highly recommend building DebugEditor (not DevelopEditor) and checking out the logs when facing exceptions :+1:

1 Like

In the Unreal editor click on Window in the toolbar. Is there a check by World Settings? If not, click it. The World Settings tab should become visible near your details tab pane on the right. Click the tab. There should be a GameMode section. What is selected for GameMode Override? To the right of the elected gamemode there should be an icon of a folder with a magnifying glass. Click this to be taken to the folder containing the blueprinted gamemode. It may be possible the Gamemode override is a C++ class , which in this case it will not take you to a folder and you’ll have to open the Visual Studio solution for the project to find the C++ class.

I was confused because someone mentioned a file at “C++ Classes>MenuSystem”, which I couldn’t find. My project was called something different, so Unreal gave me a GameMode file called something else. I assigned this as the default game mode, and then I went through the steps mentioned by Kowbell above (although I had to edit both my cpp and header file for the game mode to add a constructor method).

Following that, I can package my ThirdPerson template project, but only if I disable the Animation Blueprint on my ThirdPersonCharacter. If I don’t do that, I get the following error:

Assertion failed: Index != INDEX_NONE
[File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Public\Animation\AttributeTypes.h] [Line: 117]
Missing operator for attribute, type IntegerAnimationAttribute was not registered previously