• 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

Authentication error - Unity iOS

Scheduled Pinned Locked Moved APIs
unityerrorios
4 Posts 2 Posters 558 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.
  • G Offline
    G Offline
    Gavin Beard
    wrote on last edited by
    #1

    Hi all,

    I've been trying out brainCloud as a replacement for Game Center turn based matching but I've run into a problem.

    In my C# script I have a brainCloud Wrapper:

    public BrainCloudWrapper brainCloudWrapper;
    

    when the singleton it is attached to is initiated it runs the following:

        ```
    

    brainCloudWrapper = gameObject.AddComponent<BrainCloudWrapper>();
    brainCloudWrapper.Init();

    
    There is a simple button in a UI that calls the following:
    
            ```
            brainCloudWrapper.AuthenticateAnonymous(successCallback = (response, cbObject) =>
            {
                Debug.Log(string.Format("Success | {0}", response));
            },
            failureCallback = (status, code, error, cbObject) =>
            {
                Debug.Log(string.Format("Failed | {0}  {1}  {2}", status, code, error));
            });
    

    it runs in the editor but gives me:

    Failed | 202 40206 {"status_message":"Processing exception (message): Credentials missing for Profile Id.","reason_code":40206,"status":202}

    If I run it on my iPhone test device it causes a complete crash of the app with the following:

    JsonTypeCoercionException: Only objects with default constructors can be deserialized. (BrainCloud.Internal.JsonResponseBundleV2)
      at BrainCloud.JsonFx.Json.TypeCoercionUtility.InstantiateObject (System.Type objectType, System.Collections.Generic.Dictionary`2[System.String,System.Reflection.MemberInfo]& memberMap) [0x00000] in <00000000000000000000000000000000>:0 
      at BrainCloud.JsonFx.Json.JsonReader.ReadObject (System.Type objectType) [0x00000] in <00000000000000000000000000000000>:0 
      at BrainCloud.JsonFx.Json.JsonReader.Deserialize[T] (System.String value) [0x00000] in <00000000000000000000000000000000>:0 
      at BrainCloud.Internal.BrainCloudComms.HandleResponseBundle (System.String jsonData) [0x00000] in <00000000000000000000000000000000>:0 
      at BrainCloud.Internal.BrainCloudComms.Update () [0x00000] in <00000000000000000000000000000000>:0 
      at BrainCloud.BrainCloudClient.Update (BrainCloud.eBrainCloudUpdateType in_updateType) [0x00000] in <00000000000000000000000000000000>:0 
    

    Am I missing something from my setup, or in my code calls? it ran a few times without problem but seemed to generate a new user every time it ran which wasn't the expected behaviour (I assumed if it was same device it would use the already created anon. user)

    Any help is much appreciated

    1 Reply Last reply
    0
  • G Offline
    G Offline
    Gavin Beard
    wrote on last edited by
    #2

    I can see in the documentation that reason code 40206 is "MISSING_IDENTITY_ERROR" and that it suggests maybe trying forceCreate?

    The iPhone crash is a bigger problem, as this can turn users away from the app pretty easily

    1 Reply Last reply
    0
  • G Offline
    G Offline
    Gavin Beard
    wrote on last edited by
    #3

    Also getting the same error with "Sign In With Apple" when using the brainCloudWrapper.AuthenticateApple() method

    1 Reply Last reply
    0
  • A Offline
    A Offline
    Andreas Boye
    wrote on last edited by
    #4

    Hi Gavin,

    Did you resolve the crash issue on iOS? I am experiencing it as well, so I feel I must have missed something 🙂

    Cheers,
    Andreas

    1 Reply Last reply
    0

  • Login

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