natepac / playfabmirrorgameexample

Example game using Mirror within Unity running on top of PlayFab hosting
105 stars 33 forks source link

Deployment(s) was not found in any of the regions specified #2

Open oldmilk opened 4 years ago

oldmilk commented 4 years ago

Greetings, I am new to Playfab.

After I followed everything from the example doc, I got a "Null" error log and cannot get any messages about the IP and port.

I have checked the error message from PlayfabError object, I got "Deployment(s) {XXX} was not found in any of the regions specified {EastUS}".

I am not sure which parts I have missed.

natepac commented 4 years ago

Sounds like something is missed in what you specified for the region of where the server is deployed for. I haven't gotten this report from anyone else, so I would go through the doc again step by step to make sure something wasn't missed. Also, use the code as is, don't update to the latest version of Mirror as it will break if you do that. That report I have gotten plenty of. ;-)

Good luck!

--Nate

On Mon, Sep 7, 2020 at 1:16 PM oldmilk notifications@github.com wrote:

Greetings, I am new to Playfab.

After I followed everything from the example doc, I got a "Null" error log and cannot get any messages about the IP and port.

I have checked the error message from PlayfabError object, I got "Deployment(s) {XXX} was not found in any of the regions specified {EastUS}".

I am not sure which parts I have missed.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/natepac/playfabmirrorgameexample/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE5SAGRQ7WG5EEABBXNVVLSEUPQRANCNFSM4Q6WVI5Q .

shaunbevan commented 4 years ago

If you're running into this error, make sure that you're logged into the Playfab SDK in Unity and have selected the studio that has the uploaded server build.

haebichan commented 4 years ago

@natepac I'm having the same issues as OP here. When I click the login button, I get Null as PlayFabError on the OnRequestMultiplayerServerError function. The specific error message is:

MultiplayerServerTooManyRequests, MultiplayerServerTooManyRequests - NoHostsAvailableInRegion - No Hosts available in regions 'EastUs', please retry., 429 429)

I was browsing through this issue online and found that you yourself had this problem: https://community.playfab.com/questions/39186/multiplayerservertoomanyrequests.html

You say that the answer is to "make sure your Servers are exited when you have no more players in the game." Can you tell me how to do this? The game is deployed correctly (deployed as status). And I copied the correct build ID.

Also, there are some issues with the playfab example game you uploaded. The login button was not attached to anything (made no changes to the game myself), so I had to attach ClientStartUp.OnLoginUserButtonClick myself. It this supposed to happen?

I'm not sure what @shaunbevan means by logging into Playfab SDK in Unity to select studio with uploaded server build. Can you clarify what this means?

nategametaco commented 4 years ago

Per your Error: It's been a while (I haven't looked into this in months) but I believe this has to do with you calling the request multiplayer server too many times. You want to copy down the IP address and other info and input it into your code for that session. You will have to call request multiplayer server again at another time (say an hour or whatever) I know this is ridiculous, but it's just an example. The real implementation should use their match making service, which I haven't done yet or documented.

My documentation and example should be complete as is. If you had to wire up the login button, this is the first I have heard of it. I could have missed it though...

I would go through the document again, it should get you up and running out of the box.

Logging into the PlayFab SDK probably has to do with the in-editor UI to login to PlayFab. Or he means, you need to login to PlayFab via code before making PlayFab calls.

shaunbevan commented 4 years ago

You are getting this error because you are not logged into your PlayFab account via Unity and have not selected the correct title that has your server and region.

Make sure you log into the Playfab SDK in-editor UI and select your studio and title, as shown in the image below. https://docs.microsoft.com/en-us/gaming/playfab/sdks/unity3d/media/save-title-settings-uedex.png

haebichan commented 4 years ago

@nategametaco Ah that was a dumb mistake. @shaunbevan was right, I didn't log into Playfab account, I thought the demo already had that taken care of (the error message was not clear). I received the ip and port # but I'm now getting a new error now: network_set_send_buffer_size failed: ENOBUFS. Not quite sure what that means.

If you guys don't mind I have another quick question to both of you @nategametaco and @shaunbevan, as you guys seem to be veterans. Ultimately, I'm trying to have my Mirror multiplayer game be hosted on WebGL. Can this be done through Playfab? If so, what's the procedure for doing so (or is there a link to any resource)? I'm unable to find any clear resource that tell me step-by-step process of hosting multiplayer Unity game using Mirror through WebGL.

Currently, I was hosting my game on AWS EC2 (storing a server build of the game on AWS), and connecting a local build of the game directly to the EC2 through its URL. This part is quite simple, but if I were to connect WebGL version of the game to the EC2, instead of a local Mac/PC build, the web version cannot connect to the EC2 instance. I was reading online saying that Playfab might be able to do this, but again, no clear answers. If there's any help to this, I would seriously appreciate it. Thank you!!

nategametaco commented 4 years ago

I have not worked with WebGL and Mirror yet. If and when I do, I will update my documentation and example. It would be a different transport layer, so I would check out what Mirror has in terms of this. I would also join their Discord if you haven't already. There are good peeps on there that will know what's up.

qarbonblack commented 3 years ago

hi everyone, if you still got a null in the RequestMultiplayerServerResponse despite having the correct region specified, I found it was fixed for me when I did this: During development, allow clients to start the game, in other words, allow the client with a new SessionId, turn the StandingBy server to Active by calling the RequestMultiplayerServer function.

For that, go to the gear next to your title > Title settings > API Features > check Allow client to start games > Save. Note: this change will be effective only after some time.https://www.gamebackend.dev/2021/01/24/building-your-first-online-multiplayer-game-in-unity-5-steps-with-playfab-server-hosting/