question

Jeremy Rose avatar image
Jeremy Rose asked

Groups not showing in Groups, but are listed under player

I have been working with cloud script to create some groups and assign members etc.

I have noticed that there are groups that are listed under the players list, but not in the main list.

I can not seem to be able to delete these groups because of it.

I think i might know why its happening possibly. I am deleting the group at the start of my cloud code to simulate not having a group. I then create a new group using the same name.


When the group exists and i delete it and create a new one it won't show up in the list. If i run the script again it does. It seems these missing groups are the ones showing up in players list.

I am not sure where the bug is, it seems like with the cloud script being an synchronous api deleting a group and making one shouldn't cause problems.

game manager
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.

Sarah Zhang avatar image Sarah Zhang commented ·

Could you please provide more details about this issue? Which API did you call to delete and create the groups? Could you provide the main code on CloudScript or could you provide your titleId so we can try to investigate it?

0 Likes 0 ·
Jeremy Rose avatar image
Jeremy Rose answered

The title id is DD757

The code is from the CreateCampaign function.

What would generate the issue is to cal the DeleteGroup and then the CreateGroup. Everyhting in the script behaved as if the group was deleted and created, It just did not show up in the Groups list in the GameManager. Only under the player.

    try {
        var result = entity.DeleteGroup({Group: entity.GetGroup({GroupName: player_campaigns_id}).Group});
    }
    catch(err) {
    }


    //get or create the group for the campaign
    var group = null;
    try {
        log.debug("Creating Campaign Group");
        group = entity.CreateGroup({GroupName: player_campaigns_id}).Group;
        entity.CreateRole({Group: group, RoleId: "dm", RoleName:"Dungeon Master"});
    }
    catch(err) {
        log.debug("Campaign Group Already exists");
        group = entity.GetGroup({GroupName: player_campaigns_id}).Group;
    }
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.

Sarah Zhang avatar image Sarah Zhang commented ·

We have checked the title. Under all players, there is only two groups, is it right?

Then we can find these groups in the [Groups] page(https://developer.playfab.com/en-US/r/t/DD757/groups), it looks like normal. Have you recreated them or do other things?

0 Likes 0 ·
Jeremy Rose avatar image
Jeremy Rose answered

I have manually deleted the groups through cloud code and changed my scripts some to try to avoid it. While i am testing.

I have added a new function to cloud code that you can run. MakeMissingGroup. It doesn't need any paramteres and will show the issue. You may need to run it twice if the group does not exists already the first time.

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.

franklinchen avatar image franklinchen commented ·

Thank you for reporting this group list mismatching issue, I just informed team to investigate it. I will let you know the update. Thanks.

0 Likes 0 ·
Ádám avatar image
Ádám answered

Just passing by to say the very same issue still happens after 2 years and 9 months.

I wouldn't expect the team to spend so much time investigating, but fingers crossed.

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.