question

JJNCreator avatar image
JJNCreator asked

GetUserInventory error

I have an account in a game I'm making, and I had it for a few months.  One of the API calls I use all the time is GetUserInventory.  It worked fine until the other day, when I got this error:

Got an error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Argument cannot be null.
Parameter name: key

This happens in the PlayFabItemsController.cs script. Does it have something to do with the fact that its on iOS? Maybe the API is being called too frequently? I'm not sure if there's a workaround, but any help would be much appreciated. 

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

Can you provide us with the Title ID and the code snippet showing the call?

10 |1200

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

JJNCreator avatar image
JJNCreator answered

I'll email you the ID and snippet.  I'm not comfortable showing my Title ID on the forum where everyone can see it.  

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

Actually, just so you know, your Title ID isn't something that needs to be guarded. It's part of the URI used to make every call to our service from your title, so it's trivial for a player to get it, once you've released. And no one can access your title configuration in the PlayFab Game Manager unless you specifically grant them access. The thing you need to protect is your Secret Key, as that's what enables all the Server and Admin API calls on your title. Do feel free to email us the code snippet though, and we'll have a look.

10 |1200

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

JJNCreator avatar image
JJNCreator answered

Oh ok.  My Title ID is 743D.  I'll send you a PNG of the code where the API is being called. 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.

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.