question

clementgrenier avatar image
clementgrenier asked

Error on Login - [Service Unavailable 409 : Conflict]

Hi,

We have a problem with LoginWithCustomID returning [Service Unavailable 409 : Conflict] for a specific android device (it works well with our other devices). Device model is a Galaxy Note 4, if it might help.

The problem is cross title, as it applies for at least 2 of our Title ID : 1D34 or ED3B

We are using Unity SDK and here's how we're calling the API (with information in comments) :

LoginWithCustomID :

private void LoginWithCustomID(string pDeviceId)
{
    PlayFabClientAPI.LoginWithCustomID(new LoginWithCustomIDRequest
    {
        TitleId = PlayFabSettings.TitleId, // PlayFabSettings.TitleId = 1D34 or ED3B
        CustomId = pDeviceId, // pDeviceId = 91f5df62d1ccf201ded989c40c5df5ee
        CreateAccount = true
    }, OnLoginSuccessCallback, OnErrorCallback);
}

OnErrorCallback:

private void OnErrorCallback(PlayFabError error)
{
    if (error != null)
        Debug.LogError("[" + error.Error + "][" + error.ErrorMessage + "][" + error.ErrorDetails + "][" + error.HttpCode + "][" + error.HttpStatus + "]);
        // Result = 
        // error.Error         = ServiceUnavailable
        // error.ErrorMessage  = 409 : Conflict
        // error.ErrorDetails  = (empty)
        // error.HttpCode      = 503
        // error.HttpStatus    = Service Unavailable
}

Do you have any hints on what could cause this error ?

Thanks

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

A 409 Conflict error indicates that there were concurrent attempts to update the same data at the same time, and that the second update was rejected. Can you review the login logic flow, to make sure there aren't two simultaneous requests being sent?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

clementgrenier avatar image
clementgrenier answered

Hi, thanks for your answer.

I double checked the process and we're not sending multiple login request.

In fact, I tried to connect to TitleIDs than are ours and it worked (login succeeded).

This seemd to be related to our studio account specifically.

Do you know what could trigger this behavior for all titles of a specific studio ?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

There's no difference in how requests are handled based on title or studio, so if you're seeing this in a title in one studio, I would expect the same code to produce the same result in a title in any other studio. If you're still seeing this, what I would recommend is getting a Netmon or Wireshark capture of the session, so that we can review the specific details of the calls being made and the responses.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

pixelcombats avatar image
pixelcombats answered

@Brendan I have a same error. What the words mean: same data at the same time. What is considered to be the same data? And how much time should be the same? How long should I wait after a request? I have a piece of code. Can he be considered as the procedures at one and the same time. If yes, how to alter it so that it was not.

 public void GetNamesAndLoadAllMaps()
  {
  GetTitleDataRequest request = new GetTitleDataRequest()
  {
  };
  PlayFabClientAPI.GetTitleData(request, (result) =>
  {
  Debug.Log("Got user data:");
  if ((result.Data.Count > 0))
  {
  string[] AllMaps = result.Data["Maps"].Split(',');
  foreach (string NameMap in AllMaps)
  {
  MapBrowser.Instance.GetAllMapsFromWWW(NameMap);
  }
  MapBrowser.Instance.Invoke("GetAllMaps", 5.0F);
  }
  else
  {
  Debug.Log("Maps names is empty");
  }
  }, (error) =>
  {
  Debug.Log("Got error setting user data Ancestor to Arthur");
  Debug.Log(error.ErrorDetails);
  PLobby.Instance.ShowErrorWindow(error.ErrorMessage);
  });
  }
public void GetAllMapsFromWWW(string Dir)
  {
  LogIn.Instance.GetMapsInfo(Dir, "0,0,0,.region");
  LogIn.Instance.GetMapsInfo(Dir, "0,0,-1,.region");
  LogIn.Instance.GetMapsInfo(Dir, "0,-1,0,.region");
  LogIn.Instance.GetMapsInfo(Dir, "0,-1,-1,.region");
  LogIn.Instance.GetMapsInfo(Dir, "-1,0,0,.region");
  LogIn.Instance.GetMapsInfo(Dir, "-1,0,-1,.region");
  LogIn.Instance.GetMapsInfo(Dir, "-1,-1,0,.region");
  LogIn.Instance.GetMapsInfo(Dir, "-1,-1,-1,.region");
  LogIn.Instance.GetMapsInfo(Dir, "Image.png");
  }

public void GetMapsInfo(string Dir, string File)
  {
  GetContentDownloadUrlRequest request = new GetContentDownloadUrlRequest()
  {
  Key = Dir+"/"+File
  };
  PlayFabClientAPI.GetContentDownloadUrl(request, (result) =>
  {
  if (MapBrowser.Instance)
  StartCoroutine(MapBrowser.Instance.GetMapFromWWW(result.URL,Dir, File));
   
  }, (error) =>
  {
  Debug.Log("Got error get data");
  Debug.Log(error.ErrorDetails);
  PLobby.Instance.ShowErrorWindow(error.ErrorMessage);
  });
  }
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered
@pixelcombats

Specifically which API call is returning the 409 error, in your case?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.