Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FindSessions returns EOS_InvalidParameters on first run #41

Open
xuelongmu opened this issue Jul 17, 2020 · 0 comments
Open

FindSessions returns EOS_InvalidParameters on first run #41

xuelongmu opened this issue Jul 17, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@xuelongmu
Copy link

Environment

Project Version: 0.0.3
EOS SDK Version: 1.7.0
Unreal Engine Version: 4.24.3

Other software/plugins that *might* be the cause of the issue?

Steps to reproduce

  1. Login via AccountPortal
  2. Create new SearchSettings object and call FindSessions. These were my settings:
    bIsLanQuery = false;
    MaxSearchResults = 10;
    PingBucketSize = 1000;
    QuerySettings.Set(FName(TEXT("bUsesStats")), false, EOnlineComparisonOp::Equals);

Expected behaviour

Return successful search with empty results.

Actual behaviour

On the first run, when setting the custom bUsesStats search parameter in the UpdateSessionSearchParameters method in OnlineSessionInterfaceEpic.cpp, the following line creates an EOS_InvalidParameters error:
EOS_SessionSearch_SetParameter(eosSessionSearch, &eosParam);

In order to make the error more visible, I modified the line and added a check as follows:

auto eosResult = EOS_SessionSearch_SetParameter(eosSessionSearch, &eosParam);
if(eosResult!=EOS_EResult::EOS_Success)
{
    error = FString::Printf(TEXT("Cannot update search setting: %s - Error Code: %s"), *param.Key.ToString(), UTF8_TO_TCHAR(EOS_EResult_ToString(eosResult)));
}

which gave the following log output:
LogOnlineSession: Warning: OSS: Cannot update search setting: bUsesStats - Error Code: EOS_InvalidParameters

The second time I call FindSessions, there is no error and the search completes successfully with empty results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant