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

CreateSession returns EOS_InvalidParameters on first run #40

Closed
xuelongmu opened this issue Jul 17, 2020 · 8 comments
Closed

CreateSession returns EOS_InvalidParameters on first run #40

xuelongmu opened this issue Jul 17, 2020 · 8 comments
Labels
bug Something isn't working can't reproduce The issue cannot be reproduced with the given information

Comments

@xuelongmu
Copy link

xuelongmu commented Jul 17, 2020

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 session with following settings in FOnlineSessionSettings:
    NumPublicConnections = 4;
    NumPrivateConnections=0;
    bAllowJoinInProgress = true;
    bAllowInvites = true;
    bUsesPresence = true;
    bAllowJoinViaPresence = true;
    bAllowJoinViaPresenceFriendsOnly = false;
    bUsesStats = false;

and set BucketId from FString input parameter:
NewSessionSettings->Set(FName("BucketId"), BucketId, EOnlineDataAdvertisementType::ViaOnlineServiceAndPing);
3. Call CreateSession with the settings.

Expected behaviour

Successful creation of new session.

Actual behaviour

On first run, we get the error
[2020.07.17-04.41.49:918][733]LogOnlineSession: Warning: OSS: Cannot update setting: bUsesPresence - Error Code: EOS_InvalidParameters

The error occurs in the CreateSessionModificationHandle method of OnlineSessionInterfaceEpic. Specifically, on the following call to the EOS SDK:
eosResult = EOS_SessionModification_AddAttribute(ModificationHandle, &attrOpts);

On a hunch, I also tried to reorder the sequence of adding attributes, so that NumPublicConnections comes first, but with the same result.

On the second run, the session is created successfully.

@xuelongmu xuelongmu added the bug Something isn't working label Jul 17, 2020
@Ruhrpottpatriot
Copy link
Owner

Hmm... I can't reproduce the error. And while I found a small bug that the bShouldAdvertise parameter is stored as bUsesPresence I can successfully create the session. Could you provide a minimal working example and upload it to GoogleDrive/Dropbox/Onedrive/etc. ?

@xuelongmu
Copy link
Author

EOSDebugging.zip

I've uploaded a minimal working example here (without the Config or Plugins folders). The other bugs that I reported can also be found here. In order to use it, open the DefaultMap where there's a BP_MultiplayerTester actor on the level, and Play. The I key will login, O key will logout, N key will create a new session, and F key will find sessions. Let me know if this works, thanks!

@Ruhrpottpatriot
Copy link
Owner

I quickly ran you sample and I can create a session and it also shows on the EOS Dashboard as the following image shows:
Results

I have an important meeting tomorrow and I'll look into it in more detail after that.

@xuelongmu
Copy link
Author

xuelongmu commented Jul 28, 2020

Were you able to find the created session afterwards using the FindSessions method?

Also, were you able to create the session on the very first try, or did you have to run it twice?

@Ruhrpottpatriot
Copy link
Owner

Haven't tested a FindSession, but it shows up in the web interface on the first try.

@xuelongmu
Copy link
Author

I was also able to see it in the web interface without issue, but had no luck retrieving it with FindSessions.

@Ruhrpottpatriot
Copy link
Owner

I'll look into FindSessions tomorrow.

@Ruhrpottpatriot
Copy link
Owner

So I cannot reproduce the session creation bug. With your minimal working example everything works as expected. I can also not confirm #41, at least not like you wrote the bug report, I can however confirm another bug regarding to finding sessions.

@Ruhrpottpatriot Ruhrpottpatriot added the can't reproduce The issue cannot be reproduced with the given information label Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working can't reproduce The issue cannot be reproduced with the given information
Projects
None yet
Development

No branches or pull requests

2 participants