question

jferano avatar image
jferano asked

Client UnlockContainer returns 500 error

Here's the code from Unity

public void UnlockContainer(string containerId,
                            Action<List<InventoryItem>> success,
                            Action<string> error)
{
    var request = new UnlockContainerItemRequest();
    request.CatalogVersion = "Rhino Store";
    request.ContainerItemId = containerId;
    Action<UnlockContainerItemResult> callback;
    callback = r =>
    {
        var items = r.GrantedItems
                     .Select(i => CloudDataFactory.GetInventoryItem(i));
        if (success != null) success(items.ToList());
    };
    Action<PlayFabError> errorCB = e =>
    {
        if (error != null) error(e.GetFormattedError());
    };
    PlayFabClientAPI.UnlockContainerItem(request, callback, errorCB);
}

Everything else seems fine. Any help will be appreciated.

1 comment
10 |1200

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

jferano avatar image jferano commented ·

Using Unity 5.4.0f3, PlayFab SDK version 2.12.161107

0 Likes 0 ·
brendan avatar image
brendan answered

Reviewing the error and your title, it appears that at least one of the items in your chain of tables does not exist in the catalog. At a minimum, I can see that the table guardian_hero_card_table has a 95% (and change) chance of returning premium_currencybundle_100_CR, which is not in the catalog. There may be others, as well, so I'd recommend reviewing all the items wired up in the tables.

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

Can you give us the full error response data, including the Request ID, so that we can find this in the logs?

1 comment
10 |1200

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

jferano avatar image jferano commented ·

The most I get from the PlayFabError is the following;

500 Internal Server Error
Error: ServiceUnavailable
Message: 500 Internal Server Error
HttpCode: 400
HttpStatus: BadRequest
UnityEngine.Debug:Log(Object)
Services.Cloud.<UnlockContainer>c__AnonStorey180:<>m__1C3(PlayFabError) (at Assets/BreachAssets/Source/Services/Cloud/CloudDataFetcher.cs:271)
PlayFab.Internal.<MakeApiCall>c__AnonStorey274:<>m__41F(String) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:156)
PlayFab.Internal.<Post>c__IteratorCF:MoveNext() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:168)
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
0 Likes 0 ·

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.