Engine bug or scripting error - purchases

Anytime I try to purchase something in studio now, I am getting this error message followed by a long string of errors.

Error: Unable to find localization with key: IAPExperience.PurchasePrompt.Text.BuyItemQuestionWithWarning

1 Like

I can’t say for certain as I can’t reproduce the error. Purchases work just fine for me. If they still aren’t working for you, a relatively quick test to help narrow it down on your end would be checking if the minimum possible code for a purchase works in studio on an empty baseplate. (you can pull it from here). If that works there is a solid chance it’s your code. If it doesn’t work it’s almost certainly a bug.

Overall though it will be hard to say. You could potentially provide the actual purchase code to help narrow it down, but I’m unoptimistic that would really help responders tell you for sure since the code could be complex and the error might not be where you expect. Another thing that could be helpful in identifying it is if you state at what point in the purchase process this error appears (like before, during, after the roblox purchase confirmation gui).

1 Like

As soon as I click the GUI button to attempt the purchase, I get the error message, so before the Roblox prompt even comes up (which it never ends up doing). It isn’t the code because I have used the minimum basic promptproductpurchase and promptgamepasspurchase snippets to test that as well. Both give the same error, only in studio, but not in the live game and not on a baseplate. So I am assuming it is a game setting malfunctioning or maybe the translations since the error includes localization.

1 Like

it happens no matter if its a local script or server script too, error could be coming from a core script or plugin, but I have no plugins installed.

This does imply that it is specific to your installation of studio. Plugins could be the cause as you mentioned if you had any. As such I would recommend uninstalling and reinstalling studio to see if that fixes it.

Welp, I uninstalled studio and even deleted my Roblox folder in C:\Users\user\AppData\Local, but still got the same purchase error after re-installing. I am thinking the problem has something to do with localization/translations, I was going to try turning off stuff in the StudioAppSettings json but I don’t want to accidentally break something.

The word “localization” is mentioned within the error. Do you use a custom language in studio apart from English? If so what language?

No custom languages, I just have some translators working for me that translate the game through the portal on the Roblox website, nothing within studio as I am a solo developer. They have translated the game into multiple languages.

Try using the same script in a game without localization(ideally an empty baseplate) to check if the error persists.

I have tried that, I published my game to a different place with no translators or translation settings on, and the error message still persisted. Running a base plate works fine, but at that point i am just running a single button with a promptpurchase gui. I do the same thing in my game and i get the error.

It says at the beginning of the log that the error was caught by ‘React’ so maybe somebody knows what that is? and if it has any API?