question

David James avatar image
David James asked

GrantItemsToCharacter result not showing up in Dashboard

I'm receiving no errors and the logs output a correct item result when granting a new item to a character via:

 var result = await serverApi.GrantItemsToCharacterAsync(new GrantItemsToCharacterRequest
 {
       CatalogVersion = "1",
       CharacterId = characterId,
       PlayFabId = playfabid,
       ItemIds = new List<string> { "DefaultHabitat" }
 });

The character exists, and displays in the dashboard no problem, the issue is the granted item(s) do not display in said character's inventory (legacy) - even after defining the catalog version (in this case the catalog name is "1".

Assuming the character is successful, and the item granting returns successful, what else could be the issue? Thank you for any help.

apisPlayer InventoryCharacter DataCharacters
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.

David James avatar image David James commented ·

Apparently calling

 PlayFabClientAPI.GetCharacterInventory(new PlayFab.ClientModels.GetCharacterInventoryRequest()
 {
     CatalogVersion = "1",
     CharacterId = characterId,
 }, (r) =>
 {
     Debug.Log("Retrieving items: " + r.Inventory.Count);
     foreach (var item in r.Inventory)
     {
         Debug.Log("<color=green>Found Item: </color>" + item.DisplayName);
     }
 }, (e) => Debug.LogError("Failed retrieving inventory: " + e.ErrorMessage));

Returns no items, so it's not a dashboard thing- the item just doesn't exist even though the granting code yields no error. Very confusing!

0 Likes 0 ·

1 Answer

·
David James avatar image
David James answered

Very puzzling experience.

My client code hasn't changed neither my server code, yet suddenly I'm receiving the granted item update?

That was a days worth of trouble with no credible way of knowing what the problem was/how to solve it in the future.. We're talking no errors of any kind on the server side Item Grant code, I don't understand how that's possible hopefully someone at playfab can weigh in on potential causes?

To reiterate, my server received a Success result granting an item to a client, the client nor dashboard recognized this. Now after a day it suddenly it works.

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.

Xiao Zha avatar image Xiao Zha commented ·

The GrantItemsToCharacter API works fine in my test. You may keep monitoring to see if the issue is occasional or recurring.

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.