• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums

[Question] Difficulty setting up dev/prod environment with braincloud apps.

Scheduled Pinned Locked Moved Solved General
4 Posts 2 Posters 513 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kuabs
    wrote on last edited by
    #1

    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 Suggestion

    However, I'm stuck right at my first call to servers. I init the braincloud wrapper just like in the bootcamp:
    Bootcamp link

    Then, 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.

    1 Reply Last reply
    0
  • Steve JonesS Offline
    Steve JonesS Offline
    Steve Jones brainCloudAdmin
    wrote on last edited by
    #3

    @kuabs Could you try updating your url from https://api.braincloudservers.com/ to https://api.braincloudservers.com/dispatcherv2 ?

    -= Steve Jones =-

    1 Reply Last reply
    0
  • K Offline
    K Offline
    kuabs
    wrote on last edited by
    #2

    @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?

    1 Reply Last reply
    0
  • Steve JonesS Offline
    Steve JonesS Offline
    Steve Jones brainCloudAdmin
    wrote on last edited by
    #3

    @kuabs Could you try updating your url from https://api.braincloudservers.com/ to https://api.braincloudservers.com/dispatcherv2 ?

    -= Steve Jones =-

    1 Reply Last reply
    0
  • K Offline
    K Offline
    kuabs
    wrote on last edited by
    #4

    I believe this worked @Steve-Jones -- thanks so much for the tip!

    1 Reply Last reply
    0
  • Paul WinterhalderP Paul Winterhalder has marked this topic as solved on

  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users