Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

FB SDK broken in 5.6

Discussion in '5.6 Beta' started by MrLucid72, Mar 19, 2017.

  1. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    932
    EDIT 3: Confirmed broken in 5.6 -- see reply below this one.

    Unless this is caused by Vulkan? But seems irrelevant.... I'll try without Vulkan.

    upload_2017-3-19_14-1-54.png

    EDIT 1: The Unity Store Facebook SDK is SUPER OLD compared to the one directly from FB. I got that and now I have a new error (used to work fine):

    https://github.com/facebook/faceboo...acebook.Unity.Arcade/ArcadeWrapper.cs#L30-L31

    Code (CSharp):
    1. InvalidOperationException: Pipe name not passed to application on start. Make sure you are running inside the facebook games client.
    I still can't fb Init()

    EDIT 2: Works fine in editor play testing.
     
    Last edited: Mar 19, 2017
    Brogan89 likes this.
  2. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    932
    Major update: CONFIRMED BROKEN in FB 7.9.4 (latest) package. I tested with vanilla settings -- it works only in the editor, but if you build it and play from the exe, you get the following error (2nd pic below). This is tested with Facebook's included MainMenu example script.

    upload_2017-3-19_19-1-20.png

    upload_2017-3-19_19-1-34.png

    I posted an issue:

    https://github.com/facebook/facebook-sdk-for-unity/issues/70

    PS -- The official FB SDK in the Unity Store is WAY outdated and should probably be removed by Unity staff -- it didn't even work in Unity 5.5 (I had to get it from the website). They aren't keeping it up-to-date like they do their website version.
     
  3. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    932
    So after more research, it appears that Unity's support for Gamegate is somehow conflicting with just using the "Vanilla" SDK. I am about 99% certain it's a bug on Unity's side on not the FB SDK.:

    1. It works fine when tested in the editor. NOT the exe.
    2. It worked in both editor+exe in 5.5, but not 5.6f1.

    Although I'm only using the SDK, it appears that Unity is somehow forcing a Gamegate check. What needs to happen is to allow the SDK to fb.Init() even if we're not using Gamegate. 5.6 broke all FB features unless you specifically use Gamegate platform instead of PC.

    The error is:

    Code (CSharp):
    1. InvalidOperationException: Pipe name not passed to application on start. Make sure you are running inside the facebook games client.

    It seems that Unity checks if I have FB SDK - if I have FB SDK, Unity assumes it's gamegate instead of a vanilla SDK and proceeds with the gamegate check - that then fails. Unity may even set a background value to the FB SDK to let FB know that gamegate is expected - and to not allow init if no gamegate.
     
    Last edited: Mar 21, 2017
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,703
    The error looks similar to the one you get when you run game designed for Facebook, but you run it standalone, not in fb client.
    There was certainly the case before that FB SDK on Windows standalone was always acting as if running in fb client. I'll try to figure out the current state.
     
    MrLucid72 likes this.
  5. ChazAshleyCode

    ChazAshleyCode

    Joined:
    Feb 28, 2017
    Posts:
    1
    I have Unity 5.5.1f1 and FB SDK 7.9.4 and got the same error.
     
    MrLucid72 likes this.
  6. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    932
    This is interesting because it worked for me on 5.5.1f1 -- however, the old FB SDK (I forgot what version, sorry -- long gone) wouldn't work on 5.6f1, so I grabbed the new version
    • This means the new SDK is broken for both 5.5 and 5.6, and the old SDK works for only 5.5 or below.
    • It worked for ME on 5.5p4, however did not work for Chaz.
    • However, I had an old FB SDK, he has the latest. The old worked with 5.5, the new did not.
    • In 5.6, both the new and old FB SDK's don't work. If you have the old, you get strange errors (I wish I could remember). If you have the new, you get this gameroom error.
    • 5.6 + latest SDK Works in editor, not exe
     
    Last edited: Mar 29, 2017
  7. einerdek

    einerdek

    Joined:
    Sep 30, 2016
    Posts:
    3
    Having the same issue with Unity 5.5.2f1 and 7.9.4 FB SDK, any tips or i just should wait for news?
     
  8. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    932
    Either wait or you can downgrade your FB SDK (not sure to what version). One of the older ones worked for 5.5, but not 5.6.

    (although note, 5.6 latest FB SDK WORKS IN THE EDITOR. Just not the exe)
     
  9. einerdek

    einerdek

    Joined:
    Sep 30, 2016
    Posts:
    3
    Still learning and testing so, i guess i'll wait and deep into some more stuff in the meantime, as long as i can test it at least in the editor. I hope it doesn't take so long to have a fix.