[Question] Difficulty setting up dev/prod environment with braincloud apps.
-
Hi all--
I've been trying to follow this question that was answered by the braincloud team about managing multiple environments, ie dev and prod, to prevent introducing issues to the production game once its live.
Link:
BrainCloud Team's SuggestionHowever, I'm stuck right at my first call to servers. I init the braincloud wrapper just like in the bootcamp:
Bootcamp linkThen, following the braincloud team's suggestion, I'm trying to use a compiler flag to change the app I'm pointing to, to make it so that I have a dev app and a prod app. In unity, this looks like:
m_brainCloud = gameObject.AddComponent<BrainCloudWrapper>(); #if UNITY_EDITOR m_brainCloud.Init("https://api.braincloudservers.com/", "devEnvironmentSecretREDACTED", "devEnvironmentIDREDACTED","1.0"); #else m_brainCloud.Init(); #endif
Where the else statement is pointing to my prod app via the plugin extension.
When using this setup, once I submit a request to Anonymous Authentication, I get:
Please re-select app in brainCloud settings, something went wrong UnityEngine.Debug:LogWarning (object) BrainCloud.Internal.BrainCloudComms:GetWebRequestResponse (BrainCloud.Internal.RequestState) (at Assets/BrainCloud/Client/BrainCloud/Internal/BrainCloudComms.cs:1918) BrainCloud.Internal.BrainCloudComms:Update () (at Assets/BrainCloud/Client/BrainCloud/Internal/BrainCloudComms.cs:534) BrainCloud.BrainCloudClient:Update (BrainCloud.eBrainCloudUpdateType) (at Assets/BrainCloud/Client/BrainCloud/BrainCloudClient.cs:920) BrainCloudWrapper:RunCallbacks () (at Assets/BrainCloud/Client/BrainCloud/BrainCloudWrapper.cs:364) Network:Update () (at Assets/Scripts/Network.cs:43)
And my personal logs (from the bootcamp) show:
RequestAnonymousAuthentication failed. 900 Received an invalid json format response, check your network settings.
Any ideas on what I could try? If I set the else if to just use the plugin credentials (ie just Init()) without the overload, it works, but of course then its just having both branches point to my prod app.
-
@kuabs Could you try updating your url from
https://api.braincloudservers.com/
tohttps://api.braincloudservers.com/dispatcherv2
? -
@Paul-Winterhalder In case you have a moment, I saw you were the creator of the post I mention regarding creating environments. Ever run into something like this while setting that up?
-
@kuabs Could you try updating your url from
https://api.braincloudservers.com/
tohttps://api.braincloudservers.com/dispatcherv2
? -
I believe this worked @Steve-Jones -- thanks so much for the tip!
-