Running on a "beta" namespace (Unity)

Hi folks!

We’re setting up a demo / beta copy of our Unity game and its services. We want this copy to stay static while development continues. For context, we also just migrated to the prod environment instead of dev, but that seems to be complete without issues.

SETUP:

We were previously using a development namespace of PROJECT and we migrated to a new one called project-beta. The goal was that everything in project-beta would be isolated from PROJECT, where we could continue active development.

ISSUE:

In our beta branch, our login succeeded and our cloud save call failed. We debugged and saw that the login call used project-beta and the cloud save used PROJECT. It made sense that the latter failed: it was the wrong namespace.

I tracked this down to the project-beta login returning a user in the PROJECT namespace. This was because the config JSON was set up using a confidential IAM client that was set up for PROJECT.

I set up a new confidential IAM client in the project-beta namespace admin portal. It has the same permissions to talk to the same services we successfully used in our main namespace. There’s also a default game public IAM client in the project-beta namespace, like the one in PROJECT.

  • AccelByteSDKConfig.json: We updated it so that the Default environment points to the project-beta namespace.
  • AccelByteSDKOAuthConfig.json: We updated it so that the Default environment uses the new confidential project-beta client ID and secret.
  • AccelByteServerSDKOAuthConfig.json: We haven’t set anything in particular here as it didn’t seem to have an effect on this issue. Previously, we had the default public game client ID and that’s it. It’s currently set to the project-beta default public game client.

QUESTIONS:

  1. How are we supposed to use namespaces for this sort of situation?
  2. What might be going wrong here?
  3. What would the steps be to debug this?

I’ve attached our AccelByteSDKConfig.json.
AccelByteSDKConfig.json.txt (3.1 KB)

Related: In AccelByteSDKConfig.json, is the PublisherNamespace supposed to be our studio namespace? That’s what it looks like from the code, but not what was generated by the Unity API generation tool. Originally it had PROJECT.

Also related: In this link it says to do this naming convention for namespaces. Is this a requirement?

For AGS Starter, use the following formats:

  • For Namespace: <Studio ID>-<Game TitleID>
  • For Publisher: <Studio ID>.

Thanks!
Chris

Hi @chrislambertus
To sum up our conversation

Cloud save call failed because namespace migration did not migrate cloud save data as well, so your call returns failed because the data could not be found.

When migrating to new namespace, please expect that the new namespace wouldn’t have the same configuration or save data right away, you might need to configure the new namespace before used. And don’t forget to setup login method for the new namespace or this error will be triggered.
{"error":"invalid_request","error_description":"platform config error, platform client not found"}

Hope this information is useful.

1 Like