Android <-> iOS Cross platform lobby making broken after 1.16.1 to 1.17.1.3 update

We recently updated our Epic Online Services SDK from 1.16.1 to 1.17.1.3. After making the necessary updates and fixes, we were able to get our multiplayer flow up and running again, but only between Android devices.

When we try to create a lobby on an Android device and join from an iOS device (or vice versa), we can’t find the lobby.

I have tried the following things:

  • Change EOS_Lobby_CreateLobbyOptions and EOS_Lobby_JoinLobbyOptions by setting bCrossplayOptOut to false.
  • Change EOS_Lobby_CreateLobbyOptions and EOS_Lobby_JoinLobbyOptions by setting bPresenceEnabled to false in both (instead of true)
  • Changing EOS_Lobby_CreateLobbyOptions by setting the allowed platformIds as shown in the snippet below.
    • This creates a warning: LogEOS: Warning: LogEOSLobby: Error response received from backend. StatusCode=[400], ErrorCode=[errors.com.epicgames.lobbies.invalid_session], ErrorMessage=[AllowedPlatforms contains an unknown value, supported values are HashSet(0, 2000, 3000, 4000, 1000)]
    • EOS_OPT_Epic is 100. Shouldn’t that be a valid platform?
  • Changing EOS_Lobby_CreateLobbyOptions by setting the platformIds to EOS_OPT_Android and EOS_OPT_IOS, but those do not exist
  • Explicitly setting AllowedPlatformIds to nullptr and AllowedPlatformIdsCount to 0 in EOS_Lobby_CreateLobbyOptions.

Snippet

TArray<uint32> AllowedPlatforms;
AllowedPlatforms.Add(EOS_OPT_Epic);

CreateOptions.AllowedPlatformIds = AllowedPlatforms.GetData();
CreateOptions.AllowedPlatformIdsCount = AllowedPlatforms.Num();

CreateOptions.bCrossplayOptOut = false;

Sadly, none of these issues seem to have fixed the issue.

This is how we create a lobby:

EOS_Lobby_CreateLobbyOptions CreateOptions = {};
CreateOptions.ApiVersion = EOS_LOBBY_CREATELOBBY_API_LATEST;
CreateOptions.LocalUserId = CurrentUserProductId;
CreateOptions.MaxLobbyMembers = Lobby.MaxNumLobbyMembers;
CreateOptions.PermissionLevel = Lobby.Permission;
CreateOptions.bPresenceEnabled = true;
CreateOptions.bAllowInvites = true;
CreateOptions.BucketId = BucketString;
CreateOptions.bDisableHostMigration = false;
CreateOptions.bEnableRTCRoom = false;
CreateOptions.LocalRTCOptions = nullptr;
CreateOptions.LobbyId = nullptr;
CreateOptions.bEnableJoinById = true;
CreateOptions.bRejoinAfterKickRequiresInvite = false;

EOS_Lobby_CreateLobby(LobbyHandle, &CreateOptions, nullptr, OnCreateLobbyFinished);

We search for the lobby using:

TArray<FLobbyAttribute> Attributes;

FLobbyAttribute Attribute;
Attribute.Key = TCHAR_TO_UTF8(*PropertyName.ToUpper());
Attribute.Visibility = EOS_ELobbyAttributeVisibility::EOS_LAT_PUBLIC;
Attribute.ValueType = FLobbyAttribute::Type::String;
Attribute.AsString = TCHAR_TO_UTF8(*JoinCode);

Attributes.Add(Attribute);



EOS_Lobby_CreateLobbySearchOptions CreateSearchOptions = {};
CreateSearchOptions.ApiVersion = EOS_LOBBY_CREATELOBBYSEARCH_API_LATEST;
CreateSearchOptions.MaxResults = MaxNumResults;

EOS_HLobbySearch LobbySearch = nullptr;
EOS_EResult Result = EOS_Lobby_CreateLobbySearch(LobbyHandle, &CreateSearchOptions, &LobbySearch);
if (Result != EOS_EResult::EOS_Success)
{
  UE_LOG_LOBBY(Error, TEXT("Could not create search. Error code: %s"), *FString(EOS_EResult_ToString(Result)));
  return;
}

EOS_LobbySearch_SetParameterOptions ParamOptions = {};
ParamOptions.ApiVersion = EOS_LOBBYSEARCH_SETPARAMETER_API_LATEST;
ParamOptions.ComparisonOp = EOS_EComparisonOp::EOS_CO_EQUAL;

EOS_Lobby_AttributeData AttrData;
AttrData.ApiVersion = EOS_LOBBY_ATTRIBUTEDATA_API_LATEST;
ParamOptions.Parameter = &AttrData;

for (const FLobbyAttribute& NextAttr : SearchAttributes)
{
  AttrData.Key = NextAttr.Key.c_str();

  switch (NextAttr.ValueType)
  {
    case FLobbyAttribute::String:
      AttrData.ValueType = EOS_ELobbyAttributeType::EOS_AT_STRING;
      AttrData.Value.AsUtf8 = NextAttr.AsString.c_str();
      break;
  }

  Result = EOS_LobbySearch_SetParameter(LobbySearch, &ParamOptions);
  if (Result != EOS_EResult::EOS_Success)
  {
    UE_LOG_LOBBY(Error, TEXT("Failed to update lobby search with parameter. Error code: %s"), *FString(EOS_EResult_ToString(Result)));
    return;
  }
}

EOS_LobbySearch_FindOptions FindOptions = {};
FindOptions.ApiVersion = EOS_LOBBYSEARCH_FIND_API_LATEST;
FindOptions.LocalUserId = CurrentUserProductId;
EOS_LobbySearch_Find(LobbySearch, &FindOptions, nullptr, OnLobbySearchFinished);

Why would our lobby search have broken from this update, but only in cross platform?

Hello! To troubleshoot this, could you please run through the following checks:

  1. Confirm that both the Android and iOS builds are using the same EOS SDK binary and/or header versions.
  2. Confirm that the LobbySearch contains at least one valid search attribute.
  3. Confirm what the BucketString is set to, as this may contain platform or version-specific identifiers.

Additionally, it may be worth running the Samples included with the C SDK or using the Developer Portal to confirm that the lobby is visible.

Please let us know if you continue to see issues, and feel free to raise a private discussion if you would like to share sensitive logs.

Hi,

Thank you for your response.

When I updated to the new EOS SDK version, I also deleted the old version, so if one of the two was still referencing the old version, it shouldn’t have been able to build. I did double check in case I downloaded the wrong version to update to, but I can confirm it is the same.

Given the fact that multiplayer between Android devices works, I feel like #2, #3, and the lobby visibility shouldn’t matter if Android is hosting and the code is the same between platforms, right?

I had a look through all the code for creating and searching for lobbies to see if we have any differences between Android and iOS code. I could not find any in:

EOS_Lobby_CreateLobbyOptions

EOS_Lobby_CreateLobby

EOS_Lobby_CreateLobbySearchOptions

EOS_HLobbySearch

EOS_Lobby_CreateLobbySearch

Are there any other calls that would be relevant for this issue?

One more thing I investigated is that I checked with API versions changed between 1.16.1 and 1.17.1.3. Our list is the following:

EOS_LOBBY_CREATELOBBY_API_LATEST

EOS_LOBBY_JOINLOBBY_API_LATEST

EOS_ECOM_QUERYENTITLEMENTS_API_LATEST

EOS_IOS_AUTH_CREDENTIALSOPTIONS_API_LATEST

Is that a complete list, or are we potentially missing some? Additionally, would changes in any of those explain the issue?

Our calls to these APIs compiled just fine after updating the API version, but I am wondering if there are any breaking changes in these that could cause this issue.

Kind regards,

Jimmy Koene

Hi Jimmy,

You’re correct; one of the reasons we perform these kinds of checks is to ensure that the code paths are consistent across platforms.

“I feel like #2, #3, and the lobby visibility shouldn’t matter if Android is hosting and the code is the same between platforms, right?”

Along with differing code paths, another common issue during cross-platform testing is a difference in Sandbox/Deployment IDs passed to the SDK.

This results in similar issues, where one platform can create and join lobbies successfully, while the other is unable to search for or join them.

As for changes, it looks like 1.16.4-CL36651368 brought in a breaking change relating to the moving of these definitions, but I don’t think that this is directly the issue.

*"*Breaking change: Moved three platform defines from eos_[PLATFORM]_types.h to eos_common.h.

(For additional information, see the following section of the release notes: Upgrade Notes - EOS Core - Breaking change-platform defines for additional information.)"

Could you please try the following troubleshooting step?

  1. Enable verbose SDK logging and confirm via logs that both builds are creating the EOS Platform with the same IDs.
  2. Omit the AllowedPlatformIds from your CreateOptions. When this is null, the lobby will be unrestricted. (I’m not sure if this was originally attempted.)

If you’re still running into issues, use the Developer Portal and/or Lobbies Sample to verify that the Lobbies are created as expected and accessible on other platforms.

Kind regards,

Ieuan

deleted

Hi Ieuan,

Apologies for the slow response. I was waiting for QA to confirm my fix.

Thank you for confirming there are no breaking changes related to this issue as it led me to the cause.

After enabling verbose SDK logging, I found out that our version system was somehow providing iOS with the wrong version number, making the lobbies incompatible. This broke around the same time as our SDK update even though it has nothing to do with the EOS SDK itself.

Kind regards,

Jimmy Koene