Giter Club home page Giter Club logo

amazon-gamelift-ultrafrogroyale-large-match-sample's Issues

Matchmaking ticket is in PLACING status and cannot be canceled.

Hi Team, we've followed all the steps as per documentation to run the sample. But now we're facing an error in lambda of matchmaking failed. I'm attaching the screenshot of the error as well.

Error is like:

Error in Lambda assume matchmaking failed: {"message":"Matchmaking ticket is in PLACING status and cannot be canceled.","code":"InvalidRequestException","time":"2020-01-17T12:21:17.325Z","requestId":"499c4016-e005-4aa4-a164-b54cbbcb558c","statusCode":400,"retryable":false,"retryDelay":48.43038812741705}

UnityEngine.Debug:Log(Object)
GameNetworkManager:<FindMatch>b__12_0(AmazonServiceResult`2) (at 
Assets/GameNetworkManager.cs:154)
Amazon.Lambda.<>c__DisplayClass41_0:<InvokeAsync>b__0(AmazonWebServiceRequest, 
AmazonWebServiceResponse, Exception, AsyncOptions)
Amazon.Runtime.Internal.UnityMainThreadDispatcher:ProcessRequests()
Amazon.Runtime.Internal.UnityMainThreadDispatcher:Update()

image

Please help me out of it if you can. Thanks.

Sample uses authors Cognito unauth role without cross-account access to invoke a Lambda in the customer's account

We need to add instructions on how to create a Cognito Identity Pool in the user's account so the unauthenticated player can invoke the client service Lambda. Presently we get:

Amazon.Lambda.AmazonLambdaException: User: arn:aws:sts::768788344492:assumed-role/Cognito_UltraFrogBattleRoyaleAnonPoolUnauth_Role/CognitoIdentityCredentials is not authorized to perform: lambda:InvokeFunction on resource: arn:aws:lambda:us-east-1:768788344492:function:ConnectUltraFrogRoyaleClient ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown.
at Amazon.Runtime.Internal.UnityRequest.EndGetResponse (System.IAsyncResult asyncResult) [0x0000e] in <63c2de57b2a5496ca21edbdf1b5cf408>:0
at Amazon.Runtime.Internal.HttpHandler1[TRequestContent].GetResponseCallbackHelper (System.Object state) [0x00023] in <63c2de57b2a5496ca21edbdf1b5cf408>:0 --- End of inner exception stack trace --- at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleException (Amazon.Runtime.IExecutionContext executionContext, Amazon.Runtime.Internal.HttpErrorResponseException exception) [0x0013f] in <63c2de57b2a5496ca21edbdf1b5cf408>:0 at Amazon.Runtime.Internal.ExceptionHandler1[T].Handle (Amazon.Runtime.IExecutionContext executionContext, System.Exception exception) [0x00000] in <63c2de57b2a5496ca21edbdf1b5cf408>:0
at Amazon.Runtime.Internal.ErrorHandler.ProcessException (Amazon.Runtime.IExecutionContext executionContext, System.Exception exception) [0x0005c] in <63c2de57b2a5496ca21edbdf1b5cf408>:0
at Amazon.Runtime.Internal.ErrorHandler.InvokeAsyncCallback (Amazon.Runtime.IAsyncExecutionContext executionContext) [0x0002f] in <63c2de57b2a5496ca21edbdf1b5cf408>:0

Calling Lambda function for matchmaking yields an error

I followed the tutorial of the project and all went well until i tried to connect the client to the server. So when i try to run the client and press join match it will keep trying to connect to matchmaking using the lambda function and after the timeout period which is around 80 seconds it yields the following :
Function Error : Unhandled
Status code : 200
Payload : {"errorMessage":"2021-05-19T21:53:42.999Z bf608fda-5ea5-4bf4-a72f-e2b07021aca6 Task timed out after 80.08 seconds"}
For replicating it just follow the exact as the tutorial.
The same error happens when i try to test the lambda function from AWS console so i don't think it's a unity issue.

Is this best practice?

console.log("describeMatchmaking attempt #" + attempts);

According to AWS documentation, describeMatchmaking() is not meant to be continuously polled: https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeMatchmaking.html

"This operation is not designed to be continually called to track matchmaking ticket status. This practice can cause you to exceed your API limit, which results in errors. Instead, as a best practice, set up an Amazon Simple Notification Service to receive notifications, and provide the topic ARN in the matchmaking configuration. Continuously poling ticket status with DescribeMatchmaking should only be used for games in development with low matchmaking usage."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.