Unity-Technologies/com.unity.multiplayer.samples.coop

Can't create a lobby.

06142022 opened this issue · 11 comments

Describe the bug

When I press the create button to create a lobby nothing happens. I made builds for mac and also in the editor but both just show the loading for a split second and do nothing. I already switched on Relay and Lobby services and installed Git Large Files Support. This is for when you press the Start button and then attempt to create a lobby.

To Reproduce
Steps to reproduce the behavior:

  1. Press play on the editor. Click Create Lobby. Type in name and click Create.

Expected behavior
I expected a lobby to be created and to go to character selection like in a video I saw on youtube.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: macOS Monterey
  • Unity Version: 2020.3.33f1
  • BossRoom Version: com.unity.multiplayer.samples.coop-1.2.0-pre

Additional context
I was able to test multiple local instances of Dilmers project https://github.com/dilmerv/UnityMultiplayerPlayground. But I can't paste trying to create a local lobby for this Boss Room sample.

Hi, @06142022, thank you for raising this. We're looking into this issue. For internal tracking: https://jira.unity3d.com/browse/MTT-3874.

mmtmn commented

The problem still persists, is there any way to bump this up to a high priority bug in the tags?

Hi @mmtmn,

Out of curiosity, did you make sure to enable Lobby as a service, as well as step into the "Get Started" page inside the Unity Dashboard?

You'll turn on the Lobby service like so:
image (3)

However, you must click on "Get Started" in order to actually enable Lobby:
image (4)

This is a UX issue that the Lobby team is actively looking into.

If this doesn't resolve your issue, and you've already gone through these steps, could you provide console logs / screenshots of what you're encountering, so we know where to look?

Thanks.

That's weird I turned on those switches a few days ago and it wasn't working but I checked right now and I had to turn on both switches again. It must have been reset on the Unity servers or I did it wrong. I can create a lobby now. But now I ran into a new problem. I can get two players to work only if one of them is the editor and the other a build instance. But if I try to connect two build instances the second player gets an error.
github_00
github_01

It says: "Got service error player is already a member of the lobby (HTTP/1.1 409 Conflict) with LobbyConflict. Possible conflict cause. Trying to play with two builds on the same machine. Please use command line arg '-AuthProfile someName' to set a different auth profile."

I usually just use "open -n BossRoom.app" in the terminal twice to open multiple instances on my mac. I was trying to google an example of how to use "-Auth profile" in the mac terminal but I couldn't find any. I saw that "-Auth profile" was mentioned in https://forum.unity.com/threads/boss-room-multiplayer-sample-early-access-is-live.1089187/. But I don't know how to use this line. Also should this be created as a new issue and this issue be closed? Thank you.

Hi @06142022,

BossRoom uses the authentication service, which associates a player ID to players when signing in. Since we use anonymous sign-in, every instance of the game that you open will be signed in with the same ID. This is what generates the conflict preventing you from joining a lobby.

We added the "-AuthProfile someName" command line argument to allow users to connect to the same lobby from multiple local builds. It uses profiles which allows you to have a different player ID. It is simply an argument you would add at the end of your command, so in your case, that should be "open -n BossRoom.app -AuthProfile someName".

However, since that was not an ideal flow, we also added a way to switch profiles in the game itself. Simply use the "Change Profile" button in the main menu to open the profile selection window. This feature was added as part of the latest 1.3.0 release.

The message in the popup should also be clearer now and properly explain how to use profiles.

I put "open -n BossRoom.app -AuthProfile someName" in my terminal and got this.
github_02

I'm not sure what to do here so I guess I'll give 1.3.0 a try.

mmtmn commented

Hi @mmtmn,

Out of curiosity, did you make sure to enable Lobby as a service, as well as step into the "Get Started" page inside the Unity Dashboard?

You'll turn on the Lobby service like so: image (3)

However, you must click on "Get Started" in order to actually enable Lobby: image (4)

This is a UX issue that the Lobby team is actively looking into.

If this doesn't resolve your issue, and you've already gone through these steps, could you provide console logs / screenshots of what you're encountering, so we know where to look?

Thanks.

Hey, thanks for the quick reply. Yes, we have lobby and relay turned on (we had to put in a payment option after release), but this problem started to happen when relay was released:

image
image

mmtmn commented

here is the entire error log:

Relay join failed: Creating join code request has failed:
Not Found: join code not found
UnityEngine.Debug:Log (object)
Unity.Multiplayer.Samples.BossRoom.Visual.LobbyUIMediator:g__OnRelayJoinFailed|24_0 (string) (at C:/Work/com.unity.multiplayer.samples.coop/Assets/BossRoom/Scripts/Client/UI/Lobby/LobbyUIMediator.cs:212)
Unity.Multiplayer.Samples.BossRoom.Client.ClientGameNetPortal/d__22:MoveNext () (at C:/Work/com.unity.multiplayer.samples.coop/Assets/BossRoom/Scripts/Shared/Net/ConnectionManagement/ClientGameNetPortal.cs:210)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<System.ValueTuple6<string, uint16, byte[], byte[], byte[], byte[]>>:SetException (System.Exception)
Unity.Multiplayer.Samples.BossRoom.UnityRelayUtilities/d__2:MoveNext () (at C:/Work/com.unity.multiplayer.samples.coop/Packages/com.unity.multiplayer.samples.coop/Utilities/Net/UnityRelayUtilities.cs:66)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<Unity.Services.Relay.Models.JoinAllocation>:SetException (System.Exception) Unity.Services.Relay.WrappedRelayService/<JoinAllocationAsync>d__8:MoveNext () (at C:/Work/com.unity.multiplayer.samples.coop/Library/PackageCache/com.unity.services.relay@1.0.2/Runtime/SDK/WrappedRelayService.cs:171) System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<Unity.Services.Relay.Response1<Unity.Services.Relay.Models.JoinResponseBody>>:SetException (System.Exception) Unity.Services.Relay.Apis.RelayAllocations.RelayAllocationsApiClient/<JoinRelayAsync>d__9:MoveNext () (at C:/Work/com.unity.multiplayer.samples.coop/Library/PackageCache/com.unity.services.relay@1.0.2/Runtime/Apis/RelayAllocationsApi.cs:186) System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<Unity.Services.Relay.Http.HttpClientResponse>:SetResult (Unity.Services.Relay.Http.HttpClientResponse)
Unity.Services.Relay.Http.HttpClient/d__1:MoveNext () (at C:/Work/com.unity.multiplayer.samples.coop/Library/PackageCache/com.unity.services.relay@1.0.2/Runtime/Http/HttpClient.cs:39)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<Unity.Services.Relay.Http.HttpClientResponse>:SetResult (Unity.Services.Relay.Http.HttpClientResponse) Unity.Services.Relay.Http.HttpClient/<CreateWebRequestAsync>d__3:MoveNext () (at C:/Work/com.unity.multiplayer.samples.coop/Library/PackageCache/com.unity.services.relay@1.0.2/Runtime/Http/HttpClient.cs:77) System.Runtime.CompilerServices.AsyncTaskMethodBuilder1<Unity.Services.Relay.Http.HttpClientResponse>:SetResult (Unity.Services.Relay.Http.HttpClientResponse)
Unity.Services.Relay.Http.HttpClient/<>c__DisplayClass3_0/<b__0>d:MoveNext () (at C:/Work/com.unity.multiplayer.samples.coop/Library/PackageCache/com.unity.services.relay@1.0.2/Runtime/Http/HttpClient.cs:74)
System.Threading.Tasks.TaskCompletionSource`1<Unity.Services.Relay.Http.HttpClientResponse>:SetResult (Unity.Services.Relay.Http.HttpClientResponse)
Unity.Services.Relay.Http.UnityWebRequestHelpers/<>c__DisplayClass0_0:b__0 (UnityEngine.AsyncOperation) (at C:/Work/com.unity.multiplayer.samples.coop/Library/PackageCache/com.unity.services.relay@1.0.2/Runtime/Http/UnityWebRequestHelpers.cs:34)
UnityEngine.AsyncOperation:InvokeCompletionEvent ()

mmtmn commented

Also, I realized our error is slightly different, we can create a lobby, we just can't join the lobby with unity relay (IP joining works). Should I create a new issue for this?

Also, I realized our error is slightly different, we can create a lobby, we just can't join the lobby with unity relay (IP joining works). Should I create a new issue for this?

Maybe. I gave up on the v1.2.0-pre release and downloaded the v1.3.0-pre Source code (zip) folder. This one works for me but I can't connect editor to a build. It has to be build to build or editors using clones with parallel sync.