Search Unity

[FIXED] UCB Team - Android Builds with the Facebook SDK are failing 17th March

Discussion in 'Unity Cloud Build' started by SophiaC, Mar 17, 2017.

  1. SophiaC

    SophiaC

    Unity Technologies

    Joined:
    Sep 6, 2016
    Posts:
    236
    Hello everyone,

    We're aware of an issue causing Android builds to fail if they contain the Facebook SDK. You may see an error message like

    The team is working on a fix. I'll update this thread when we have more information.

    Thanks,

    - Sophia
     
  2. SophiaC

    SophiaC

    Unity Technologies

    Joined:
    Sep 6, 2016
    Posts:
    236
    This issue has been fixed! Thanks for your patience everyone!

    - Sophia
     
  3. quinn_scopely

    quinn_scopely

    Joined:
    Nov 4, 2015
    Posts:
    2
    When and where was this fixed? We're having this problem in 5.5.2p2 as of today.
     
  4. SophiaC

    SophiaC

    Unity Technologies

    Joined:
    Sep 6, 2016
    Posts:
    236
    I believe you have submitted a ticket so we will be handling your issue through that :)

    - Sophia
     
  5. adamt

    adamt

    Joined:
    Apr 1, 2014
    Posts:
    114
    Hi, @SophiaC.

    We use Jenkins to build our game, and are running into the same issue. Can you elaborate on how you solved the problem for Unity Cloud Build?
     
  6. SophiaC

    SophiaC

    Unity Technologies

    Joined:
    Sep 6, 2016
    Posts:
    236
  7. adamt

    adamt

    Joined:
    Apr 1, 2014
    Posts:
    114
    Can you elaborate further than just Gradle and the Android Keystore? I'm happy to muck around in shell scripts and Unity Editor code to fix the problem, but it's very opaque and since it doesn't happen when building through the editor itself (only via the command line), it's very tough for me to fix it without more information.
     
  8. SophiaC

    SophiaC

    Unity Technologies

    Joined:
    Sep 6, 2016
    Posts:
    236
    The Facebook SDK looks for the debug android keystore on your machine - we made changes with Gradle that caused that keystore to not automatically be generated. This was resolved on the Cloud Build side on March 17th.

    Hope this helps you figure out what's happening to your project.

    - Sophia
     
  9. adamt

    adamt

    Joined:
    Apr 1, 2014
    Posts:
    114
    The weird part (to me, at least) is that I have a debug.keystore file on my build machine under %HOMEPATH%\.android (Windows box).

    Building inside the editor itself happens just fine using the exact same method call I use when building via batch mode, but building on the command line using batch mode fails.

    Update: Looks like I fixed it. This obviously isn't really a problem for Cloud Build, but if anyone is having this issue with Jenkins, it might be because Jenkins strips your environment before builds. The Facebook Unity plugin explicitly checks for the HOMEPATH and HOMEDRIVE environment variables when trying to find the debug keystore. However, since Jenkins has stripped those variables before its run, the plugin fails to find the file and aborts the build.

    The solution, in this case, was to use the EnvInject Jenkins plugin to re-inject the variables before the build. Just make sure that when you do, you escape the backslash (if you're using Windows as your Jenkins slave) for the path. For example, your EnvInject configuration might look like this:

    HOMEDRIVE=C:
    HOMEPATH=\\Users\\YourUsername
     
    Last edited: May 10, 2017
  10. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    326
    I am having this in 2017.3
     
  11. Lad-Ty

    Lad-Ty

    Joined:
    May 7, 2013
    Posts:
    22
    Having that as well now after switching to 2017.3 :(
     
  12. GuardFromUA

    GuardFromUA

    Joined:
    Jan 11, 2017
    Posts:
    8
    Still having it. Did someone find the solution?
     
  13. Ovidio1SI

    Ovidio1SI

    Joined:
    Jul 25, 2014
    Posts:
    5
    I just added the debug.keystore file to this path: "C:\Users\<user>\.android" and the error went away.

    Attached the file inside a zip file in case someone needs it.
     

    Attached Files:

    BigGStudios likes this.
  14. Mark-Y

    Mark-Y

    Joined:
    Dec 20, 2012
    Posts:
    8
    I am having this same error Unity 2017.3 Where is the debug.keystore file kept? I can't find it. Any help is appreciated.
     
  15. KennethOAguilar

    KennethOAguilar

    Joined:
    Feb 25, 2015
    Posts:
    6
    drag the above file provided into the .android folder. this solved the issue for me.
    i am not sure how you access the android folder on windows but on mac just type

    open ~/.android/ into the terminal and it should take you to the folder.
     
  16. BigGStudios

    BigGStudios

    Joined:
    May 28, 2017
    Posts:
    1
    Dude you are AWESOME!!!
     
  17. vanthach

    vanthach

    Joined:
    Sep 13, 2012
    Posts:
    9
    I have same error. But build grandle not fix. I use unity 2017.3 , FB SDK 7.13.0 , Admob v3.13.1.
    Output log:

    Your Android setup is not correct. See Settings in Facebook menu.
    UnityEngine.Debug:LogError(Object)
    Facebook.Unity.Editor.XCodePostProcess:OnPostProcessBuild(BuildTarget, String)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    Error building Player: Your Android setup is not correct. See Settings in Facebook menu.

    Build completed with a result of 'Failed'

    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0020e] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:181
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x00065] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:88
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  18. Neil-M

    Neil-M

    Joined:
    Mar 13, 2015
    Posts:
    3
    @SophiaC I am having this issue in Unity 2018.2.0f2. What should I do now?
     
  19. abe_unity264

    abe_unity264

    Joined:
    Nov 10, 2017
    Posts:
    3
  20. Ankush_Jagtap007

    Ankush_Jagtap007

    Joined:
    Jun 21, 2018
    Posts:
    1
    i have this follow error please anybody have a solution . i use unity 2018.1 and facebook sdk 7.13.0

    Your Android setup is not correct. See Settings in the Facebook menu.
    UnityEngine.Debug:LogError(Object)
    Facebook.Unity.Editor.XCodePostProcess:OnPostProcessBuild(BuildTarget, String)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
    unity_9Iw1hIqfScfnbw likes this.
  21. RKOvlesen

    RKOvlesen

    Joined:
    Oct 29, 2013
    Posts:
    7
    Having the same problem. Unity 2017.2.0f2 and originally with 7.10.1, but I have tried updating to 7.13.0 with same result.


    In the facebook settings window, it says:
    "Your android debug keystore file is missing. You can create new one by creating and building empty Android project in Eclipse."

    I have done a lot of different things to be absolutely sure that I have the debug.keystore. It even said that the password was wrong of file had been tampered with at some point. So it can find it, but the error message might be wrong?
     
  22. rafaelloopix

    rafaelloopix

    Joined:
    Oct 5, 2018
    Posts:
    2
    Having the same problem. Unity 2018.3, any fix?
     
  23. studiershub

    studiershub

    Joined:
    Feb 12, 2019
    Posts:
    1
    Same issue with 2018.3.6f1
     
  24. privalgames

    privalgames

    Joined:
    Dec 13, 2018
    Posts:
    1
    I have the same problem

    Your Android setup is not correct. See Settings in Facebook menu.
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    My game is compiled, but it does not open, it tells me that the application has been closed and that it continues to fail.

    Can someone help me?

    Thank you
     
  25. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    251
    2018.3.6f1 still happen
     
  26. VonTala

    VonTala

    Joined:
    Feb 17, 2015
    Posts:
    9
    me too
     
  27. Arsinx

    Arsinx

    Joined:
    Apr 14, 2014
    Posts:
    54
    This is happeneing to me too. 2018.3
     
  28. Bric

    Bric

    Joined:
    Oct 29, 2012
    Posts:
    15
    This is happeneing to me too. 2018.3, but 2018.2.6.f1 is not. I am using Facebook SDK 7.15.1.
     
  29. Tin-Tin616

    Tin-Tin616

    Joined:
    Nov 25, 2014
    Posts:
    1
    For my case (window), base on Peter77's suggest (link), there is a "'keytool' is not recognized as an internal or external command" error in my debug.log. So i added the java keytool to my PATH and restart window. Problem gone
     
  30. karmaowner13

    karmaowner13

    Joined:
    Aug 8, 2019
    Posts:
    3
    2019.1.1 still happen ...
     
  31. jenya4361

    jenya4361

    Joined:
    Sep 11, 2019
    Posts:
    1
    If you integrating FacebookSDK you need to go to Edit -> Preferences -> External Tools -> unclick Android SDK checkbox -> click browse button -> Android Dependencies will be downloaded -> click Android SDK checkbox ->Ready!