[SOLVED] Has anyone else had trouble with PlayerOwnsAsset recently?

Asking you guys as part of my bug report.

On May 1st I started getting reports from people that their gamepasses weren’t always working. Coincidentally I released a big update that afternoon, tablet compatibility. (Also coincidentally that was the day roblox was mostly down with top games having 1k players or less). But the update actually changed nothing for the average PC user, maybe 200 lines of extra code between the server and pc client. The complaints haven’t stopped and I’ve seen no console errors and I’ve been wracking my brain thinking what I could’ve possibly done to cause occasional problems for some of my users. To the point where I actually opened the game pre-update and post-update and compared all 30k lines of code line by line analyzing every change I made(this wasn’t so time consuming since I changed so little). Came to the conclusion that it couldn’t have been my coding. I even played with two of the people I confirmed were having issues(they owned a certain gamepass but their datastore said they never spawned in while owning it) and when I had them follow me into a server it worked fine for them and the datastore filled in as it was supposed to. They said it wasn’t working for them multiple servers in a row when it only had to work once for the gamepass benefits to be given forever. I have been unable to make this issue happen to myself.

To answer your questions @Seranok, I don’t know if badges are failing to load, since they have no important effect ingame. It’s hard to tell if it happens to all gamepasses when a person spawns in, since for 95% of my gamepasses once it loads once then it’s saved in the datastore forever. But I know for some people that bought a gamepass after May 1st it never loaded or took several attempts at playing the game before it finally worked. It’s my only game. I will say I’ve never had any gamepass issue like this, whether caused by roblox or a bug of my own.

edit: it should be noted I have roughly 40 items in my table of gamepasses. I know that’s a lot, but it hasn’t been an issue before. Perhaps the threshold for PlayerOwnsAsset calling was reduced recently?

Code snipet

Have any of you guys been getting complaints about gamepasses not always loading when before it was working 100% of the time?

edit: I ended up figuring out what the problem was:

Roblox (I think) updated something that made servers start faster. So fast in fact that players with very fast connections could actually load before a function after PlayerAdded() is initialized. So you had players that were trying to run a function that didn’t exist right before their gamepasses got checked, obviously not getting to their gamepasses. The fact that output didn’t tell me there was an error and instead stopped the PlayerAdded function its tracks only threw a wrench in all of this. Very frustrating bug to fix without any error logs and the fact that it came out of the blue without my influencing.

Yeah, every now and then I’ll get a report that items people should be getting from a gamepass don’t show up in the players inventory. I’ll tell them to rejoin and it fixes the problem. Never been able to repro it though.

Was this a recent thing or happening forever? I went from no reports ever to many complaints a day the day after my update and roblox’s hosting issues on May 1st.

TL;DR but is this relevant?

My logger is saying I am getting 429 responses when using PlayerOwnsAsset. The last report was at 00:10 BST

What does that mean? Issues or normal stuff?

Well a 429 response is for “Too many requests”, but I have been getting them a lot more lately. So yes, it would mean that your gamepass checks would be failing if you get similar things. This mostly affects things the players should see instantly like tools in their starterpack or things like that.
Luckily I locally cache gamepass results and re-check when the player requires the pass if they don’t already have the gamepass if a certain time has expired.

And thats a recent occurrence? I have a lot of gamepasses but it wasnt an issue a few days ago.

Yes it is. I suspect it is the planned changes to BadgeService as @PlaceRebuilder suggested

That’s what I was thinking. I hope other people post saying they’ve had other issues too, I’m completely clueless on how I could fix this if it’s a bug I introduced all on my own.