Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Brite
  • 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
  1. Home
  2. APIs
  3. Authentication error - Unity iOS

Authentication error - Unity iOS

Scheduled Pinned Locked Moved APIs
unityerrorios
4 Posts 2 Posters 1.8k 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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

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