question

beernaertsjohnny avatar image
beernaertsjohnny asked

Error 500 on "UnlockContainerInstanceRequest"

Unity code :

public void OpenSurpriseBox()
{
	UnlockContainerInstanceRequest serverRequest = new UnlockContainerInstanceRequest();
	AHItemInstance surpriseBox = AHPlayerState.Get.ownedSurpriseBoxes.GetItemCollection().First();
	serverRequest.ContainerItemInstanceId = surpriseBox.myItem.ItemInstanceId;
	Debug.Log("Surprise box id : " + surpriseBox.myItem.ItemInstanceId);
	PlayFabClientAPI.UnlockContainerInstance(serverRequest, (Result) =>
	{
		Debug.Log("SurpriseBox opening succeeded.");
		GetPlayerInventory();
	}, (error) =>
	{
		Debug.Log(error.ErrorMessage + " : " + error.ErrorDetails + "." + error.Error + "." + error.CustomData);
		Debug.Log(error.HttpCode);
		Debug.Log(error.HttpStatus);
	});
}

Error :

screenshot-1.jpg (16.3 KiB)
10 |1200

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

1 Answer

·
brendan avatar image
brendan answered

Can you provide more context for this? What is the Title ID you're testing? What are the PlayFab ID of the user in question and the Item Instance ID?

5 comments
10 |1200

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

beernaertsjohnny avatar image beernaertsjohnny commented ·

@Brendan
Title ID : 71E4
User ID : C7B609F3D84808F8

Item Instance ID : 7653DC08CFCE325B

0 Likes 0 ·
brendan avatar image brendan beernaertsjohnny commented ·

Thanks! There are two issues:

1. You have an ItemId defined in the Drop Table your Container uses which no longer exists in your catalog: "beasts_turtle_shark".

2. Your container is a durable, so it's a) remaining in the inventory after it is unlocked (which would allow a player to open it infinitely, getting an item each time), and b) taking up an inventory slot in the player account. I would recommend making the container be consumable (Usage Count of 1). I would also recommend making any item the player can have more than one of, but which does not require unique Custom Data per instance, a Consumable.

0 Likes 0 ·
beernaertsjohnny avatar image beernaertsjohnny brendan commented ·

@Brendan So i've corrected those two issues but it still return me an error :



Thank your for your time.

0 Likes 0 ·
screenshot-1.jpg (13.4 KiB)
Show more comments

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.