Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

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

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

Thread Status:
Not open for further replies.
  1. SophiaC

    SophiaC

    Joined:
    Sep 6, 2016
    Posts:
    238
    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
     
    dan_ginovker and yoondeog like this.
  2. SophiaC

    SophiaC

    Joined:
    Sep 6, 2016
    Posts:
    238
    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

    Joined:
    Sep 6, 2016
    Posts:
    238
    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:
    116
    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?
     
    dan_ginovker likes this.
  6. SophiaC

    SophiaC

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

    adamt

    Joined:
    Apr 1, 2014
    Posts:
    116
    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

    Joined:
    Sep 6, 2016
    Posts:
    238
    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:
    116
    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
    bgroves_ce likes this.
  10. ev3d

    ev3d

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

    Lad-Ty

    Joined:
    May 7, 2013
    Posts:
    61
    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. OneSimpleGame

    OneSimpleGame

    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:

    Dmitry_Plarify and BigGStudios like 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:
    9
    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:
    3
    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:
    1,262
    2018.3.6f1 still happen
     
  26. VonTala

    VonTala

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

    Arsinx

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

    Bric

    Joined:
    Oct 29, 2012
    Posts:
    16
    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:
    10
    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:
    6
    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 -> press select folder -> Android Dependencies will be downloaded -> click Android SDK checkbox ->Ready!
     
    Last edited: Sep 26, 2019
  32. EdPS

    EdPS

    Joined:
    Sep 15, 2015
    Posts:
    3
    I ran into the same issue and the solution for me was to install openssl (on Windows) and add it to the PATH environment variable. Make sure you also have some Java SDK correctly installed too. Both keytool and openssl should be available in the command window under any path if correctly done.
     
    cdr9042 likes this.
  33. nils_unity935

    nils_unity935

    Joined:
    Sep 22, 2019
    Posts:
    1
    Our team ran into the same error today.
     
    dinindu_unity likes this.
  34. dinindu_unity

    dinindu_unity

    Joined:
    Aug 28, 2019
    Posts:
    1
    Same here
     
  35. pauliuso

    pauliuso

    Joined:
    Dec 11, 2014
    Posts:
    8
    In my case, I had to add a full path to debug.keystore file (with file name included) this was not documented in fb integration guide

    upload_2020-10-26_23-1-48.png
     
  36. heartshapedbox

    heartshapedbox

    Joined:
    May 27, 2018
    Posts:
    31
    This worked for me. Thanks!!!!
     
  37. ddadkhah

    ddadkhah

    Joined:
    Nov 6, 2017
    Posts:
    60
    Hi
    I have this issue, where did you fix it?
    How we can fix it in our system?
     
  38. kaneWadel32

    kaneWadel32

    Joined:
    Sep 6, 2017
    Posts:
    9
    1. Donwload the openssl in google archive (link)
    2. Unzip the openssl in local disk c\:
    3. Add the openssl, JDK path(C:\Program Files\Java\jdk1.8.0_131\bin), lib(C:\Program Files\Java\jdk1.8.0_131\lib) path in your system variable "path".
    4. be sure that you have create android debug.keystore in unity
    5. restart your computer
    your are going to note that in facebook settings the Debug keystore hash has been generated. now you can build your game
     
    ddadkhah likes this.
  39. dan_ginovker

    dan_ginovker

    Joined:
    Jun 13, 2021
    Posts:
    76
    Still happening on for cloud builds on 2019.4.28f1 - Using debug.keystore or a full path doesn't work
     
    waken and sarebots2 like this.
  40. Ikaro88

    Ikaro88

    Joined:
    Jun 6, 2016
    Posts:
    307
    I have the same problem
    unity version 2019.4.34, any news on this?
     
  41. rajivrao

    rajivrao

    Unity Technologies

    Joined:
    Feb 19, 2019
    Posts:
    111
    Hi @Ikaro88 -- have you submitted a ticket for this? That would be the fastest way for the team to take a look at this issue.
     
  42. Ikaro88

    Ikaro88

    Joined:
    Jun 6, 2016
    Posts:
    307
    No, because i found a work-around.

    Go on unity preferences, unckeck default android sdk/ndk urls.
    Create and destroy a new script.
    Go on unity preferences, check default android sdk/ndk urls.
    Create and destroy a new script.

    And for magic it work again!!!
     
    dan_ginovker and rajivrao like this.
  43. kbobnis

    kbobnis

    Joined:
    Oct 23, 2015
    Posts:
    6
    Open Editor Log, it will give you more detail about this issue. For me it was:

    Code (JavaScript):
    1. Android PostProcess task "Moving output package(s)" took 3.393 ms
    2. Inh4eCIgCg==
    3. 'keytool' is not recognized as an internal or external command,
    4. operable program or batch file.
    5. Your Android setup is not correct. See Settings in Facebook menu.
     
  44. wwidelec1

    wwidelec1

    Joined:
    Dec 9, 2017
    Posts:
    6
    After at least 10 hours i accidentally discovered that you HAVE TO PRESS ENTER after you type in the missing keystore path in Facebook settings.
    That's funny. But no one laughs.
     
    JoshW_3, dan_ginovker, Niroan and 2 others like this.
  45. TapSlots

    TapSlots

    Joined:
    Nov 16, 2016
    Posts:
    1
    Sorry for a silly question... where are these Facebook settings where one can type in a missing keystore path? We're struggling with "Your Android setup is not correct. See Settings in Facebook menu." when trying to build on Gitlab and we're not quite sure what that means.
     
    Last edited: Apr 22, 2022
  46. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,262
    If I remember correct this most likely a wrong java sdk path when you uninstall the old unity but the path are still remember in every version of unity and not auto overridden
     
  47. mancGames

    mancGames

    Joined:
    Mar 25, 2021
    Posts:
    3
    This is worked for me with this environment; MacOs - Facebook SKD 14.1.0 - Unity 2021.1.9f1
    Appreciate.
     
  48. joseGuate97

    joseGuate97

    Joined:
    Mar 1, 2018
    Posts:
    57
    This was the solution for me.

    It can be confusing because the path format is not the same as the one used in Unity's Android settings.
     
  49. bkachmar

    bkachmar

    Joined:
    Mar 15, 2013
    Posts:
    44
    For me checking on and off the Android SDK location and restarting Unity fixes the issue.
     
  50. Serge144

    Serge144

    Joined:
    Oct 2, 2018
    Posts:
    65
    I tried every single thing on this thread and still getting the bloody error on 2022.3 ....

    I tried:
    1. Adding the path of the debug.keystore into 'Android Keystore Path' in the 'Android Build Facebook Settings'
    2. Installing OpenSSL + setting to Path (and JDK) and rebooting PC.
    3. Going on to Preferences > External Tools > Untick Android SDK & NDK > Create & Destroy a script > tick again Android SDK & NDK > Create & Destroy a script again.

    NOTHING works... what the hell is going on and how do I fix this? This is probably one of the most frustating error's ive ever had.
     
    YSP_ likes this.
Thread Status:
Not open for further replies.