question

Andy Maddison avatar image
Andy Maddison asked

Cannot call LoginWithFacebook on device via Unity without error

Hello. I'm just trying to get started with PlayFab on Unity. I have done some testing in the editor and things are working fine. However, on my iOS device I cannot call LoginWithFacebook without an error. I am logged into Facebook itself ok.

My app id is 197F.

I get error code 'Unknown'.

HttpCode: 200.

HttpStatus: Client failed to parse response from server.

No error details.

And this for the error message:

System.MemberAccessException: Cannot create an instance of PlayFab.Internal.ResultContainer`1[TResultType] because Type.ContainsGenericParameters is true.

  at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0

  at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0

  at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0

  at PlayFab.Json.ReflectionUtils+<GetConstructorByReflection>c__AnonStoreyD.<>m__20 (System.Object[] args) [0x00000] in <filename unknown>:0

  at PlayFab.Json.PocoJsonSerializerStrategy.DeserializeObject (System.Object value, System.Type type) [0x00000] in <filename unknown>:0

  at PlayFab.Internal.Util+MyJsonSerializerStrategy.DeserializeObject (System.Object value, System.Type type) [0x00000] in <filename unknown>:0

  at PlayFab.Json.SimpleJson.DeserializeObject (System.String json, System.Type type, IJsonSerializerStrategy jsonSerializerStrategy) [0x00000] in <filename unknown>:0

  at PlayFab.Json.SimpleJson.DeserializeObject[ResultContainer`1] (System.String json, IJsonSerializerStrategy jsonSerializerStrategy) [0x00000] in <filename unknown>:0

  at PlayFab.SimpleJsonInstance.DeserializeObject[ResultContainer`1] (System.String json, System.Object jsonSerializerStrategy) [0x00000] in <filename unknown>:0

  at PlayFab.SimpleJson.DeserializeObject[ResultContainer`1] (System.String json, System.Object jsonSerializerStrategy) [0x00000] in <filename unknown>:0

  at PlayFab.Internal.ResultContainer`1[PlayFab.ClientModels.LoginResult].HandleResults (PlayFab.CallRequestContainer callRequest, System.Delegate resultCallback, PlayFab.ErrorCallback errorCallback, System.Action`2 resultAction)

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1807605288 avatar image
1807605288 answered

We are in-progress, testing a possible solution right now.  This is a particularly tricky issue, and there are a large number of edge cases and platforms to test.  As you've experienced, solving this problem for one subset of platforms can easily break it for others.  We've expanded our test-coverage again to avoid problems on a larger set of Unity platforms.

We will post here again when this change is downloadable.  Stay tuned.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

marcowilliamspf avatar image
marcowilliamspf answered

@Andy  In addition to what Paul said, I wanted you to know that the Mono 2.x issue is resolved and I specifically tested your Facebook scenario and that now works as well on Mono 2.x.  However, this is a major change to the SDK and as Paul said there is a bunch of regression testing that needs to be done before we can release the fix.  If you send an email to devrel@playfab.com I'll see to it that you can get a beta of the new UnitySDK before release to test it out.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

fabian-kuhn@gmx.de avatar image
fabian-kuhn@gmx.de answered

@marco any ETA when the patch is live ? im not updating my SDK before this patch is live, since IL2CPP builds are taking forever and are still in Beta status on android :(

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

marcowilliamspf avatar image
marcowilliamspf answered

@Fabian-Kuhn & @Andy,   hey I was hoping to the this blog post out today, but it is going to need a bit more editing and work.  The blog post has the Beta of our new Unity SDK which has the fixes.  Hang tight, I am hoping to get you exactly what you need within a day or so.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

fabian-kuhn@gmx.de avatar image
fabian-kuhn@gmx.de answered

@marco i cant find the beta in your new blog posts. :( Any new infos ?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Andy Maddison avatar image
Andy Maddison answered

Any idea of the ETA Marco?

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

marcowilliamspf avatar image
marcowilliamspf answered

@Andy check out the blog post and our Beta.
https://playfab.com/new-and-improved-unity-sdk-beta-preview/

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.