EOS callbacks are not working

I am trying to connect users to EOS by just requiring generated device id so they can easily play without account. My problem can be partially briefed as callback for EOS_Connect_CreateDeviceId is not firing anything. Additionaly, EOS_Auth_Login’s callback is not event work. I run the game on standalone-game option.

UE:4.27.2
EOS SDK: default version for UE4.27

Source page that explains what I want to do: https://dev.epicgames.com/docs/en-US/api-ref/functions/eos-connect-create-device-id

Here I found a post which claims this is a bug in UE4.27:
https://eoshelp.epicgames.com/s/article/Why-is-the-EOS-Auth-Login-callback-not-triggered?language=en_US

These codes:
EOS_Connect_CreateDeviceId(ConnectHandle, &Options, nullptr, &OnCreateDeviceIdCallback);

EOS_Auth_Login(AuthHandle, &LoginOptions, nullptr, [](const EOS_Auth_LoginCallbackInfo* Data){ /*PRINT*/});
not firing any callback.

static void OnCreateDeviceIdCallback(const EOS_Connect_CreateDeviceIdCallbackInfo* Data)
{
	UE_LOG(LogTemp, Log, TEXT("-test-"));

	if (Data->ResultCode == EOS_EResult::EOS_Success)
	{
		UE_LOG(LogTemp, Log, TEXT("Device ID successfully created."));
	}
	else
	{
		UE_LOG(LogTemp, Log, TEXT("Failed to create Device ID"));
	}

}

void UEOSActorComponent::EOS_ConnectWithDeviceID(FString client_id, FString client_secret)
{
	// Platform seçeneklerini ayarla
	EOS_Platform_Options PlatformOptions = {};
	EOS_Platform_ClientCredentials client_credentials;

	client_credentials.ClientId = TCHAR_TO_ANSI(*client_id);
	client_credentials.ClientSecret = TCHAR_TO_ANSI(*client_secret);

	PlatformOptions.ApiVersion = EOS_PLATFORM_OPTIONS_API_LATEST;
	PlatformOptions.ProductId = "**********************";
	PlatformOptions.SandboxId = "*********************";
	PlatformOptions.DeploymentId = "*********************";
	PlatformOptions.ClientCredentials = client_credentials;
	PlatformOptions.bIsServer = false;
	
	PlatformOptions.EncryptionKey = "0000000000000000000000000000000000000000000000000000000000000000";

	
	PlatformHandle = EOS_Platform_Create(&PlatformOptions);

	if (PlatformHandle) {

		UE_LOG(LogTemp, Log, TEXT("Handle created."));
		ConnectHandle = EOS_Platform_GetConnectInterface(PlatformHandle);

		if (ConnectHandle)
		{
			UE_LOG(LogTemp, Log, TEXT("CREATING DEVICE..."));

			EOS_Connect_CreateDeviceIdOptions Options = {};
			Options.ApiVersion = EOS_CONNECT_CREATEDEVICEID_API_LATEST;
			Options.DeviceModel = "TestDeviceModel"; 

			UE_LOG(LogTemp, Log, TEXT("CREATING DEVICE-ID..."));

			EOS_Connect_CreateDeviceId(ConnectHandle, &Options, nullptr, &OnCreateDeviceIdCallback);


			UE_LOG(LogTemp, Log, TEXT("DEVICE CREATED ???"));


		}
		else
		{
			UE_LOG(LogTemp, Error, TEXT("Failed to get Connect interface from EOS Platform."));
		}
	}
	else
	{
		UE_LOG(LogTemp, Log, TEXT("Handle not created."));
	}
}

I can see some activity on portal after I run the game in editor several times:

What I need to do?

I think I found the reason after searching a day. You need to call EOSPlatformTick() method or corresponding method.

NOTE: I switched to UE5 see if it works and it did work too untill I added

EOS_Platform_Tick( EOS_HPlatform );

void AMyPlayerController::EOSMyPlatformTickMethod()
{
	if (PlatformHandle)
	{
		EOS_Platform_Tick(PlatformHandle);
	}
}

In the end I got the callback message for:

EOS_Connect_OnCreateDeviceIdCallback OnCreateDeviceIdCallback_eos = [](const EOS_Connect_CreateDeviceIdCallbackInfo* Data) { UE_LOG(LogTemp, Log, TEXT("<--callback-triggered-->")); };

eos_platform_Tick

Final output on log:

[2024.08.31-14.58.23:470][126]LogTemp: Successfully logged in with Device ID.
[2024.08.31-14.58.23:640][143]LogEOSSDK: Warning: LogEOSConnect: FConnectClient::ResolveProductUserIdMappingPrivate - GetProductUserExternalAccountIdPrivate Failed
[2024.08.31-14.58.24:197][199]LogEOSSDK: LogEOSMessaging: Successfully connected to Stomp. LocalUserId=[000...9ah]

I follow these BP callable C++ methods:
EOS_Initialize → EOS_ConnectCreateDeviceID → EOS_ConnectLogin->EOS_CrateSession->EOS_UpdateSession->EOS_StartSession

If deviceID already created it will not throw EOS_ERESULT::EOS_Success so to coninue add extra condition "...|| EOS_EResult::EOS_DuplicateNotAllowed"

If eos already configured it will throw "EOS_EResult::EOS_AlreadyConfigured" so do proper modifications and continue execution.

I did more tests and modification today(1.09.2024) here is results:

[2024.09.01-08.24.13:843][177]LogBlueprintUserMessages: [EOSPlayerControllerBP_C_0] Session Creted-> Session Id: 0********a54******************a, Session Name: Gomi******Session
[2024.09.01-08.24.13:971][190]LogEOSSDK: LogEOSMessaging: Successfully connected to Stomp. LocalUserId=[000...**b]
[2024.09.01-08.24.14:051][198]LogTemp: EOS SESSION STARTED - CODE: [0]

Here CODE: [0] means success.

Here we can see the bucket:

Here we can see the session is started:

1 Like