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

: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