Assertion failed: IsValid() JoinSession

hi i am using 5.3.2 unreal engine and i am trying to connect other session and i got this error
[2024.05.11-09.17.06:280][122]LogWindows: Error: === Critical error: ===
[2024.05.11-09.17.06:280][122]LogWindows: Error:
[2024.05.11-09.17.06:280][122]LogWindows: Error: Assertion failed: IsValid() [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Templates\SharedPointer.h] [Line: 1139]
[2024.05.11-09.17.06:280][122]LogWindows: Error:
[2024.05.11-09.17.06:280][122]LogWindows: Error:
[2024.05.11-09.17.06:280][122]LogWindows: Error:
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff66217ce17 onlineGame.exe!FOnlineSessionSteam::JoinInternetSession()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff66217d6c3 onlineGame.exe!FOnlineSessionSteam::JoinSession()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff6622120da onlineGame.exe!AonlineGameCharacter::onFindSessionsComplete() [D:\dev\onlineGame\Source\onlineGame\onlineGameCharacter.cpp:224]
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff6622103e6 onlineGame.exe!TBaseUObjectMethodDelegateInstance<0,AonlineGameCharacter,void __cdecl(bool),FDefaultDelegateUserPolicy>::ExecuteIfSafe() [F:\Epic Games\UE_5.3\Engine\Source\Runtime\Core\Public\Delegates\DelegateInstancesImpl.h:667]
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff65b825a3b onlineGame.exe!TMulticastDelegate<void __cdecl(bool),FDefaultDelegateUserPolicy>::Broadcast()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff6621a157b onlineGame.exe!FOnlineAsyncTaskSteamFindLobbies::TriggerDelegates()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff662000323 onlineGame.exe!FOnlineAsyncTaskManager::GameTick()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff66219dd92 onlineGame.exe!FOnlineSubsystemSteam::Tick()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff65ab1cc35 onlineGame.exe!TBaseRawMethodDelegateInstance<0,FTSTickerObjectBase,bool __cdecl(float),FDefaultDelegateUserPolicy>::Execute()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff65ab1e5a2 onlineGame.exe!FTSTicker::FElement::Fire()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff65ab3cad8 onlineGame.exe!FTSTicker::Tick()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff661ec2c91 onlineGame.exe!FEngineLoop::Tick()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff661ed73fc onlineGame.exe!GuardedMain()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff661ed74da onlineGame.exe!GuardedMainWrapper()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff661eda386 onlineGame.exe!LaunchWindowsStartup()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff661ee9f74 onlineGame.exe!WinMain()
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ff665503b7a onlineGame.exe!__scrt_common_main_seh() [D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[2024.05.11-09.17.06:280][122]LogWindows: Error: [Callstack] 0x00007ffffdf5257d KERNEL32.DLL!UnknownFunction
[2024.05.11-09.17.06:280][122]LogWindows: Error:
[2024.05.11-09.17.06:291][122]LogExit: Executing StaticShutdownAfterError
[2024.05.11-09.17.06:292][122]LogWindows: FPlatformMisc::RequestExit(1, LaunchWindowsStartup.ExceptionHandler)
[2024.05.11-09.17.06:292][122]LogWindows: FPlatformMisc::RequestExitWithStatus(1, 3, LaunchWindowsStartup.ExceptionHandler)
[2024.05.11-09.17.06:292][122]LogCore: Engine exit requested (reason: Win RequestExit)

this is my code

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

include “onlineGameCharacter.h”
include “Engine/LocalPlayer.h”
include “Camera/CameraComponent.h”
include “Components/CapsuleComponent.h”
include “GameFramework/CharacterMovementComponent.h”
include “GameFramework/SpringArmComponent.h”
include “GameFramework/Controller.h”
include “EnhancedInputComponent.h”
include “EnhancedInputSubsystems.h”
include “InputActionValue.h”
include “OnlineSubsystem.h”
include “Interfaces/OnlineSessionInterface.h”
include “OnlineSessionSettings.h”
include “Online/OnlineSessionNames.h”

DEFINE_LOG_CATEGORY(LogTemplateCharacter);

//////////////////////////////////////////////////////////////////////////
// AonlineGameCharacter

AonlineGameCharacter::AonlineGameCharacter():
createSessionCompleteDelegate(FOnCreateSessionCompleteDelegate::CreateUObject(this, &ThisClass::onCreateSessionComplete)),
findSessionCompleteDelegate(FOnFindSessionsCompleteDelegate::CreateUObject(this, &ThisClass::onFindSessionsComplete)),
joinSessionCompleteDelegate(FOnJoinSessionCompleteDelegate::CreateUObject(this, &ThisClass::onJoinSessionComplete))
{
// Set size for collision capsule
GetCapsuleComponent()->InitCapsuleSize(42.f, 96.0f);

// Don't rotate when the controller rotates. Let that just affect the camera.
bUseControllerRotationPitch = false;
bUseControllerRotationYaw = false;
bUseControllerRotationRoll = false;

// Configure character movement
GetCharacterMovement()->bOrientRotationToMovement = true; // Character moves in the direction of input...	
GetCharacterMovement()->RotationRate = FRotator(0.0f, 500.0f, 0.0f); // ...at this rotation rate

// Note: For faster iteration times these variables, and many more, can be tweaked in the Character Blueprint
// instead of recompiling to adjust them
GetCharacterMovement()->JumpZVelocity = 700.f;
GetCharacterMovement()->AirControl = 0.35f;
GetCharacterMovement()->MaxWalkSpeed = 500.f;
GetCharacterMovement()->MinAnalogWalkSpeed = 20.f;
GetCharacterMovement()->BrakingDecelerationWalking = 2000.f;
GetCharacterMovement()->BrakingDecelerationFalling = 1500.0f;

// Create a camera boom (pulls in towards the player if there is a collision)
CameraBoom = CreateDefaultSubobject<USpringArmComponent>(TEXT("CameraBoom"));
CameraBoom->SetupAttachment(RootComponent);
CameraBoom->TargetArmLength = 400.0f; // The camera follows at this distance behind the character	
CameraBoom->bUsePawnControlRotation = true; // Rotate the arm based on the controller

// Create a follow camera
FollowCamera = CreateDefaultSubobject<UCameraComponent>(TEXT("FollowCamera"));
FollowCamera->SetupAttachment(CameraBoom, USpringArmComponent::SocketName); // Attach the camera to the end of the boom and let the boom adjust to match the controller orientation
FollowCamera->bUsePawnControlRotation = false; // Camera does not rotate relative to arm

// Note: The skeletal mesh and anim blueprint references on the Mesh component (inherited from Character) 
// are set in the derived blueprint asset named ThirdPersonCharacter (to avoid direct content references in C++)

IOnlineSubsystem* onlineSubsystem = IOnlineSubsystem::Get();
if (onlineSubsystem) {
	onlineSessionInterface = onlineSubsystem->GetSessionInterface();

	if (GEngine)
	{
		FString SubsystemName = onlineSubsystem->GetSubsystemName().ToString();

		GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Blue, FString::Printf(TEXT("Found subsystem %s"), *SubsystemName));
	}
}

}

void AonlineGameCharacter::BeginPlay()
{
// Call the base class
Super::BeginPlay();

//Add Input Mapping Context
if (APlayerController* PlayerController = Cast<APlayerController>(Controller))
{
	if (UEnhancedInputLocalPlayerSubsystem* Subsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(PlayerController->GetLocalPlayer()))
	{
		Subsystem->AddMappingContext(DefaultMappingContext, 0);
	}
}

}

void AonlineGameCharacter::createGameSession()
{
if (!onlineSessionInterface.IsValid()) {
return;
}
auto existingSession = onlineSessionInterface->GetNamedSession(NAME_GameSession);
if (existingSession != nullptr) {
onlineSessionInterface->DestroySession(NAME_GameSession);
}

onlineSessionInterface->AddOnCreateSessionCompleteDelegate_Handle(createSessionCompleteDelegate);

TSharedPtr<FOnlineSessionSettings> SessionSettings = MakeShareable(new FOnlineSessionSettings());
SessionSettings->NumPublicConnections = 4;
SessionSettings->bShouldAdvertise = true;
SessionSettings->bUsesPresence = false;
SessionSettings->bUseLobbiesIfAvailable = true;
SessionSettings->bIsLANMatch = false;
SessionSettings->bAllowJoinViaPresence = true;
SessionSettings->bAllowJoinInProgress = true;

SessionSettings->Set(FName("MatchType"), FString("FreeForAll"), EOnlineDataAdvertisementType::ViaOnlineServiceAndPing);

const ULocalPlayer* localPlayer = GetWorld()->GetFirstLocalPlayerFromController();
onlineSessionInterface->CreateSession(*localPlayer->GetPreferredUniqueNetId(), NAME_GameSession, *SessionSettings);

}

void AonlineGameCharacter::joinGameSession()
{
if (!onlineSessionInterface.IsValid()) {
return;
}
onlineSessionInterface->AddOnFindSessionsCompleteDelegate_Handle(findSessionCompleteDelegate);

sessionSearch.Reset();
sessionSearch = MakeShareable(new FOnlineSessionSearch());
sessionSearch->MaxSearchResults = 10000;
sessionSearch->bIsLanQuery = false;
sessionSearch->QuerySettings.Set(SEARCH_PRESENCE, true, EOnlineComparisonOp::Equals);

const ULocalPlayer* localPlayer = GetWorld()->GetFirstLocalPlayerFromController();
if (GEngine)
{
	GEngine->AddOnScreenDebugMessage(
		-1,
		15.f,
		FColor::Black,
		FString(TEXT("trigger  FindSessions"))
	);
}
onlineSessionInterface->FindSessions(*localPlayer->GetPreferredUniqueNetId(), sessionSearch.ToSharedRef());

}

void AonlineGameCharacter::onCreateSessionComplete(FName sessionName, bool bWasSuccessful)
{
if (bWasSuccessful) {
if (GEngine)
{

		GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Blue, sessionName.ToString());
	}
	UWorld* world = GetWorld();
	if (world) {
		world->ServerTravel(FString("/Game/ThirdPerson/Maps/Lobby?listen"));
	}
}
else {
	if (GEngine)
	{
		GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Red, FString(TEXT("Failed To create Session !")));
	}
}

}

void AonlineGameCharacter::onFindSessionsComplete(bool bWasSuccessful)
{

if (!onlineSessionInterface.IsValid()) {
	return;
}

if (GEngine)
{
	GEngine->ClearOnScreenDebugMessages();
	GEngine->AddOnScreenDebugMessage(
		-1,
		15.f,
		FColor::Black,
		FString(TEXT("Interface is ok !"))
	);

}


for (auto result : sessionSearch->SearchResults) {
	FString Id = result.GetSessionIdStr();
	FString User = result.Session.OwningUserName;
	FString matchtype;
	result.Session.SessionSettings.Get(FName("MatchType"), matchtype);

	if (GEngine)
	{
		GEngine->AddOnScreenDebugMessage(
			-1,
			15.f,
			FColor::Cyan,
			FString::Printf(TEXT("ID : %s User : %s"), *Id, *User)
		);
	}

	if (matchtype == FString("FreeForAll") && User == FString("Something GOOD")) {
		if (GEngine)
		{
			GEngine->AddOnScreenDebugMessage(
				-1,
				15.f,
				FColor::Yellow,
				FString::Printf(TEXT("Joining Match Type: %s ID : %s User : %s"), *matchtype, *Id, *User)
			);
		}
		onlineSessionInterface->AddOnJoinSessionCompleteDelegate_Handle(joinSessionCompleteDelegate);

		const ULocalPlayer* localPlayer = GetWorld()->GetFirstLocalPlayerFromController();
		if (result.IsValid()) {
			if (GEngine)
			{
				GEngine->AddOnScreenDebugMessage(
					-1,
					15.f,
					FColor::Green,
					FString(TEXT("result is  valid"))
				);
			}
			onlineSessionInterface->JoinSession(*localPlayer->GetPreferredUniqueNetId(), NAME_GameSession, result);
		} else {
			if (GEngine)
			{
				GEngine->AddOnScreenDebugMessage(
					-1,
					15.f,
					FColor::Black,
					FString(TEXT("result is not valid"))
				);
			}
		}
	} else {
		if (GEngine)
		{
			GEngine->AddOnScreenDebugMessage(
				-1,
				15.f,
				FColor::Black,
				FString(TEXT("player  not found"))
			);
		}
	}

}

}

void AonlineGameCharacter::onJoinSessionComplete(FName sessionName, EOnJoinSessionCompleteResult::Type result)
{
if (!onlineSessionInterface.IsValid()) {
return;
}
FString address;
if (onlineSessionInterface->GetResolvedConnectString(NAME_GameSession, address)) {
if (GEngine)
{
GEngine->AddOnScreenDebugMessage(
-1,
15.f,
FColor::Yellow,
FString::Printf(TEXT(“Connect String: %s”), address)
);
}
APlayerController
playerController = GetGameInstance()->GetFirstLocalPlayerController();
if (playerController) {
playerController->ClientTravel(address, ETravelType::TRAVEL_Absolute);
}

}

}

//////////////////////////////////////////////////////////////////////////
// Input

void AonlineGameCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
// Set up action bindings
if (UEnhancedInputComponent* EnhancedInputComponent = Cast(PlayerInputComponent)) {

	// Jumping
	EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Started, this, &ACharacter::Jump);
	EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Completed, this, &ACharacter::StopJumping);

	// Moving
	EnhancedInputComponent->BindAction(MoveAction, ETriggerEvent::Triggered, this, &AonlineGameCharacter::Move);

	// Looking
	EnhancedInputComponent->BindAction(LookAction, ETriggerEvent::Triggered, this, &AonlineGameCharacter::Look);
}
else
{
	UE_LOG(LogTemplateCharacter, Error, TEXT("'%s' Failed to find an Enhanced Input component! This template is built to use the Enhanced Input system. If you intend to use the legacy system, then you will need to update this C++ file."), *GetNameSafe(this));
}

}

void AonlineGameCharacter::Move(const FInputActionValue& Value)
{
// input is a Vector2D
FVector2D MovementVector = Value.Get();

if (Controller != nullptr)
{
	// find out which way is forward
	const FRotator Rotation = Controller->GetControlRotation();
	const FRotator YawRotation(0, Rotation.Yaw, 0);

	// get forward vector
	const FVector ForwardDirection = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X);

	// get right vector 
	const FVector RightDirection = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y);

	// add movement 
	AddMovementInput(ForwardDirection, MovementVector.Y);
	AddMovementInput(RightDirection, MovementVector.X);
}

}

void AonlineGameCharacter::Look(const FInputActionValue& Value)
{
// input is a Vector2D
FVector2D LookAxisVector = Value.Get();

if (Controller != nullptr)
{
	// add yaw and pitch input to controller
	AddControllerYawInput(LookAxisVector.X);
	AddControllerPitchInput(LookAxisVector.Y);
}

}

and now i am using advanced session plugin and everything is fine so something is wrong about my code not network or steam problem